PairedZTest
PairedZTest[data]
tests whether the mean of the data is zero.
PairedZTest[{data_{1},data_{2}}]
tests whether the means of data_{1} and data_{2} are equal.
PairedZTest[dspec,σ]
tests for zero or equal means assuming a population variance σ.
PairedZTest[dspec,σ,μ_{0}]
tests the mean against μ_{0}.
PairedZTest[dspec,σ,μ_{0},"property"]
returns the value of "property".
Details and Options
 Given data_{1} and data_{2}, PairedZTest performs a test on the paired differences of the two datasets.
 PairedZTest tests the null hypothesis against the alternative hypothesis :

data {data_{1},data_{2}}  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 {x_{1},x_{2},…} or multivariate {{x_{1},y_{1},…},{x_{2},y_{2},…},…}.
 The argument σ can be any positive real number or a positive definite matrix with dimension equal to the dimension of data.
 The argument μ_{0} can be a real number or a real vector with length equal to the dimension of the data.
 PairedZTest assumes that the data is normally distributed and that the variance is known and not estimated from the data.
 If variances or covariance matrices are not provided, PairedZTest treats the sample estimate as the known variance or covariance.
 PairedZTest[dspec,σ,μ_{0},"HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
 PairedZTest[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 of a test "PValue" list of values "PValueTable" formatted table of values "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  If a known variance σ is not provided, PairedZTest performs a test assuming the sample variance is the known variance for univariate data and Hotelling's test assuming the sample covariance is the known covariance for multivariate data.
 Options include:

AlternativeHypothesis "Unequal" the inequality for the alternative hypothesis SignificanceLevel 0.05 cutoff for diagnostics and reporting VerifyTestAssumptions Automatic what assumptions to verify  For tests of location, a cutoff is chosen such that is rejected if and 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 PairedZTest include:

"Normality" verify that all data is normally distributed
Examples
open allclose allBasic Examples (3)
Test whether the mean of a population is zero:
Test whether the means of two dependent populations differ:
At the 0.05 level, the mean of the differenced data is not significantly different from 0:
Compare the locations of dependent multivariate populations:
At the 0.05 level, the mean of the differenced data is not significantly different from 0:
Scope (13)
Testing (10)
The values are typically large when the mean is close to μ_{0}:
The values are typically small when the location is far from μ_{0}:
Using Automatic is equivalent to testing for a mean of zero:
The values are typically large when the mean is close to μ_{0}:
The values are typically small when the location is far from μ_{0}:
Test whether the mean vector of a multivariate population is the zero vector:
Alternatively, test against {0.1,0,0.05,0}:
Test whether the mean of differenced datasets is zero:
The values are generally small when the mean is not zero:
The values are generally large when the mean is zero:
Test whether the mean of differenced data is 3:
The order of the datasets affects the test results:
Test whether the mean vector of differenced multivariate datasets is the zero vector:
Alternatively, test against {1,0,1,0}:
Create a HypothesisTestData object for repeated property extraction:
The properties available for extraction:
Extract some properties from a HypothesisTestData object:
The value and test statistic:
Options (8)
AlternativeHypothesis (3)
SignificanceLevel (2)
VerifyTestAssumptions (3)
By default, normality is tested:
The result is the same, but a warning is issued:
Alternatively, use All:
Set the normality assumption to True:
Bypassing diagnostic tests can save compute time:
It is often useful to bypass diagnostic tests for simulation purposes:
The assumptions of the test hold by design, so a great deal of time can be saved:
Applications (1)
On average, a person's arm span is approximately equal to his or her height. A college rowing team was measured with the expectation that their arm spans would be significantly greater than their heights. Assume that the standard deviation for the height and arm span of the adult population is 0.4 ft.:
An estimate of the distribution for the difference in arm span and height:
The rowing team's arm spans are significantly greater than their heights:
You might also be interested in the ratio of arm span to height:
The PairedZTest should not be used to test this since the ratio of two normal random variables is not normal:
Properties & Relations (6)
PairedZTest is equivalent to a ZTest for a single dataset:
For two datasets, the PairedZTest is equivalent to a ZTest of the paired differences:
If the variance of the population is unknown, the less powerful PairedTTest should be used:
The probability that the PairedZTest will return a value smaller than the PairedTTest:
If the data can be paired, the PairedZTest is more powerful than the ZTest:
The paired test detects a significant difference where the unpaired test does not:
PairedZTest works with the values only when the input is a TimeSeries:
PairedZTest works with all the values together when the input is a TemporalData:
Possible Issues (1)
Text
Wolfram Research (2010), PairedZTest, Wolfram Language function, https://reference.wolfram.com/language/ref/PairedZTest.html.
BibTeX
BibLaTeX
CMS
Wolfram Language. 2010. "PairedZTest." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PairedZTest.html.
APA
Wolfram Language. (2010). PairedZTest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PairedZTest.html