 TwoSamplePairedTTest - Maple Help

Student[Statistics]

 TwoSamplePairedTTest
 apply the paired t-test for population means Calling Sequence TwoSamplePairedTTest(X1, X2, beta, confidence_option, output_option) Parameters

 X1 - first data sample X2 - second data sample beta - realcons; the test value for the difference between the two means 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 TwoSamplePairedTTest function computes the paired t-test upon datasets X1 and X2. This means that every entry of the population of X1 is related to an entry of the population of X2; in the samples, X1[i] is related to X2[i]; and the procedure tests whether the mean of the population of differences between related pairs, X1[i] minus X2[i], is equal to beta, under the assumption that these differences are normally distributed. No assumptions are made on the standard deviation.
 • 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.
 • 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. Examples

 > $\mathrm{with}\left({\mathrm{Student}}_{\mathrm{Statistics}}\right):$

Specify the data sample.

 > $X≔\left[9,10,8,4,8,3,0,10,15,9\right]:$
 > $Y≔\left[10,11,7,3,10,5,2,12,14,10\right]:$
 > $\mathrm{Mean}\left(X\right)-\mathrm{Mean}\left(Y\right)$
 ${-}\frac{{4}}{{5}}$ (1)

Calculate the paired t-test on a list of values.

 > $\mathrm{TwoSamplePairedTTest}\left(X,Y,1,\mathrm{confidence}=0.95\right)$
 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.32346015250714 Computed p-value:        .00192341172347674 Confidence Interval:     -1.7418108909393 .. .141810890939296                          (difference of population means)   Result: [Rejected] This statistical test provides evidence that the null hypothesis is false.
 $\left[{\mathrm{hypothesis}}{=}{\mathrm{false}}{,}{\mathrm{confidenceinterval}}{=}{-1.74181089093930}{..}{0.141810890939296}{,}{\mathrm{distribution}}{=}{\mathrm{StudentT}}{}\left({9}\right){,}{\mathrm{pvalue}}{=}{0.00192341172347674}{,}{\mathrm{statistic}}{=}{-4.32346015250714}\right]$ (2)

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

 > $\mathrm{TwoSamplePairedTTest}\left(X,Y,1,\mathrm{confidence}=0.95,\mathrm{output}=\mathrm{plot}\right)$ If the output=both option is included, then both a report and a plot will be returned.

 > $\mathrm{report},\mathrm{graph}≔\mathrm{TwoSamplePairedTTest}\left(X,Y,1,\mathrm{confidence}=0.95,\mathrm{output}=\mathrm{both}\right):$
 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.32346015250714 Computed p-value:        .00192341172347674 Confidence Interval:     -1.7418108909393 .. .141810890939296                          (difference of population means)   Result: [Rejected] This statistical test provides evidence that the null hypothesis is false. Histogram Type:  default Data Range:      -2 .. 1 Bin Width:       1/10 Number of Bins:  30 Frequency Scale: relative
 > $\mathrm{report}$
 $\left[{\mathrm{hypothesis}}{=}{\mathrm{false}}{,}{\mathrm{confidenceinterval}}{=}{-1.74181089093930}{..}{0.141810890939296}{,}{\mathrm{distribution}}{=}{\mathrm{StudentT}}{}\left({9}\right){,}{\mathrm{pvalue}}{=}{0.00192341172347674}{,}{\mathrm{statistic}}{=}{-4.32346015250714}\right]$ (3)
 > $\mathrm{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][TwoSamplePairedTTest] command was introduced in Maple 18.