Main Page: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
[[Image:Finite element solution.svg|right|thumb|A solution to a discretized partial differential equation, obtained with the [[finite element method]].]]
{{DISPLAYTITLE:''Z''-test}}
In [[mathematics]], '''discretization''' concerns the process of transferring [[continuous function|continuous]] models and equations into [[wiktionary:discrete|discrete]] counterparts. This process is usually carried out as a first step toward making them suitable for numerical evaluation and implementation on digital computers. Processing on a digital computer requires another process called [[Quantization (signal processing)|quantization]]. '''Dichotomization''' is the special case of discretization in which the number of discrete classes is 2, which can approximate a continuous variable as a [[binary variable]] (creating a [[dichotomy]] for [[conceptual model|modeling]] purposes).  
A '''''Z''-test''' is any [[statistics|statistical]] [[statistical hypothesis testing|test]] for which the [[probability distribution|distribution]] of the [[test statistic]] under the [[null hypothesis]] can be approximated by a [[normal distribution]]. Because of the [[central limit theorem]], many test statistics are approximately normally distributed for large samples. For each significance level, the ''Z''-test has a single critical value (for example, 1.96 for 5% two tailed) which makes it more convenient than the [[Student's t-test|Student's ''t''-test]] which has separate critical values for each sample size. Therefore, many statistical tests can be conveniently performed as approximate ''Z''-tests if the sample size is large or the population variance known. If the population variance is unknown (and therefore has to be estimated from the sample itself) and the sample size is not large (n < 30), the Student's ''t''-test may be more appropriate.


* [[Euler–Maruyama method]]
If ''T'' is a statistic that is approximately normally distributed under the null hypothesis, the next step in performing a ''Z''-test is to estimate the [[expected value]] θ of ''T'' under the null hypothesis, and then obtain an estimate ''s'' of the [[standard deviation]] of ''T''. After that the [[standard score]] ''Z''&nbsp;=&nbsp;(''T''&nbsp;&minus;&nbsp;θ)&nbsp;/&nbsp;''s'' is calculated, from which [[one- and two-tailed tests|one-tailed and two-tailed]] [[p-values|''p''-values]] can be calculated as Φ(&minus;''Z'') (for upper-tailed tests), Φ(''Z'') (for lower-tailed tests) and 2Φ(&minus;|''Z''|) (for two-tailed tests) where Φ is the standard [[normal distribution|normal]] [[cumulative distribution function]].
* [[Zero-order hold]]


Discretization is also related to [[discrete mathematics]], and is an important component of [[granular computing]].  In this context, ''discretization'' may also refer to modification of variable of category ''granularity'', as when multiple discrete variables are aggregated or multiple discrete categories fused.
==Use in location testing==


Whenever continuous data is '''discretized''', there is always some amount of [[discretization error]]. The goal is to reduce the amount to a level considered [[wikt:negligible|negligible]] for the [[conceptual model|modeling]] purposes at hand.
The term "''Z''-test" is often used to refer specifically to the [[location test|one-sample location test]] comparing the mean of a set of measurements to a given constant. If the observed data ''X''<sub>1</sub>, ..., ''X''<sub>n</sub> are (i) uncorrelated, (ii) have a common mean μ, and (iii) have a common variance σ<sup>2</sup>, then the sample average <span style="text-decoration: overline">''X''</span> has mean μ and variance σ<sup>2</sup>&nbsp;/&nbsp;''n''. If our null hypothesis is that the mean value of the population is a given number μ<sub>0</sub>, we can use <span style="text-decoration: overline">''X''</span>&nbsp;&minus;μ<sub>0</sub> as a test-statistic, rejecting the null hypothesis if <span style="text-decoration: overline">''X''</span>&nbsp;&minus;μ<sub>0</sub> is large.


== Discretization of linear state space models ==
To calculate the standardized statistic ''Z''&nbsp;=&nbsp;(<span style="text-decoration: overline">''X''</span> &nbsp;&minus;&nbsp; μ<sub>0</sub>)&nbsp;/&nbsp;''s'', we need to either know or have an approximate value for σ<sup>2</sup>, from which we can calculate ''s''<sup>2</sup>&nbsp;=&nbsp;σ<sup>2</sup>&nbsp;/&nbsp;''n''. In some applications, σ<sup>2</sup> is known, but this is uncommon. If the sample size is moderate or large, we can substitute the [[Sample_variance#Population_variance_and_sample_variance|sample variance]] for σ<sup>2</sup>, giving a ''plug-in'' test. The resulting test will not be an exact ''Z''-test since the uncertainty in the sample variance is not accounted for &mdash; however, it will be a good approximation unless the sample size is small. A [[t-test|''t''-test]] can be used to account for the uncertainty in the sample variance when the sample size is small and the data are exactly [[normal distribution|normal]]. There is no universal constant at which the sample size is generally considered large enough to justify use of the plug-in test. Typical rules of thumb range from 20 to 50 samples. For larger sample sizes, the ''t''-test procedure gives almost identical ''p''-values as the ''Z''-test procedure.
Discretization is also concerned with the transformation of continuous [[differential equation]]s into discrete [[difference equations]], suitable for [[Numerical analysis|numerical computing]].


The following continuous-time [[State space (controls)|state space model]]
Other location tests that can be performed as ''Z''-tests are the two-sample location test and the [[paired difference test]].


:<math>\dot{\mathbf{x}}(t) = \mathbf A \mathbf{x}(t) + \mathbf B \mathbf{u}(t) + \mathbf{w}(t)</math>
== Conditions ==
:<math>\mathbf{y}(t) = \mathbf C \mathbf{x}(t) + \mathbf D \mathbf{u}(t) + \mathbf{v}(t)</math>


where ''v'' and ''w'' are continuous zero-mean [[white noise]] sources with [[covariance]]s
For the ''Z''-test to be applicable, certain conditions must be met.


:<math>\mathbf{w}(t) \sim N(0,\mathbf Q)</math>
* [[Nuisance parameter]]s should be known, or estimated with high accuracy (an example of a nuisance parameter would be the [[standard deviation]] in a one-sample location test). ''Z''-tests focus on a single parameter, and treat all other unknown parameters as being fixed at their true values. In practice, due to [[Slutsky's theorem]], "plugging in" [[consistent estimator|consistent]] estimates of nuisance parameters can be justified. However if the sample size is not large enough for these estimates to be reasonably accurate, the ''Z''-test may not perform well.
:<math>\mathbf{v}(t) \sim N(0,\mathbf R)</math>


can be discretized, assuming [[zero-order hold]] for the input ''u'' and continuous integration for the noise ''v'', to
* The test statistic should follow a [[normal distribution]]. Generally, one appeals to the [[central limit theorem]] to justify assuming that a test statistic varies normally. There is a great deal of statistical research on the question of when a test statistic varies approximately normally. If the variation of the test statistic is strongly non-normal, a ''Z''-test should not be used.


:<math>\mathbf{x}[k+1] = \mathbf A_d \mathbf{x}[k] + \mathbf B_d \mathbf{u}[k] + \mathbf{w}[k]</math>
If estimates of nuisance parameters are plugged in as discussed above, it is important to use estimates appropriate for the way the data were [[sampling (statistics)|sampled]]. In the special case of ''Z''-tests for the one or two sample location problem, the usual sample [[standard deviation]] is only appropriate if the data were collected as an independent sample.
:<math>\mathbf{y}[k] = \mathbf C_d \mathbf{x}[k] + \mathbf D_d \mathbf{u}[k] +  \mathbf{v}[k]</math>


with covariances
In some situations, it is possible to devise a test that properly accounts for the variation in plug-in estimates of nuisance parameters. In the case of one and two sample location problems, a [[t-test|''t''-test]] does this.


:<math>\mathbf{w}[k] \sim N(0,\mathbf Q_d)</math>
== Example ==
:<math>\mathbf{v}[k] \sim N(0,\mathbf R_d)</math>


where
Suppose that in a particular geographic region, the mean and standard deviation of scores on a reading test are 100 points, and 12 points, respectively. Our interest is in the scores of 55 students in a particular school who received a mean score of 96. We can ask whether this mean score is significantly lower than the regional mean &mdash; that is, are the students in this school comparable to a simple random sample of 55 students from the region as a whole, or are their scores surprisingly low?


:<math>\mathbf A_d = e^{\mathbf A T} = \mathcal{L}^{-1}\{(s\mathbf I - \mathbf A)^{-1}\}_{t=T} </math>
We begin by calculating the [[standard error (statistics)|standard error]] of the mean:
:<math>\mathbf B_d = \left( \int_{\tau=0}^{T}e^{\mathbf A \tau}d\tau \right) \mathbf B = \mathbf A^{-1}(\mathbf A_d - I)\mathbf B </math>, if <math>\mathbf A</math> is [[Invertible matrix|nonsingular]]
:<math>\mathbf C_d = \mathbf C </math>
:<math>\mathbf D_d = \mathbf D </math>
:<math>\mathbf Q_d = \int_{\tau=0}^{T} e^{\mathbf A \tau} \mathbf Q e^{\mathbf A^T \tau}  d\tau </math>
:<math>\mathbf R_d = \frac{1}{T} \mathbf R </math>


and <math>T</math> is the sample time, although <math>\mathbf A^T</math> is the transposed matrix of <math>\mathbf A</math>.
:<math>\mathrm{SE} = \frac{\sigma}{\sqrt n} = \frac{12}{\sqrt{55}} = \frac{12}{7.42} = 1.62 \,\!</math>


A clever trick to compute ''Ad'' and ''Bd'' in one step is by utilizing the following property, p.&nbsp;215:<ref>Raymond DeCarlo: ''Linear Systems: A State Variable Approach with Numerical Implementation'', Prentice Hall, NJ, 1989</ref>
where <math>{\sigma}</math> is the population standard deviation
:<math>e^{\begin{bmatrix} \mathbf{A} & \mathbf{B} \\
                \mathbf{0} & \mathbf{0} \end{bmatrix} T} = \begin{bmatrix} \mathbf{M_{11}} & \mathbf{M_{12}} \\
                                                            \mathbf{0} & \mathbf{I} \end{bmatrix}</math>


and then having
Next we calculate the [[standard score|''z''-score]], which is the distance from the sample mean to the population mean in units of the standard error:
:<math>\mathbf A_d = \mathbf M_{11}</math>
:<math>\mathbf B_d = \mathbf M_{12}</math>


=== Discretization of process noise ===
:<math>z = \frac{M - \mu}{\mathrm{SE}} = \frac{96 - 100}{1.62} = -2.47 \,\!</math>
Numerical evaluation of <math>\mathbf{Q}_d</math> is a bit trickier due to the matrix exponential integral. It can, however, be computed by first constructing a matrix, and computing the exponential of it (Van Loan, 1978):
:<math> \mathbf{F} =  
\begin{bmatrix} -\mathbf{A} & \mathbf{Q} \\
                \mathbf{0} & \mathbf{A}^T \end{bmatrix} T</math>
:<math> \mathbf{G} = e^\mathbf{F} =
\begin{bmatrix} \dots & \mathbf{A}_d^{-1}\mathbf{Q}_d \\
          \mathbf{0} & \mathbf{A}_d^T            \end{bmatrix}.</math>
The discretized process noise is then evaluated by multiplying the transpose of the lower-right partition of '''G''' with the  upper-right partition of '''G''':
:<math>\mathbf{Q}_d = (\mathbf{A}_d^T)^T (\mathbf{A}_d^{-1}\mathbf{Q}_d). </math>


=== Derivation ===
In this example, we treat the population mean and variance as known, which would be appropriate if all students in the region were tested. When population parameters are unknown, a t test should be conducted instead.
Starting with the continuous model
:<math>\mathbf{\dot{x}}(t) = \mathbf A\mathbf x(t) + \mathbf B \mathbf u(t)</math>
we know that the [[matrix exponential]] is
:<math>\frac{d}{dt}e^{\mathbf At} = \mathbf A e^{\mathbf At} = e^{\mathbf At} \mathbf A</math>
and by premultiplying the model we get
:<math>e^{-\mathbf At} \mathbf{\dot{x}}(t) = e^{-\mathbf At} \mathbf A\mathbf x(t) + e^{-\mathbf At} \mathbf B\mathbf u(t)</math>
which we recognize as
:<math>\frac{d}{dt}(e^{-\mathbf At}\mathbf x(t)) = e^{-\mathbf At} \mathbf B\mathbf u(t)</math>
and by integrating..
:<math>e^{-\mathbf At}\mathbf x(t) - e^0\mathbf x(0) = \int_0^t e^{-\mathbf A\tau}\mathbf B\mathbf u(\tau) d\tau</math>
:<math>\mathbf x(t) = e^{\mathbf At}\mathbf x(0) + \int_0^t e^{\mathbf A(t-\tau)} \mathbf B\mathbf u(\tau) d \tau</math>
which is an analytical solution to the continuous model.


Now we want to discretise the above expression. We assume that u is [[mathematical constant|constant]] during each timestep.
The classroom mean score is 96, which is −2.47 standard error units from the population mean of 100. Looking up the ''z''-score in a table of the standard [[normal distribution]], we find that the probability of observing a standard normal value below -2.47 is approximately 0.5 - 0.4932 = 0.0068. This is the [[one-tailed|one-sided]] [[p-value|''p''-value]] for the null hypothesis that the 55 students are comparable to a simple random sample from the population of all test-takers. The two-sided ''p''-value is approximately 0.014 (twice the one-sided ''p''-value).
:<math>\mathbf x[k] \ \stackrel{\mathrm{def}}{=}\  \mathbf x(kT)</math>
:<math>\mathbf x[k] = e^{\mathbf AkT}\mathbf x(0) + \int_0^{kT} e^{\mathbf A(kT-\tau)} \mathbf B\mathbf u(\tau) d \tau</math>
:<math>\mathbf x[k+1] = e^{\mathbf A(k+1)T}\mathbf x(0) + \int_0^{(k+1)T} e^{\mathbf A((k+1)T-\tau)} \mathbf B\mathbf u(\tau) d \tau</math>
:<math>\mathbf x[k+1] = e^{\mathbf AT} \left[  e^{\mathbf AkT}\mathbf x(0) + \int_0^{kT} e^{\mathbf A(kT-\tau)} \mathbf B\mathbf u(\tau) d \tau \right]+ \int_{kT}^{(k+1)T} e^{\mathbf A(kT+T-\tau)} \mathbf B\mathbf u(\tau) d \tau</math>
We recognize the bracketed expression as <math>\mathbf x[k]</math>, and the second term can be simplified by substituting <math>v = kT + T - \tau</math>. We also assume that <math>\mathbf u</math> is constant during the [[integral]], which in turn yields
:<math> \begin{matrix} \mathbf x[k+1]&=& e^{\mathbf AT}\mathbf x[k] + \left( \int_0^T e^{\mathbf Av} dv \right) \mathbf B\mathbf u[k] \\
&=&e^{\mathbf AT}\mathbf x[k] + \mathbf A^{-1}\left(e^{\mathbf AT}-\mathbf I \right) \mathbf B\mathbf u[k] \end{matrix}</math>
which is an exact solution to the discretization problem.


=== Approximations ===
Another way of stating things is that with probability 1&nbsp;&minus;&nbsp;0.014&nbsp;=&nbsp;0.986, a simple random sample of 55 students would have a mean test score within 4 units of the population mean. We could also say that with 98.6% confidence we reject the [[null hypothesis]] that the 55 test takers are comparable to a simple random sample from the population of test-takers.
Exact discretization may sometimes be intractable due to the heavy matrix exponential and integral operations involved. It is much easier to calculate an approximate discrete model, based on that for small timesteps <math>e^{\mathbf AT} \approx \mathbf I + \mathbf A T</math>. The approximate solution then becomes:
:<math>\mathbf x[k+1] \approx (\mathbf I + \mathbf AT) \mathbf x[k] + T\mathbf B \mathbf u[k] </math>


Other possible approximations are <math>e^{\mathbf AT} \approx \left( \mathbf I - \mathbf A T \right)^{-1}</math> and <math>e^{\mathbf AT} \approx \left( \mathbf I +\frac{1}{2}  \mathbf A T \right) \left( \mathbf I - \frac{1}{2} \mathbf A T \right)^{-1}</math>. Each of them have different stability properties. The last one is known as the bilinear transform, or Tustin transform, and preserves the (in)stability of the continuous-time system.
The ''Z''-test tells us that the 55 students of interest have an unusually low mean test score compared to most simple random samples of similar size from the population of test-takers. A deficiency of this analysis is that it does not consider whether the [[effect size]] of 4 points is meaningful. If instead of a classroom, we considered a subregion containing 900 students whose mean score was 99, nearly the same ''z''-score and ''p''-value would be observed. This shows that if the sample size is large enough, very small differences from the null value can be highly statistically significant. See [[statistical hypothesis testing]] for further discussion of this issue.


== Discretization of continuous features ==
== ''Z''-tests other than location tests ==


{{Main|Discretization of continuous features}}
Location tests are the most familiar ''Z''-tests. Another class of ''Z''-tests arises in [[maximum likelihood]] estimation of the [[parameter]]s in a [[parametric statistics|parametric]] [[statistical model]]. Maximum likelihood estimates are approximately normal under certain conditions, and their asymptotic variance can be calculated in terms of the [[Fisher information]]. The maximum likelihood estimate divided by its standard error can be used as a test statistic for the null hypothesis that the population value of the parameter equals zero. More generally, if <math>\hat{\theta}</math> is the maximum likelihood estimate of a parameter θ, and θ<sub>0</sub> is the value of θ under the null hypothesis,
In [[statistics]] and machine learning, '''discretization''' refers to the process of converting continuous features or variables to discretized or nominal features. This can be useful when creating probability mass functions.


==See also==
:<math>
*[[Discrete space]]
(\hat{\theta}-\theta_0)/{\rm SE}(\hat{\theta})
*[[Time-scale calculus]]
</math>
*[[Discrete event simulation]]
*[[Stochastic simulation]]
*[[Finite volume method for unsteady flow]]
*[[Properties of discretization schemes]]


== References ==
can be used as a ''Z''-test statistic.
<references/>
* {{cite book|author=Robert Grover Brown & Patrick Y. C. Hwang|title=Introduction to random signals and applied Kalman filtering|edition=3rd|isbn=978-0471128397}}
* {{cite book|publisher=Saunders College Publishing|location=Philadelphia, PA, USA|year=1984|author=Chi-Tsong Chen|title=Linear System Theory and Design|isbn=0030716918}}
* {{cite journal|author=C. Van Loan|title=Computing integrals involving the matrix exponential|doi=10.1109/TAC.1978.1101743|journal=IEEE Transactions on Automatic
Control|volume=23|issue=3|pages=395–404|date=Jun 1978}}
* {{cite book|author=R.H. Middleton & G.C. Goodwin |title=Digital control and estimation: a unified approach|year=1990|page=33f|isbn=0132116650}}


==External links==
When using a ''Z''-test for maximum likelihood estimates, it is important to be aware that the normal approximation may be poor if the sample size is not sufficiently large. Although there is no simple, universal rule stating how large the sample size must be to use a ''Z''-test, [[Monte Carlo method|simulation]] can give a good idea as to whether a ''Z''-test is appropriate in a given situation.
{{sisterlinks}}


[[Category:Numerical analysis]]
''Z''-tests are employed whenever it can be argued that a test statistic follows a normal distribution under the null hypothesis of interest. Many [[non-parametric statistics|non-parametric]] test statistics, such as [[U statistic]]s, are approximately normal for large enough sample sizes, and hence are often performed as ''Z''-tests.
[[Category:Applied mathematics]]
[[Category:Functional analysis]]
[[Category:Iterative methods]]
[[Category:Control theory]]


[[de:Diskretisierung]]
== See also ==
[[hr:Diskretizacija]]
* [[Normal distribution]]
[[it:Discretizzazione]]
* NormDis, normal probability distribution calculator
[[pl:Dyskretyzacja (matematyka)]]
* [[Standard normal table]]
[[zh:离散化]]
* [[Standard score]]
* [[Student's t-test|Student's ''t''-test]]
 
==References==
{{No footnotes|date=November 2009}}
* Sprinthall, R.C. (2011) Basic Statistical Analysis. 9th Edition. Pearson Education Group: 672 pp.
 
{{Statistics}}
 
[[Category:Statistical tests]]
[[Category:Normal distribution]]

Revision as of 11:36, 11 August 2014

A Z-test is any statistical test for which the distribution of the test statistic under the null hypothesis can be approximated by a normal distribution. Because of the central limit theorem, many test statistics are approximately normally distributed for large samples. For each significance level, the Z-test has a single critical value (for example, 1.96 for 5% two tailed) which makes it more convenient than the Student's t-test which has separate critical values for each sample size. Therefore, many statistical tests can be conveniently performed as approximate Z-tests if the sample size is large or the population variance known. If the population variance is unknown (and therefore has to be estimated from the sample itself) and the sample size is not large (n < 30), the Student's t-test may be more appropriate.

If T is a statistic that is approximately normally distributed under the null hypothesis, the next step in performing a Z-test is to estimate the expected value θ of T under the null hypothesis, and then obtain an estimate s of the standard deviation of T. After that the standard score Z = (T − θ) / s is calculated, from which one-tailed and two-tailed p-values can be calculated as Φ(−Z) (for upper-tailed tests), Φ(Z) (for lower-tailed tests) and 2Φ(−|Z|) (for two-tailed tests) where Φ is the standard normal cumulative distribution function.

Use in location testing

The term "Z-test" is often used to refer specifically to the one-sample location test comparing the mean of a set of measurements to a given constant. If the observed data X1, ..., Xn are (i) uncorrelated, (ii) have a common mean μ, and (iii) have a common variance σ2, then the sample average X has mean μ and variance σ2 / n. If our null hypothesis is that the mean value of the population is a given number μ0, we can use X −μ0 as a test-statistic, rejecting the null hypothesis if X −μ0 is large.

To calculate the standardized statistic Z = (X  −  μ0) / s, we need to either know or have an approximate value for σ2, from which we can calculate s2 = σ2 / n. In some applications, σ2 is known, but this is uncommon. If the sample size is moderate or large, we can substitute the sample variance for σ2, giving a plug-in test. The resulting test will not be an exact Z-test since the uncertainty in the sample variance is not accounted for — however, it will be a good approximation unless the sample size is small. A t-test can be used to account for the uncertainty in the sample variance when the sample size is small and the data are exactly normal. There is no universal constant at which the sample size is generally considered large enough to justify use of the plug-in test. Typical rules of thumb range from 20 to 50 samples. For larger sample sizes, the t-test procedure gives almost identical p-values as the Z-test procedure.

Other location tests that can be performed as Z-tests are the two-sample location test and the paired difference test.

Conditions

For the Z-test to be applicable, certain conditions must be met.

  • Nuisance parameters should be known, or estimated with high accuracy (an example of a nuisance parameter would be the standard deviation in a one-sample location test). Z-tests focus on a single parameter, and treat all other unknown parameters as being fixed at their true values. In practice, due to Slutsky's theorem, "plugging in" consistent estimates of nuisance parameters can be justified. However if the sample size is not large enough for these estimates to be reasonably accurate, the Z-test may not perform well.
  • The test statistic should follow a normal distribution. Generally, one appeals to the central limit theorem to justify assuming that a test statistic varies normally. There is a great deal of statistical research on the question of when a test statistic varies approximately normally. If the variation of the test statistic is strongly non-normal, a Z-test should not be used.

If estimates of nuisance parameters are plugged in as discussed above, it is important to use estimates appropriate for the way the data were sampled. In the special case of Z-tests for the one or two sample location problem, the usual sample standard deviation is only appropriate if the data were collected as an independent sample.

In some situations, it is possible to devise a test that properly accounts for the variation in plug-in estimates of nuisance parameters. In the case of one and two sample location problems, a t-test does this.

Example

Suppose that in a particular geographic region, the mean and standard deviation of scores on a reading test are 100 points, and 12 points, respectively. Our interest is in the scores of 55 students in a particular school who received a mean score of 96. We can ask whether this mean score is significantly lower than the regional mean — that is, are the students in this school comparable to a simple random sample of 55 students from the region as a whole, or are their scores surprisingly low?

We begin by calculating the standard error of the mean:

where is the population standard deviation

Next we calculate the z-score, which is the distance from the sample mean to the population mean in units of the standard error:

In this example, we treat the population mean and variance as known, which would be appropriate if all students in the region were tested. When population parameters are unknown, a t test should be conducted instead.

The classroom mean score is 96, which is −2.47 standard error units from the population mean of 100. Looking up the z-score in a table of the standard normal distribution, we find that the probability of observing a standard normal value below -2.47 is approximately 0.5 - 0.4932 = 0.0068. This is the one-sided p-value for the null hypothesis that the 55 students are comparable to a simple random sample from the population of all test-takers. The two-sided p-value is approximately 0.014 (twice the one-sided p-value).

Another way of stating things is that with probability 1 − 0.014 = 0.986, a simple random sample of 55 students would have a mean test score within 4 units of the population mean. We could also say that with 98.6% confidence we reject the null hypothesis that the 55 test takers are comparable to a simple random sample from the population of test-takers.

The Z-test tells us that the 55 students of interest have an unusually low mean test score compared to most simple random samples of similar size from the population of test-takers. A deficiency of this analysis is that it does not consider whether the effect size of 4 points is meaningful. If instead of a classroom, we considered a subregion containing 900 students whose mean score was 99, nearly the same z-score and p-value would be observed. This shows that if the sample size is large enough, very small differences from the null value can be highly statistically significant. See statistical hypothesis testing for further discussion of this issue.

Z-tests other than location tests

Location tests are the most familiar Z-tests. Another class of Z-tests arises in maximum likelihood estimation of the parameters in a parametric statistical model. Maximum likelihood estimates are approximately normal under certain conditions, and their asymptotic variance can be calculated in terms of the Fisher information. The maximum likelihood estimate divided by its standard error can be used as a test statistic for the null hypothesis that the population value of the parameter equals zero. More generally, if is the maximum likelihood estimate of a parameter θ, and θ0 is the value of θ under the null hypothesis,

can be used as a Z-test statistic.

When using a Z-test for maximum likelihood estimates, it is important to be aware that the normal approximation may be poor if the sample size is not sufficiently large. Although there is no simple, universal rule stating how large the sample size must be to use a Z-test, simulation can give a good idea as to whether a Z-test is appropriate in a given situation.

Z-tests are employed whenever it can be argued that a test statistic follows a normal distribution under the null hypothesis of interest. Many non-parametric test statistics, such as U statistics, are approximately normal for large enough sample sizes, and hence are often performed as Z-tests.

See also

References

Template:No footnotes

  • Sprinthall, R.C. (2011) Basic Statistical Analysis. 9th Edition. Pearson Education Group: 672 pp.

Template:Statistics