OneSampleZTest - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Student[Statistics]

  

OneSampleZTest

  

apply the one sample z-test for the population mean of a sample

 

Calling Sequence

Parameters

Description

Notes

Examples

References

Compatibility

Calling Sequence

OneSampleZTest(X, mu0, sigma, confidence_option, output_option)

Parameters

X

-

data sample

mu0

-

realcons; the test value for the mean

sigma

-

realcons; the standard deviation of the sample X was drawn from

confidence_option

-

(optional) equation of the form confidence=float.

output_option

-

(optional) equation of the form output=x where x is report, plot, or both

Description

• 

The OneSampleZTest function computes the one sample z-test upon a data sample X. This tests whether the mean of the population is equal to mu0, under the assumption that the population is normally distributed with standard deviation sigma.

• 

The first parameter X is the data sample to use in the analysis.

• 

The second parameter mu0 is the assumed population mean, specified as a real constant.

• 

The third parameter sigma is the known population standard deviation, specified as a positive real constant.

• 

confidence=float

  

This option is used to specify the confidence level of the interval and must be a floating-point value between 0 and 1.  By default this is set to 0.95.

• 

If the option output is not included or is specified to be output=report, then the function will return a report. If output=plot is specified, then the function will return a plot of the sample test. If output=both is specified, then both the report and the plot will be returned.

Notes

• 

A weaker version of the z-test, the t-test is available if the standard deviation of the sample is not known.

Examples

withStudentStatistics:

Specify the data sample.

X9,10,8,4,8,3,0,10,15,9:

MeanX

385

(1)

Calculate the one sample z-test on a list of values.

OneSampleZTestX,5,5,confidence=0.95

Standard Z-Test on One Sample
-----------------------------
Null Hypothesis:
Sample drawn from population with mean 5 and known standard deviation 5
Alt. Hypothesis:
Sample drawn from population with mean not equal to 5 and known standard deviation 5
 
Sample Size:             10
Sample Mean:             7.6
Distribution:            Normal(0,1)
Computed Statistic:      1.64438438337511
Computed p-value:        .100096828833158
Confidence Interval:     4.50102483864317 .. 10.6989751613568
                         (population mean)
 
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false.

hypothesis=true,confidenceinterval=4.50102483864317..10.6989751613568,distribution=Normal0,1,pvalue=0.100096828833158,statistic=1.64438438337511

(2)

Try another data sample.

YSampleNormalRandomVariable10,15,1000:

OneSampleZTestY,11,15

Standard Z-Test on One Sample
-----------------------------
Null Hypothesis:
Sample drawn from population with mean 11 and known standard deviation 15
Alt. Hypothesis:
Sample drawn from population with mean not equal to 11 and known standard deviation 15
 
Sample Size:             1000
Sample Mean:             10.9169
Distribution:            Normal(0,1)
Computed Statistic:      -.175176935595206
Computed p-value:        .86094060682115
Confidence Interval:     9.98721373509595 .. 11.8465988319101
                         (population mean)
 
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false.

hypothesis=true,confidenceinterval=9.98721373509595..11.8465988319101,distribution=Normal0,1,pvalue=0.860940606821150,statistic=−0.175176935595206

(3)

If the output=plot option is included, then a plot will be returned.

OneSampleZTestY,11,15,output=plot

If the output=both option is included, then both a report and a plot will be returned.

report,graphOneSampleZTestY,11,15,output=both:

Standard Z-Test on One Sample
-----------------------------
Null Hypothesis:
Sample drawn from population with mean 11 and known standard deviation 15
Alt. Hypothesis:
Sample drawn from population with mean not equal to 11 and known standard deviation 15
 
Sample Size:             1000
Sample Mean:             10.9169
Distribution:            Normal(0,1)
Computed Statistic:      -.175176935595206
Computed p-value:        .86094060682115
Confidence Interval:     9.98721373509595 .. 11.8465988319101
                         (population mean)
 
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false.
Histogram Type:  default
Data Range:      -30.7094021886569 .. 54.4808425292522
Bin Width:       2.8396748239303
Number of Bins:  30
Frequency Scale: relative

report

hypothesis=true,confidenceinterval=9.98721373509595..11.8465988319101,distribution=Normal0,1,pvalue=0.860940606821150,statistic=−0.175176935595206

(4)

graph

References

  

Kanji, Gopal K. 100 Statistical Tests. London: SAGE Publications Ltd., 1994.

  

Sheskin, David J. Handbook of Parametric and Nonparametric Statistical Procedures. London: CRC Press, 1997.

Compatibility

• 

The Student[Statistics][OneSampleZTest] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

Statistics[OneSampleZTest]

Student

Student/Statistics/OneSampleZTest/overview

Student[Statistics]

Student[Statistics][HypothesisTest]

Student[Statistics][TwoSampleZTest]