Hypothesis Testing
Let be a random sample of size from the population with parameter space A hypothesis is a statement about the true value of
Let be a hypothesis. The hypothesis is a simple hypothesis if and only if it assigns a single value to so that it fully specifies the population The hypothesis is a composite hypothesis if and only if it states that takes a value in a set containing more than one value.
Let and be a partition of the parameter space into two complementary regions, so that and The null hypothesis is the hypothesis The alternative hypothesis is the hypothesis
Let be a null hypothesis and be a function. A test statistic is a statistic whose sampling distribution is known under the null hypothesis. The observed test statistic is the realised value at an observed random sample
Let and be null and alternative hypotheses and be a test statistic. A hypothesis test is a rule that rejects if and only if the observed test statistic lies in a specified set of values. A hypothesis test proceeds as follows:
- the null hypothesis is assumed to be true and a test statistic is chosen whose sampling distribution is known under
- if the observed test statistic lies sufficiently far into the tails of the sampling distribution of then the observed data are judged sufficiently unlikely under and is rejected.
Hypothesis tests have the following properties:
- the only decisions are rejecting or not rejecting and is never accepted;
- failing to reject is not evidence that is true, since when is small or the true value of lies in close to the sampling distributions of under and overlap heavily and is likely to fail to lie far enough into the tails even though is false.
Let be a null hypothesis, be a test statistic and A critical region of size is a set of values of in the tails of its sampling distribution such that the largest probability under that lies in is
For a simple null hypothesis the supremum is the single probability The hypothesis test with critical region rejects if and only if
Let be a test statistic. A two-sided test is a hypothesis test whose critical region lies in both the upper and lower tails of the sampling distribution of A one-sided test is a hypothesis test whose critical region lies in one tail of the sampling distribution of which is identified from the alternative hypothesis. For example, leads to a critical region in the upper tail.
Let be a null hypothesis, be a test statistic and be the observed test statistic. The -value of the observed random sample is the probability under that the test statistic takes a value at least as extreme as
- For a one-sided test in the upper tail,
- For a one-sided test in the lower tail,
- For a two-sided test with a sampling distribution of under that is symmetric about zero, Otherwise a common choice is
A small -value corresponds to a value of that is unlikely under and indicates that the data and are inconsistent. If the test statistic has a continuous distribution then under a simple null hypothesis the -value is a random variable by the probability integral transform, and rejecting when is a test of size
Let be a null hypothesis and be a critical region of size A type I error is the rejection of when is true. The probability of a type I error is the size of the test.
Let and be null and alternative hypotheses and be a critical region. A type II error is the failure to reject when is true. The probability of a type II error is written
Let and be null and alternative hypotheses and be a critical region. The power of the test is the probability of correctly rejecting when is true.
Let be a test statistic and be a critical region. The power function of the test is the probability of rejecting as a function of the true parameter value.
The power function has the following properties:
- the size of the test is
- the power against a particular alternative is
- tests of the same size are compared by their power functions on
Let and be simple hypotheses and be an observed random sample. The likelihood ratio of is the ratio of the likelihood under the alternative to the likelihood under the null.
Large values of the likelihood ratio indicate that the data are more probable under
Let and be hypotheses, and A hypothesis test is a most powerful test of size at if and only if no other test of size at most has greater power at
Let and be simple hypotheses, and be chosen so that The Neyman–Pearson lemma states that the test that rejects if and only if is the most powerful test of size at
Let be a null hypothesis, be a composite alternative hypothesis and A hypothesis test is a uniformly most powerful (UMP) test of size if and only if it is a most powerful test of size at every
Let be a parametric family with and be a statistic. The family has a monotone likelihood ratio in if and only if is a monotonically increasing function of whenever Exponential families have a monotone likelihood ratio in their natural statistic.
Let be a family with a monotone likelihood ratio in and be chosen so that The Karlin–Rubin theorem states that the one-sided test that rejects when is UMP of size for UMP tests do not exist for two-sided alternatives in general, since the most powerful test against differs from that against
Let and be hypotheses, be the maximum likelihood estimate and be the maximum likelihood estimate restricted to The likelihood ratio test statistic is the ratio of the largest likelihood attainable under to the largest likelihood attainable overall.
The likelihood ratio test is the hypothesis test that rejects for small values of
Let be specified by independent restrictions on the -dimensional parameter, so that has dimension and the regularity conditions hold. Wilks’ theorem states that under the transformed likelihood ratio test statistic converges in distribution to a chi-squared distribution with degrees of freedom.
Let be the -quantile of Wilks’ theorem gives the approximate critical region without deriving the exact sampling distribution. Many standard tests are exact or approximate likelihood ratio tests.
Let for a scalar parameter, be the maximum likelihood estimate and be the Fisher information. The Wald test statistic is the squared distance between the unrestricted estimate and the null value divided by its estimated variance.
The Wald test is the hypothesis test that rejects for large values of Under The Wald test needs only the unrestricted estimate.
Let for a scalar parameter, be the score and be the Fisher information. The score test statistic is the squared score of the sample at the null value divided by the Fisher information of the sample.
The score test or Lagrange multiplier test is the hypothesis test that rejects for large values of Under The score test measures how far the score at the null value is from zero, which it would be at the unrestricted maximum, and needs no maximisation. The likelihood ratio, Wald and score tests have the following properties:
- for a vector parameter with restrictions the Wald and score statistics are quadratic forms in the Fisher information matrix with limiting distribution
- the three tests are asymptotically equivalent under and against alternatives close to it, but can differ in finite samples;
- the Wald test is not invariant to reparametrisation whereas the other two are.
Let be a random sample of size from The sample mean and sample variance are independent, and their sampling distributions are as follows.
The standard tests for normal populations follow from these sampling distributions, each with its test statistic and sampling distribution under
- the -test for with known variance uses
- the one-sample -test for with unknown variance uses
- the two-sample -test for from independent samples of sizes and with a common variance uses the pooled variance and
- Welch’s -test is the two-sample -test without the common variance assumption, which uses an approximate distribution;
- the paired -test applies the one-sample -test to the differences of paired observations;
- the chi-squared test for a variance for uses
- the -test for equality of variances for uses
By the central limit theorem the - and -tests for means remain approximately valid for large samples from non-normal populations, whereas the tests for variances are sensitive to non-normality.
Let observations fall into categories with observed counts and be the counts expected under a hypothesised distribution that may depend on parameters estimated from the data. Pearson’s chi-squared test statistic is the sum of the squared differences between observed and expected counts divided by the expected counts.
Pearson’s chi-squared test is the hypothesis test that rejects for large values of Under Pearson’s chi-squared test has the following properties:
- as a goodness-of-fit test it assesses whether the data follow the hypothesised distribution;
- applied to an table of counts with expected counts computed from the row and column totals, it gives the chi-squared test of independence with degrees of freedom;
- it is an approximation to the likelihood ratio test for multinomial counts.
A non-parametric test is a hypothesis test that makes no parametric assumption about the population. The Kolmogorov–Smirnov test of is the non-parametric test that uses the statistic whose null distribution does not depend on The Wilcoxon tests are non-parametric tests that replace observations by their ranks.
Hypothesis tests and confidence intervals are dual: the set of values for which is not rejected at size is a confidence interval for and conversely is rejected at size if and only if lies outside a confidence interval. For example, the one-sample -test does not reject if and only if
Let be null hypotheses with -values of which an unknown are true. Multiple testing is the simultaneous testing of the hypotheses. Multiple testing has the following properties:
- if each hypothesis is tested at size then the expected number of true null hypotheses rejected is
- for independent tests the probability of at least one false rejection is which approaches one as grows.
Let be a family of null hypotheses. The family-wise error rate (FWER) is the probability of making at least one type I error across the family of tests.
A multiple testing procedure controls the FWER at level if and only if for every configuration of true and false null hypotheses.
Let be a family of null hypotheses with -values and The Bonferroni correction is the procedure that rejects if and only if The Bonferroni correction has the following properties:
- it controls the FWER at level under any dependence between the tests, since the probability of a union of events is at most the sum of their probabilities,
- it is conservative and loses power as grows.
Let be a family of null hypotheses with ordered -values and Holm’s procedure is the procedure that rejects the hypotheses corresponding to where is the smallest index with
so that each successive -value is compared with a less stringent threshold. Holm’s procedure controls the FWER at level under any dependence and rejects every hypothesis that the Bonferroni correction rejects, so it is uniformly more powerful.
Let be a family of null hypotheses tested by some procedure, be the number of rejected hypotheses and be the number of rejected hypotheses that are true null hypotheses. The rejected true null hypotheses are the false discoveries. The false discovery proportion is the fraction of rejections that are false discoveries, The false discovery rate (FDR) is the expectation of the false discovery proportion.
A multiple testing procedure controls the FDR at level if and only if for every configuration of true and false null hypotheses. FDR control has the following properties:
- it allows false rejections as long as they are on average a small fraction of all rejections, which is less strict than FWER control when is large;
- when all null hypotheses are true the FDR equals the FWER, so FDR control is weaker than FWER control.
Let be a family of null hypotheses with ordered -values and The Benjamini–Hochberg procedure is the procedure that finds the largest with
and rejects the hypotheses corresponding to rejecting none if no such exists. If the -values of the true null hypotheses are independent, or positively dependent in a specific sense, then the Benjamini–Hochberg procedure controls the FDR at level
The Benjamini–Yekutieli procedure is the Benjamini–Hochberg procedure with replaced by which controls the FDR under arbitrary dependence.
Multiple testing corrections only account for the tests that are actually performed, so selecting which hypotheses to test or to report after seeing the data invalidates the stated error rates.