Hypothesis Testing and Inference - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Applications and Example Worksheets : Statistics : examples/StatisticsHypothesisTesting

Hypothesis Testing and Inference

Hypothesis testing and inference is a mechanism in statistics used to determine if a particular claim is statistically significant, that is, statistical evidence exists in favor of or against a given hypothesis. The Statistics package provides 11 commonly used statistical tests, including 7 standard parametric tests and 4 non-parametric tests.

 

All tests generate a report of all major calculations to userinfo at level 1 (hence, if output is suppressed, the reports are still generated).  To access the reports, you need to specify the statistics information level to 1 using the following command.

infolevelStatistics1

infolevel[Statistics]:=1

(1)

1 Tests for Population Mean

Two standard parametric tests are available to test for a population mean given a sample from that population. The OneSampleZTest should be used whenever the standard deviation of the population is known.  If the standard deviation is unknown, the OneSampleTTest should be applied instead.

restart:withStatistics: infolevelStatistics1:

 

Generate a sample from a random variable that represents the sum of two Rayleigh distributions.

R:=RandomVariableRayleigh7+RandomVariableRayleigh4:S:=SampleR,100:

 

The following then are the known values of the mean and standard deviation of the population.

μ:=evalfMeanR

μ:=13.78645551

(1.1)

σ:=evalfStandardDeviationR

σ:=5.281878335

(1.2)

 

Assuming that we do not know the population mean but we know the standard deviation of the population, test the hypothesis that this sample was drawn from a distribution with mean equal to 12.

OneSampleZTestS,12,σ:

Standard Z-Test on One Sample
-----------------------------
Null Hypothesis:
Sample drawn from population with mean 12 and known standard deviation 5.28188
Alt. Hypothesis:
Sample drawn from population with mean not equal to 12 and known standard deviation 5.28188

Sample size:             100
Sample mean:             13.7517
Distribution:            Normal(0,1)
Computed statistic:      3.31636
Computed pvalue:         0.000911977
Confidence interval:     12.71643272 .. 14.78689098
                         (population mean)

Result: [Rejected]
There exists statistical evidence against the null hypothesis

 

Similarly, if we assume that the standard deviation is unknown, we can apply the one sample t-test on the same hypothesis - this time with a 90% confidence interval.

OneSampleTTestS,12,confidence=0.9:

Standard T-Test on One Sample
-----------------------------
Null Hypothesis:
Sample drawn from population with mean 12
Alt. Hypothesis:
Sample drawn from population with mean not equal to 12

Sample size:             100
Sample mean:             13.7517
Sample standard dev.:    5.14945
Distribution:            StudentT(99)
Computed statistic:      3.40165
Computed pvalue:         0.000967459
Confidence interval:     12.89665167 .. 14.60667203
                         (population mean)

Result: [Rejected]
There exists statistical evidence against the null hypothesis

Return to Index for Example Worksheets


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