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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Education : Student Package : Statistics : Hypothesis Tests : Student/Statistics/OneSampleZTest

Student[Statistics][OneSampleZTest] - apply the one sample z-test for the population mean of a sample

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

withStudent[Statistics]:

Specify the data sample.

X:=9,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.64438
Computed pvalue:         0.100097
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.

Y:=SampleNormalRandomVariable10,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:      -0.175177
Computed pvalue:         0.860941
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,graph:=OneSampleZTestY,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:      -0.175177
Computed pvalue:         0.860941
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

See Also

Statistics[OneSampleZTest], Student, Student/Statistics/OneSampleZTest/overview, Student[Statistics], Student[Statistics][HypothesisTest], Student[Statistics][TwoSampleZTest]

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.


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam