PairedTTest

PairedTTest[data]

tests whether the mean of data is zero.

PairedTTest[{data1,data2}]

tests whether the mean of data1 data2 is zero.

PairedTTest[dspec,μ0]

tests a location measure against μ0.

PairedTTest[dspec,μ0,"property"]

returns the value of "property".

Details and Options

  • PairedTTest tests the null hypothesis against the alternative hypothesis :
  • data
    {data1,data2}
  • where μ is the population mean for data and μ12 is the mean of the paired differences of the two datasets .
  • By default, a probability value or -value is returned.
  • A small -value suggests that it is unlikely that is true.
  • The data in dspec can be univariate {x1,x2,} or multivariate {{x1,y1,},{x2,y2,},}.
  • If two samples are given, they must be of equal length.
  • The argument μ0 can be a real number or a real vector with length equal to the dimension of the data.
  • PairedTTest[dspec,μ0,"HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
  • PairedTTest[dspec,μ0,"property"] can be used to directly give the value of "property".
  • Properties related to the reporting of test results include:
  • "DegreesOfFreedom"the degrees of freedom used in a test
    "PValue"list of -values
    "PValueTable"formatted table of -values
    "ShortTestConclusion"a short description of the conclusion of a test
    "TestConclusion"a description of the conclusion of a test
    "TestData"list of pairs of test statistics and -values
    "TestDataTable"formatted table of -values and test statistics
    "TestStatistic"list of test statistics
    "TestStatisticTable"formatted table of test statistics
  • PairedTTest is more powerful than the TTest when samples are matched.
  • For univariate samples, PairedTTest performs the Student test for matched pairs. The test statistic is assumed to follow a StudentTDistribution.
  • For multivariate samples, PairedTTest performs Hotelling's test for matched pairs. The test statistic is assumed to follow a HotellingTSquareDistribution.
  • The following options can be used:
  • AlternativeHypothesis"Unequal"the inequality for the alternative hypothesis
    SignificanceLevel0.05cutoff for diagnostics and reporting
    VerifyTestAssumptionsAutomaticwhat assumptions to verify
  • For the PairedTTest, a cutoff is chosen such that is rejected only if . The value of used for the "TestConclusion" and "ShortTestConclusion" properties is controlled by the SignificanceLevel option. This value is also used in diagnostic tests of assumptions, including tests for normality, equal variance, and symmetry. By default, is set to 0.05.
  • Named settings for VerifyTestAssumptions in PairedTTest include:
  • "Normality"verify that all data is normally distributed

Examples

open allclose all

Basic Examples  (3)

Test whether the mean of a population is zero:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

The full test table:

In[3]:=
Click for copyable input
Out[3]=

Test whether the means of two dependent populations differ:

In[1]:=
Click for copyable input

The mean of the differences:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

At the 0.05 level, the mean of the differenced data is not significantly different from 0:

In[4]:=
Click for copyable input
Out[4]=

Compare the locations of dependent multivariate populations:

In[1]:=
Click for copyable input

The mean of the differences:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

At the 0.05 level, the mean of the differenced data is not significantly different from 0:

In[4]:=
Click for copyable input
Out[4]=

Scope  (13)

Options  (8)

Applications  (1)

Properties & Relations  (6)

Possible Issues  (1)

Neat Examples  (1)

See Also

HypothesisTestData  LocationTest  LocationEquivalenceTest  VarianceTest  VarianceEquivalenceTest  DistributionFitTest  MannWhitneyTest  PairedZTest  SignTest  SignedRankTest  TTest  ZTest

Introduced in 2010
(8.0)