Lably
Skip to content

Statistical hypothesis test

Method of statistical inference

  • 49 min read
  • 16 chapters

Learn it on Lably

Definition of terms

The goal of a hypothesis test is to establish whether certain properties of a statistical population are true by examining sample data. Typically, the population is modelled by a random variable whose distribution has unknown parameters. For example, a medical trial may wish to establish whether a particular drug is effective in treating high blood pressure, with "the change in blood pressure observed in a patient who takes the drug" being the random variable. An example hypothesis could be "the mean change in blood pressure is zero" or "the mean change in blood pressure is negative". In general, any statement about the parameters describing a population can be a hypothesis (but not a statement about the sample).

The test compares two hypotheses: a default null hypothesis (denoted H0) and its negation, the alternative hypothesis (H1). It is usually consistent with the research hypothesis because it is constructed from literature review, previous studies, etc. However, the research hypothesis is sometimes consistent with the null hypothesis. The null hypothesis and alternative hypothesis are two mutually exclusive statements.

"The statement being tested in a test of statistical significance is called the 'null hypothesis'. The test of significance is designed to assess the strength of the evidence against the null hypothesis. Usually, the null hypothesis is a statement of 'no effect' or 'no difference'."

If the sample data are consistent with the null hypothesis, then you do not reject the null hypothesis; if the sample data are inconsistent with the null hypothesis, then you reject the null hypothesis and conclude that the alternative hypothesis is true.

Typically the test will select a null hypothesis that the intervention being studied has no effect, or that the population parameter takes some "obvious" value. A test statistic is computed from the given sample data, and the tester calculates the conditional probability of observing a value at least this extreme, supposing the null hypothesis is true. If this probability (called the p-value) is less than, or equal to, the significance level of the test (denoted α), then the null hypothesis is rejected. The test does not conclude that the null hypothesis is false, or that the probability that the null hypothesis is true is less than α.

Because it is usually impossible to definitely establish whether the hypothesis being tested is true or false from a sample, the conclusion of a hypothesis test is not certain to be correct. There are two possible classes of error:

  • A type I error, in which the null hypothesis is rejected despite the null hypothesis being true, with probability α=P(reject H0|H0). This is the same as the significance level of the test.
  • A type II error, in which the null hypothesis is accepted despite the alternative hypothesis being true, with probability β=P(accept H0|H1). The quantity 1−β is called the power of the test.

Some further definitions:

  • Simple hypothesis: Any hypothesis which specifies the population distribution completely.
  • Composite hypothesis: Any hypothesis which does not specify the population distribution completely.
  • Positive data: Data that enable the investigator to reject a null hypothesis.
  • Critical values of a statistical test are the boundaries of the acceptance region of the test. The acceptance region is the set of values of the test statistic for which the null hypothesis is not rejected. Depending on the shape of the acceptance region, there can be one or more than one critical value.
    • Region of rejection / Critical region: The set of values of the test statistic for which the null hypothesis is rejected.
  • Size: For simple hypotheses, this is the test's probability of incorrectly rejecting the null hypothesis. The false positive rate. For composite hypotheses this is the supremum of the probability of rejecting the null hypothesis over all cases covered by the null hypothesis. The complement of the false positive rate is termed specificity in biostatistics. ("This is a specific test. Because the result is positive, we can confidently say that the patient has the condition.") See sensitivity and specificity and type I and type II errors for exhaustive definitions.
  • Statistical significance test: A predecessor to the statistical hypothesis test (see the Origins section). An experimental result was said to be statistically significant if a sample was sufficiently inconsistent with the (null) hypothesis. This was variously considered common sense, a pragmatic heuristic for identifying meaningful experimental results, a convention establishing a threshold of statistical evidence or a method for drawing conclusions from data. The statistical hypothesis test added mathematical rigor and philosophical consistency to the concept by making the alternative hypothesis explicit. The term is loosely used for the modern version which is now part of statistical hypothesis testing.
  • Conservative test: A test is conservative if, when constructed for a given nominal significance level, the true probability of incorrectly rejecting the null hypothesis is never greater than the nominal level.
  • Exact test

In the case of a scalar parameter, there are four principal types of alternative hypothesis:

  • Point. Point alternative hypotheses occur when the hypothesis test is framed so that the population distribution under the alternative hypothesis is a fully defined distribution, with no unknown parameters; such hypotheses are usually of no practical interest but are fundamental to theoretical considerations of statistical inference and are the basis of the Neyman–Pearson lemma.
  • One-tailed directional. A one-tailed directional alternative hypothesis is concerned with the region of rejection for only one tail of the sampling distribution.
  • Two-tailed directional. A two-tailed directional alternative hypothesis is concerned with both regions of rejection of the sampling distribution.
  • Non-directional. A non-directional alternative hypothesis is not concerned with either region of rejection; rather, it is only concerned that null hypothesis is not true.

A statistical hypothesis test compares a test statistic (z or t for examples) to a threshold. The test statistic (the formula found in the table below) is based on optimality. For a fixed level of Type I error rate, use of these statistics minimizes Type II error rates (equivalent to maximizing power). The following terms describe tests in terms of such optimality:

  • Most powerful test: For a given size or significance level, the test with the greatest power (probability of rejection) for a given value of the parameter(s) being tested, contained in the alternative hypothesis.
  • Uniformly most powerful test (UMP)

There are several types of hypothesis:

Simple hypothesis
Any hypothesis that specifies the population distribution completely. For such a hypothesis the sampling distribution of any statistic is a function of the sample size alone.
Composite hypothesis
Any hypothesis that does not specify the population distribution completely. Example: A hypothesis specifying a normal distribution with a specified mean and an unspecified variance.

The simple/composite distinction was made by Neyman and Pearson.

Exact hypothesis
Any hypothesis that specifies an exact parameter value is an exact hypothesis, also known as a point hypothesis. Example: H:μ=100.
Inexact hypothesis
Those specifying a parameter range or interval. Examples: H1:μ≤100; H2:95≤μ≤105.

Fisher required an exact null hypothesis for testing (see the quotations below).

Sign in to keep reading

15 more chapters are free with a Lably account.

More in Statistics and probability