8.2 z-test
The -test is the simplest test to use, and is perhaps the most common. It is used when we have the following assumptions:
- We are modeling the data as a true value, , with uncertainty
- We are modeling the as a Normal distribution with known deviation, , as in .
- We are assuming independence between the measurements.
The model of the data is
where represents the “true” value. The posterior distribution for also follows a Normal distribution, with a smaller uncertainty, where is the number of data points.
To use the -test, we perform the following steps:
- Calculate our best estimate for , denoted as .
- Given the known uncertainty, of a single measurement, determine the range of credible values for within the uncertainty of the estimate for the observations, .
- Test to see if the credible range includes zero.
- If so, then the test passes, and we can be reasonably confident that the parameter is non-zero - that the effect is real.
- If the test fails, i.e. the credible range does not include zero, then under the model the possibility of a zero-effect cannot be reasonably excluded.
There are several scenarios where we use the -test, each with the same procedure, differing only in the method of estimating the “true” value .
- For independent observations, we have the best estimate given by the sample mean, and uncertainty related to the single-measurement deviation, , as
- When estimating a proportion, for a large number of events of which a fraction are successful, we have
- For smallish data sets, , where the uncertainty is not known,
where we replace the known from the previous case with an estimate using the sample standard deviation and an adjustment for small data set parameter ,
Adapted from Statistical Inference for Everyone, by Brian Blais (Bryant University), licensed under CC BY-SA 4.0 (dual-licensed under the GNU FDL 1.2 or later; this adaptation uses the CC BY-SA grant). Changes were made; this adaptation is distributed under the same license. License: CC-BY-SA-4.0.