Student[Statistics] - Maple Help

Online Help

All Products    Maple    MapleSim


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

Student[Statistics]

  

OneSampleTTest

  

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

 

Calling Sequence

Parameters

Description

Notes

Examples

References

Compatibility

Calling Sequence

OneSampleTTest(X, mu0, confidence_option, output_option)

Parameters

X

-

data sample

mu0

-

realcons; the test value for the mean

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 OneSampleTTest function computes the one sample t-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. No assumptions are made on the standard deviation.

• 

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.

• 

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 stronger version of the t-test, the z-test is available if the standard deviation of the sample is known.

Examples

withStudent[Statistics]:

Specify the data sample.

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

MeanX

385

(1)

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

OneSampleTTestX,4,confidence=0.95

Standard T-Test on One Sample
-----------------------------
Null Hypothesis:
Sample drawn from population with mean 4
Alt. Hypothesis:
Sample drawn from population with mean not equal to 4
 
Sample Size:             10
Sample Mean:             7.6
Sample Standard Dev.:    4.24788
Distribution:            StudentT(9)
Computed Statistic:      2.67997500172151
Computed p-value:        .0252070995508197
Confidence Interval:     4.56125385050882 .. 10.6387461494912
                         (population mean)
 
Result: [Rejected]
This statistical test provides evidence that the null hypothesis is false.

hypothesis=false,confidenceinterval=4.56125385050882..10.6387461494912,distribution=StudentT9,pvalue=0.0252070995508197,statistic=2.67997500172151

(2)

Try another data sample.

YSampleExponentialRandomVariable10,1000:

MeanY

9.53689919348922

(3)

OneSampleTTestY,10

Standard T-Test on One Sample
-----------------------------
Null Hypothesis:
Sample drawn from population with mean 10
Alt. Hypothesis:
Sample drawn from population with mean not equal to 10
 
Sample Size:             1000
Sample Mean:             9.5369
Sample Standard Dev.:    9.47321
Distribution:            StudentT(999)
Computed Statistic:      -1.54588971684565
Computed p-value:        .122447910297306
Confidence Interval:     8.94904230861746 .. 10.124756078361
                         (population mean)
 
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false.

hypothesis=true,confidenceinterval=8.94904230861746..10.1247560783610,distribution=StudentT999,pvalue=0.122447910297306,statistic=1.54588971684565

(4)

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

OneSampleTTestY,10,output=plot

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

report,graphOneSampleTTestY,10,output=both:

Standard T-Test on One Sample
-----------------------------
Null Hypothesis:
Sample drawn from population with mean 10
Alt. Hypothesis:
Sample drawn from population with mean not equal to 10
 
Sample Size:             1000
Sample Mean:             9.5369
Sample Standard Dev.:    9.47321
Distribution:            StudentT(999)
Computed Statistic:      -1.54588971676334
Computed p-value:        .122447910317189
Confidence Interval:     8.94904230858616 .. 10.1247560783923
                         (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:      .00285645221288875 .. 67.755043620294
Bin Width:       2.25840623893604
Number of Bins:  30
Frequency Scale: relative

report

hypothesis=true,confidenceinterval=8.94904230858616..10.1247560783923,distribution=StudentT999,pvalue=0.122447910317189,statistic=1.54588971676334

(5)

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][OneSampleTTest] command was introduced in Maple 18.

• 

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

See Also

Statistics[OneSampleTTest]

Student

Student/Statistics/OneSampleTTest/overview

Student[Statistics]

Student[Statistics][HypothesisTest]

Student[Statistics][TwoSamplePairedTTest]

Student[Statistics][TwoSampleTTest]

 


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