apply the paired t-test for population means - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Statistics : Statistics Package : Tests : Statistics/TwoSamplePairedTTest

Statistics[TwoSamplePairedTTest] - apply the paired t-test for population means

Calling Sequence

TwoSamplePairedTTest(X1, X2, beta, options)

Parameters

X1

-

first data sample

X2

-

second data sample

beta

-

realcons; the test value for the difference between the two means

options

-

(optional) equation(s) of the form option=value where option is one of alternative, confidence, ignore, output, weights1 or weights2; specify options for the TwoSamplePairedTTest function

Description

• 

The TwoSamplePairedTTest function computes the paired t-test on datasets X1 and X2 (which have been constructed by paired sampling).  This calculation is used to determine the significance of the difference between sample means and an assumed difference in population means when the standard deviation of the population is unknown.

• 

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

• 

The second parameter X2 is the second data sample to use in the analysis.

• 

The third parameter beta is the assumed difference in population means (assumed population mean of X1 minus the assumed population mean of X2), specified as a real constant.

Options

  

The options argument can contain one or more of the options shown below.

• 

alternative='twotailed', 'lowertail', or 'uppertail'

  

This option is used to specify the type or interval used in the analysis, or similarly, the alternative hypothesis to consider when performing the analysis.

• 

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.

• 

ignore=truefalse

  

This option is used to specify how to handle non-numeric data. If ignore is set to true all non-numeric items in data will be ignored.

• 

output='report', 'statistic', 'pvalue', 'confidenceinterval', 'distribution', 'hypothesis', or list('statistic', 'pvalue', 'confidenceinterval', 'distribution', 'hypothesis')

  

This option is used to specify the desired format of the output from the function.  If 'report' is specified then a module containing all output from this test is returned.  If a single parameter name is specified other than 'report' then that quantity alone is returned.  If a list of parameter names is specified then a list containing those quantities in the specified order will be returned.

• 

weights=rtable

  

Vector of weights (one-dimensional rtable). If these weights are given, the TwoSamplePairedTTest function will scale each data point in X1 and X2 to have given weight. Note that the weights provided must have type realcons and the results are floating-point, even if the problem is specified with exact values. Both the data array and the weights array must have the same number of elements.

Notes

• 

This test generates a complete report of all calculations in the form of a userinfo message.  In order to access this report, specify infolevel[Statistics] := 1.

Examples

withStatistics:

infolevel[Statistics]:=1:

Specify the data sample.

X:=Array9,10,8,4,8,3,0,10,15,9:

Z:=Array10,11,7,3,10,5,2,12,14,10:

MeanXMeanZ

0.800000000000001

(1)

Calculate the paired t-test on an array of values.

TwoSamplePairedTTestX,Z,1,confidence=0.95

Standard T-Test with Paired Samples
-----------------------------------
Null Hypothesis:
Sample drawn from populations with difference of means equal to 1
Alt. Hypothesis:
Sample drawn from population with difference of means not equal to 1

Sample size:             10
Difference in means:     -0.8
Difference std. dev.:    1.31656
Distribution:            StudentT(9)
Computed statistic:      -4.32346
Computed pvalue:         0.00192341
Confidence interval:     -1.7418108909393 .. .141810890939296
                         (difference of population means)

Result: [Rejected]
This statistical test provides evidence that the null hypothesis is false

hypothesis=false,confidenceinterval=1.74181089093930..0.141810890939296,distribution=StudentT9,pvalue=0.00192341172347674,statistic=4.32346015250714

(2)

Calculate the lower tail paired t-test.

TwoSamplePairedTTestX,Z,1,confidence=0.95,alternative='lowertail'

Standard T-Test with Paired Samples
-----------------------------------
Null Hypothesis:
Sample drawn from populations with difference of means greater than 1
Alt. Hypothesis:
Sample drawn from population with difference of means less than 1

Sample size:             10
Difference in means:     -0.8
Difference std. dev.:    1.31656
Distribution:            StudentT(9)
Computed statistic:      -4.32346
Computed pvalue:         0.000961706
Confidence interval:     -infinity .. -.0368142919477125
                         (difference of population means)

Result: [Rejected]
This statistical test provides evidence that the null hypothesis is false

hypothesis=false,confidenceinterval=∞..0.0368142919477125,distribution=StudentT9,pvalue=0.000961705861738372,statistic=4.32346015250714

(3)

Calculate the upper tail paired t-test.

TwoSamplePairedTTestX,Z,1,confidence=0.95,alternative='uppertail'

Standard T-Test with Paired Samples
-----------------------------------
Null Hypothesis:
Sample drawn from populations with difference of means less than 1
Alt. Hypothesis:
Sample drawn from population with difference of means greater than 1

Sample size:             10
Difference in means:     -0.8
Difference std. dev.:    1.31656
Distribution:            StudentT(9)
Computed statistic:      -4.32346
Computed pvalue:         0.999038
Confidence interval:     -1.56318570805229 .. infinity
                         (difference of population means)

Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false

hypothesis=true,confidenceinterval=1.56318570805229..∞,distribution=StudentT9,pvalue=0.999038294138262,statistic=4.32346015250714

(4)

See Also

Statistics, Statistics[Computation], Statistics[Tests][OneSampleTTest], Statistics[Tests][TwoSampleTTest]

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