26.05.01 · statistics / hypothesis-testing

Hypothesis testing, p-values, and confidence intervals

shipped3 tiersLean: none

Anchor (Master): Fisher 1925, Neyman and Pearson 1928-33, ASA Statement 2016, Wasserstein and Lazar 2020

Intuition Beginner

You flip a coin 100 times and get 62 heads. Is the coin fair? A fair coin would produce about 50 heads on average, but random variation means it will not produce exactly 50 every time. The question is whether 62 heads is far enough from 50 to rule out fairness as a reasonable explanation, or whether it falls within the range of outcomes you would expect from a fair coin.

This is the essence of hypothesis testing. You start with a claim about the world (the coin is fair), collect data, and ask: if the claim were true, how surprising would the observed data be? If the data would be very surprising under the claim, you reject the claim. If the data are consistent with the claim, you do not reject it.

The claim you are testing is called the null hypothesis, denoted . The null hypothesis typically represents the status quo, no effect, or no difference. For the coin, : the coin is fair (). The alternative hypothesis (or ) represents the research claim you are investigating. For the coin, : the coin is not fair ().

The test statistic is a number computed from the data that measures how far the observed result is from what the null hypothesis predicts. For the coin, the test statistic is the number of heads (or equivalently, the proportion of heads). A value far from the expected value under provides evidence against .

The p-value is the probability of obtaining a test statistic at least as extreme as the one observed, assuming is true. A small p-value means the observed data would be unlikely if were true, which is evidence against . A large p-value means the data are consistent with . The conventional threshold is 0.05: if , reject ; otherwise, do not reject.

Two kinds of errors are possible. A Type I error occurs when you reject when it is actually true (a false positive). A Type II error occurs when you fail to reject when is actually true (a false negative). The significance level controls the probability of a Type I error. Setting means you are willing to accept a 5% chance of a false positive.

Statistical power is the probability of correctly rejecting when is true. Power equals , where is the probability of a Type II error. High power is desirable: it means the test is sensitive enough to detect real effects. Power increases with sample size, effect size, and significance level.

Confidence intervals provide a complementary approach. Instead of asking "is the effect real?" a confidence interval asks "how big is the effect, and how precisely do we know it?" A 95% confidence interval for a population mean is an interval computed from the sample that, if the sampling procedure were repeated many times, would contain the true mean in 95% of repetitions. A confidence interval gives both a range of plausible values for the parameter and a measure of the precision of the estimate.

The relationship between hypothesis tests and confidence intervals is direct. If a 95% confidence interval for a parameter does not contain the null hypothesis value, the corresponding hypothesis test rejects at the 5% level. The confidence interval contains more information than the test because it shows the range of plausible values, not just whether the null value is plausible.

Visual Beginner

The table below compares the two types of errors in hypothesis testing.

Decision true false
Reject Type I error (false positive) Correct (true positive)
Fail to reject Correct (true negative) Type II error (false negative)
Test type When to use Test statistic Distribution under
One-sample z-test Population mean, known Standard normal
One-sample t-test Population mean, unknown t with df
Two-sample t-test Difference of means t with df
Chi-square test Categorical data (goodness of fit or independence) via expected vs observed counts Chi-square with appropriate df

The key visual idea is that the p-value is a tail area: it measures how much of the null distribution lies at or beyond the observed test statistic. A test statistic far in the tail produces a small p-value.

Worked example Beginner

A pharmaceutical company tests whether a new drug reduces blood pressure more than a placebo. In a randomised trial, 25 patients receive the drug and 25 receive the placebo. The reduction in blood pressure (mm Hg) is recorded for each patient.

Drug group: , Placebo group: ,

The hypotheses are : (no difference) versus : (drug is better).

Using the two-sample t-test (assuming equal variances), the pooled standard deviation is:

The test statistic is:

With 48 degrees of freedom, using a t-table or software, the one-tailed p-value is approximately 0.005.

Since , we reject . There is statistically significant evidence that the drug reduces blood pressure more than the placebo.

The 95% confidence interval for the difference is:

So the 95% CI is approximately (1.16, 8.04) mm Hg. We are 95% confident that the true difference in mean blood pressure reduction is between 1.16 and 8.04 mm Hg, with the drug outperforming the placebo. Notice that the interval does not contain 0, consistent with rejecting .

The confidence interval provides more information than the hypothesis test alone. The test tells you only that the difference is statistically significant. The interval tells you the range of plausible values for the difference, which allows you to assess practical significance. The lower bound of 1.16 mm Hg is a small reduction that may not be clinically meaningful, while the upper bound of 8.04 mm Hg is substantial. The interval spans from a potentially negligible effect to a potentially important one, suggesting that a larger study would be needed to pin down the effect size.

To illustrate the connection between hypothesis tests and confidence intervals, consider what happens if the null hypothesis were instead of . Since 5 lies inside the 95% confidence interval (1.16, 8.04), we would not reject this null hypothesis at the 5% level. Since 0 lies outside the interval, we do reject . This duality holds in general: a 95% confidence interval contains exactly those values of the parameter that would not be rejected by a two-sided test at the 5% level.

The effect size (Cohen's d) for this study is . By convention, this is a medium-to-large effect. The combination of a significant p-value, a confidence interval that excludes zero, and a meaningful effect size provides strong evidence that the drug is effective. Reporting all three (p-value, confidence interval, and effect size) is now considered best practice in many fields, replacing the older practice of reporting only the p-value.

Check your understanding Beginner

Formal definition Intermediate+

The Neyman-Pearson framework

Let be a random sample from a distribution with parameter . A hypothesis test is a decision rule that partitions the sample space into a rejection region and an acceptance region.

Null and alternative hypotheses. The null hypothesis specifies a restricted parameter space. The alternative hypothesis specifies the complement (or a subset thereof). The hypotheses partition the parameter space: and typically .

Type I error and significance level. The probability of a Type I error is for . The significance level of a test is , the maximum Type I error probability over all parameter values in the null.

Type II error and power. The probability of a Type II error at is . The power function is for .

p-value. The p-value is the smallest significance level at which the null hypothesis would be rejected given the observed data. Formally, , where is the rejection region at level and is the observed test statistic.

Confidence intervals

A confidence interval for a parameter is a random interval satisfying for all .

For the mean with known variance: .

For the mean with unknown variance: .

For a proportion: .

Duality between tests and confidence intervals

There is a one-to-one correspondence between hypothesis tests and confidence intervals. A confidence region for consists of all values for which the test of versus does not reject at level . This duality means that every confidence interval can be inverted to produce a hypothesis test and vice versa.

Likelihood ratio tests

The likelihood ratio test is a general method for constructing test statistics. For testing versus :

The test rejects for small values of . Under regularity conditions, where .

Key theorem with proof Intermediate+

The Neyman-Pearson lemma

Theorem (Neyman-Pearson). For testing versus (simple versus simple), the most powerful test of level rejects when the likelihood ratio exceeds a constant:

where is chosen so that .

Proof. Let be the most powerful test and let be any other test with level . We need to show that the power of is at least as large as that of .

The likelihood ratio is . Define the test function if , if , and if , where and are chosen so that .

Consider the difference in power:

When , we have , so , and . When , we have , so , and . In both cases, the integrand is non-negative. Therefore:

The right side equals since . Therefore the power of exceeds that of .

Consistency of the likelihood ratio test

Theorem. Under regularity conditions, the likelihood ratio test is consistent: its power for every as .

The proof uses the fact that under and diverges to infinity under any fixed , by the law of large numbers applied to the log-likelihood.

Exercises Intermediate+

Advanced results Master

Uniformly most powerful tests

The Neyman-Pearson lemma applies to simple versus simple hypotheses. For composite hypotheses, the concept of a uniformly most powerful (UMP) test generalises this. A test is UMP at level if it has level and its power is at least as large as that of any other level- test for every .

UMP tests exist for one-parameter exponential families with one-sided alternatives. For from a one-parameter exponential family , the test that rejects for large values of is UMP for versus when is increasing.

UMP tests typically do not exist for two-sided alternatives. For testing versus in a one-parameter exponential family, no single test maximises power simultaneously for and . The two-sided test that rejects for large values of is a reasonable compromise but is not UMP.

Unbiased tests and UMPU

Since UMP tests may not exist, the class of tests can be restricted to unbiased tests. A test is unbiased if its power is at least for all : for all . This ensures the test is at least as likely to reject when is true as when is true.

Uniformly most powerful unbiased (UMPU) tests exist for many common testing problems, including the two-sided t-test and the F-test in ANOVA. The theory of UMPU tests was developed by Neyman and Pearson and later refined by Lehmann, who showed that for exponential families, UMPU tests can be constructed by conditioning on a sufficient statistic for the nuisance parameters.

The duality with confidence sets

The duality between hypothesis tests and confidence intervals extends to confidence sets more generally. A confidence set for is . Inverting a family of tests produces a confidence set, and inverting a confidence set produces a test.

This duality transfers optimality properties: inverting a UMP test produces a uniformly most accurate (UMA) confidence set, and inverting an unbiased test produces an unbiased confidence set. The shortest confidence interval for a parameter in a one-parameter exponential family is obtained by inverting the UMPU test.

Sequential testing and the sequential probability ratio test

Wald's sequential probability ratio test (SPRT) is a hypothesis test in which the sample size is not fixed in advance. After each observation, the test either accepts , accepts , or continues sampling. The SPRT rejects when and accepts when the ratio falls below , where and are chosen to control the error probabilities.

The SPRT has a remarkable optimality property: among all tests with error probabilities at most and , the SPRT minimises the expected sample size under both and . This makes sequential testing more efficient than fixed-sample testing, often requiring 30-50% fewer observations to achieve the same error probabilities.

Multiple testing and false discovery rate

When testing many hypotheses simultaneously, the familywise error rate (FWER) becomes increasingly conservative. Benjamini and Hochberg's 1995 proposal to control the false discovery rate (FDR) revolutionised multiple testing. The FDR is the expected proportion of false positives among all rejected hypotheses:

where is the number of false positives and is the total number of rejections. Controlling FDR at level means that on average, no more than a fraction of rejected hypotheses are false positives.

The Benjamini-Hochberg procedure rejects all hypotheses with p-values where are the ordered p-values and ranges from 1 to . This procedure controls FDR when the tests are independent. The Benjamini-Yekutieli modification extends control to dependent tests.

The Bayesian perspective on testing

Bayesian hypothesis testing computes the posterior probability of each hypothesis given the data, using Bayes' theorem:

The Bayes factor measures the evidence for relative to . A Bayes factor greater than 1 supports ; less than 1 supports . Unlike the p-value, the Bayes factor can provide evidence in favour of , not just against it.

The Bayesian approach avoids several problems with p-values. The p-value does not measure the probability that is true, while the posterior probability does. The p-value is sensitive to stopping rules (optional stopping changes the sampling distribution), while the Bayes factor (under certain conditions) is not. However, the Bayesian approach requires specifying prior probabilities for the hypotheses and prior distributions for parameters under each hypothesis, which introduces subjectivity.

The ASA statement on p-values

The 2016 American Statistical Association statement on p-values, authored by Wasserstein and Lazar, identified six principles for proper use and interpretation of p-values. First, p-values indicate how incompatible the data are with a specified statistical model. Second, p-values do not measure the probability that the studied hypothesis is true or the probability that the data were produced by random chance alone. Third, scientific conclusions should not be based only on whether a p-value passes a specific threshold. Fourth, proper inference requires full reporting and transparency. Fifth, a p-value does not measure the size of an effect or the importance of a result. Sixth, a p-value by itself is not a good measure of evidence for a model or hypothesis.

The 2019 follow-up, "Moving to a World Beyond p < 0.05," went further, arguing that the term "statistical significance" should be abandoned and that researchers should emphasise estimation over testing, reporting effect sizes and confidence intervals rather than binary significance decisions.

Equivalence testing and non-inferiority

Traditional hypothesis tests are designed to detect differences. In many practical settings, the goal is to show that two treatments are equivalent (equivalence testing) or that a new treatment is not substantially worse than an existing one (non-inferiority testing). These tests reverse the burden of proof: the null hypothesis states that the treatments differ by at least a margin , and the alternative states they are equivalent.

The two one-sided tests (TOST) procedure constructs a confidence interval for the difference and rejects the null of non-equivalence if the entire interval falls within the equivalence margin . The sample size for equivalence testing is typically larger than for difference testing because the goal is to establish a positive claim (equivalence) rather than reject a null.

Non-inferiority tests are widely used in drug development, where a new drug may have advantages in cost, convenience, or side effects even if it is not more effective than the standard treatment. The non-inferiority margin is chosen to represent the largest clinically acceptable difference, and the test demonstrates that the new treatment is not worse by more than .

Confidence distributions

A confidence distribution is a distribution estimator that provides a visual and computational summary of confidence intervals at all levels simultaneously. For a parameter , the confidence distribution function , where is a pivot and is the observed value. The confidence distribution provides a frequentist analogue of the Bayesian posterior: it is a probability distribution on the parameter space that encodes confidence intervals at every level.

For the normal mean with known variance, the confidence distribution is . The confidence interval is the quantile of the confidence distribution. Confidence distributions unify frequentist and Bayesian inference: the Bernstein-von Mises theorem states that the Bayesian posterior and the confidence distribution converge to the same normal distribution in large samples.

Nuisance parameters and profile likelihood

Many testing problems involve nuisance parameters: parameters that are not of direct interest but must be accounted for. The profile likelihood eliminates nuisance parameters by maximising over them. For testing in the presence of nuisance parameter , the profile likelihood ratio is:

The Wilks theorem states that under , regardless of the true value of the nuisance parameter . This result provides a general method for constructing tests in the presence of nuisance parameters.

Connections Master

  • Sampling distributions 26.04.01. Every hypothesis test uses the sampling distribution of the test statistic under to compute p-values and critical values. The CLT provides the large-sample approximations used in z-tests and chi-square tests.

  • Probability theory 26.02.01. The Neyman-Pearson lemma is a result in decision theory that uses probability to optimise error trade-offs. The likelihood ratio at the heart of the lemma is a direct application of probability density functions.

  • Descriptive statistics 26.01.01. Test statistics are functions of sample means, variances, and proportions. The two-sample t-statistic is built from the sample means and pooled standard deviation.

  • Bayesian statistics 26.07.01. The p-value and the Bayes factor can give contradictory evidence: a small p-value can correspond to a Bayes factor that supports (the Lindley-Jeffreys paradox). This occurs when the sample size is large and the effect is small.

  • Regression 26.06.01. The t-tests for individual regression coefficients and the F-test for overall model significance are applications of the hypothesis testing framework to regression models.

  • Experimental design 26.09.01. Power analysis determines the sample size needed to achieve desired Type I and Type II error rates, connecting hypothesis testing directly to the design of experiments.

  • Statistical literacy 26.10.01. Misuse of p-values, confusion between statistical significance and practical significance, and p-hacking are among the most common forms of statistical misuse.

  • Nonparametric methods 26.08.01. Permutation tests provide distribution-free hypothesis tests that require no assumptions about the population distribution. The permutation test is exact (controls the type I error rate at the nominal level) for any sample size, unlike the t-test which relies on the CLT approximation.

  • Philosophy of science 20.01.01. The frequentist-Bayesian debate over hypothesis testing reflects a deeper philosophical divide about the nature of probability and the logic of scientific inference. Popper's falsificationism aligns naturally with frequentist testing.

  • Medicine 35.01.01. Randomised controlled trials use hypothesis testing to determine whether treatments are effective. The design of clinical trials (sample size, stopping rules, multiple comparisons) is built on the theory developed in this unit.

  • Law [forensic science]. The prosecutor's fallacy (confusing with ) is a direct analogue of the base rate fallacy in hypothesis testing. DNA evidence, fingerprint analysis, and other forensic methods all require correct probabilistic reasoning to avoid wrongful convictions.

Historical and philosophical context Master

Fisher and the invention of significance testing

Ronald Aylmer Fisher introduced the concept of significance testing in his 1925 Statistical Methods for Research Workers. Fisher's approach was based on the p-value as a measure of evidence against the null hypothesis. He proposed the 0.05 threshold as a convenient convention, writing that "it is convenient to take this point as a limit" and that "it is usual and convenient for experimenters to take 5 per cent as a conventional level of significance."

Fisher did not view significance testing as a decision procedure. For Fisher, the p-value was a continuous measure of evidence: smaller values provided stronger evidence against the null. He was sceptical of fixed decision rules and argued that the interpretation of a p-value should depend on the context, including the plausibility of the null hypothesis and the size of the observed effect. Fisher also opposed the Neyman-Pearson emphasis on power and alternative hypotheses, arguing that the null hypothesis was the hypothesis to be tested and that the specific alternative was irrelevant.

Fisher's 0.05 threshold has become one of the most consequential conventions in science. It was not derived from any theoretical principle but was chosen as a practical guideline. Fisher himself would likely have been dismayed by the rigid binary classification that has emerged, where is treated as strong evidence and is treated as no evidence.

Neyman, Pearson, and the decision-theoretic framework

Jerzy Neyman and Egon Sharpe Pearson developed the decision-theoretic framework for hypothesis testing in a series of papers between 1928 and 1933. Their approach differed from Fisher's in several key respects. They introduced the explicit consideration of alternative hypotheses and the concepts of Type I and Type II errors. They defined the power function and showed that tests should be chosen to maximise power subject to a constraint on the Type I error rate. The Neyman-Pearson lemma, proving that the likelihood ratio test is most powerful for simple hypotheses, was the centrepiece of their theory.

The Neyman-Pearson approach frames hypothesis testing as a decision problem: given the data, should we act as if is true or as if is true? The answer depends on the costs of the two types of errors. The significance level represents the maximum acceptable false positive rate, and the power represents the probability of correctly detecting a real effect.

Neyman and Pearson's framework is the basis for modern statistical practice, including the design of clinical trials, quality control procedures, and scientific experiments. However, Fisher was hostile to their approach, arguing that the rigid decision-theoretic framing was inappropriate for scientific inference, where the goal is to evaluate evidence rather than make decisions.

The Fisher-Neyman-Pearson conflict

The disagreement between Fisher and Neyman-Pearson was one of the most acrimonious disputes in the history of statistics. Fisher viewed significance testing as an informal tool for evaluating evidence. Neyman and Pearson viewed it as a formal decision procedure. Fisher rejected the concept of power and the need for a specific alternative hypothesis. Neyman and Pearson argued that testing without an alternative was meaningless.

Modern practice is an uneasy hybrid of the two approaches. The p-value comes from Fisher. The concepts of Type I error, Type II error, and power come from Neyman and Pearson. The result is a framework that neither Fisher nor Neyman-Pearson would fully endorse, but that has proved remarkably effective in practice.

The practical consequence of this hybrid is confusion. The p-value is neither a Type I error rate (that is , chosen before the test) nor the probability that is true (that would require a Bayesian approach). It is the probability of obtaining results at least as extreme as the observed results under the null hypothesis. This subtle definition is easily misunderstood, and the conflation of the Fisher and Neyman-Pearson frameworks has contributed to the widespread misinterpretation of p-values in the scientific literature.

Neyman also developed the theory of confidence intervals in 1934, providing a frequentist method for interval estimation. Neyman's key insight was that the interval itself is random, not the parameter. Before the data are collected, a 95% confidence procedure will produce intervals that contain the true parameter 95% of the time. After the data are collected, the interval either contains the parameter or it does not. This contrasts with Bayesian credible intervals, where the probability refers directly to the parameter given the data.

The replication crisis and the reform of significance testing

The replication crisis, which emerged in psychology and other sciences beginning around 2010, has cast harsh light on the limitations of hypothesis testing. Many published results with failed to replicate in subsequent studies. Ioannidis's 2005 paper "Why Most Published Research Findings Are False" argued that for many research areas, the prior probability of hypotheses being true is low, the statistical power is modest, and biases in analysis and publication inflate the false positive rate far above the nominal 5%.

The crisis has prompted several reform proposals. The ASA statement on p-values (2016) and its follow-up (2019) argued for moving beyond the threshold. Some journals have banned significance testing entirely. Others require pre-registration of hypotheses and analysis plans to prevent p-hacking. The registered report format, in which journals accept papers before data collection based on the importance of the question and the rigour of the design, removes the incentive to find significant results.

The philosophy of induction and statistical inference

Hypothesis testing is a formalisation of inductive reasoning: drawing general conclusions from specific observations. The problem of induction, identified by David Hume in 1748, is that no amount of observational evidence can logically guarantee the truth of a universal claim. Hypothesis testing sidesteps this problem by reframing it: instead of trying to prove claims true, it tries to reject false claims. The asymmetric logic of hypothesis testing (you can reject but never prove it) reflects Popper's philosophy of falsificationism.

The Bayesian alternative, which assigns probabilities to hypotheses, corresponds to a different philosophical stance. The Bayesian approach is consistent with inductive reasoning in the sense that it updates beliefs based on evidence, but it requires specifying prior probabilities that are themselves not derived from the data. The choice between frequentist and Bayesian approaches is ultimately a philosophical choice about the nature of probability and the goals of statistical inference.

The sociological dimension of significance testing

The threshold has become a social convention, not a scientific principle. There is no deep mathematical reason for the 5% level; Fisher chose it as a convenient rule of thumb, writing "it is convenient to take this point as a limit." The 5% level became entrenched through a combination of practical convenience (pre-computer tables were easiest to produce for standard significance levels), editorial policies (journals began requiring for publication), and social reinforcement (researchers who obtained significant results were rewarded with publications, grants, and promotions).

This sociological entrenchment has had perverse consequences. Researchers have strong incentives to obtain , which leads to p-hacking (trying many analyses and reporting only the significant ones), HARKing (hypothesising after results are known), and selective publication (journals publishing only significant results). These practices inflate the false positive rate far above 5%, contributing to the replication crisis.

Reforming this system requires changing incentives, not just changing methods. Pre-registration, registered reports, open data, and replication studies are structural reforms that address the incentive problem. Teaching statistical thinking rather than statistical recipes is an educational reform that addresses the conceptual problem. Both are needed.

The teaching of hypothesis testing and its misconceptions

Hypothesis testing is one of the most widely taught statistical methods, but also one of the most widely misunderstood. Studies of statistical literacy among researchers, students, and even statistics instructors have found pervasive misconceptions about p-values, confidence intervals, and hypothesis tests.

The most common misconceptions include: (1) the p-value is the probability that is true, (2) failing to reject means is true, (3) a 95% confidence interval has a 95% probability of containing the true parameter, (4) statistical significance implies practical importance, and (5) the p-value measures the size of the effect. Each of these is incorrect, yet each is widely believed.

The problem is compounded by the way hypothesis testing is typically taught. Introductory courses often present the procedure as a fixed algorithm (state hypotheses, compute test statistic, find p-value, make decision) without emphasising the reasoning behind it. Students learn to compute p-values without understanding what they represent. The ASA statement on p-values was motivated in part by the recognition that the standard pedagogy of hypothesis testing is not working.

The future of statistical significance

The debate over statistical significance is unlikely to be resolved soon. Some have proposed replacing the binary significant/not significant decision with a continuum of evidence, using confidence intervals and effect sizes as the primary reporting tools. Others have proposed replacing p-values entirely with Bayes factors. Still others argue that the problem is not with p-values themselves but with the culture of binary decision-making that surrounds them.

The most pragmatic position may be that p-values are a useful tool when interpreted correctly: as one piece of evidence among many, to be considered alongside effect sizes, confidence intervals, study design, prior evidence, and practical consequences. The error is not in computing p-values but in treating them as the sole arbiter of scientific truth.

Hypothesis testing in the modern era

The basic framework of hypothesis testing has been extended in many directions. Equivalence testing reverses the burden of proof: instead of testing whether the treatment differs from the control, it tests whether the treatment is equivalent to the control within a specified margin. Non-inferiority testing asks whether the treatment is no worse than the control by more than a specified amount. These approaches are standard in drug development, where the goal is often to show that a new drug is as good as (not better than) an existing one.

Multiple testing has become increasingly important in the era of high-dimensional data. When thousands or millions of hypotheses are tested simultaneously (as in genomics, where millions of genetic variants are tested for association with a disease), the false positive rate must be controlled across the entire family of tests. The Bonferroni correction is too conservative for this setting, and the false discovery rate (FDR) approach of Benjamini and Hochberg (1995) has become the standard.

The intersection of hypothesis testing and machine learning raises new questions. Machine learning models are often evaluated using hypothesis tests (comparing the accuracy of two classifiers, testing the significance of a feature), but the assumptions underlying these tests (independence, stationarity, correct model specification) are often violated in practice. The development of valid hypothesis tests for complex machine learning models is an active area of research.

The relationship between hypothesis tests and confidence intervals

The duality between hypothesis tests and confidence intervals is one of the most elegant results in statistical theory. A 100(1-)% confidence interval contains exactly those values of the parameter that would not be rejected by a two-sided hypothesis test at level . This means that confidence intervals and hypothesis tests are two sides of the same coin: the test gives a yes/no answer, while the interval gives the range of plausible values.

This duality has practical implications. A confidence interval is strictly more informative than a hypothesis test because it contains all the information needed to perform the test (just check whether the null value is inside the interval) plus additional information about the precision of the estimate. For this reason, many statisticians recommend reporting confidence intervals instead of (or in addition to) p-values. The interval shows not only whether the effect is significant but also how large it might be.

The duality also clarifies the relationship between sample size, effect size, and statistical power. A wide confidence interval indicates low precision, which means the test has low power. To increase power, you need to narrow the interval, which requires more data. The sample size needed for a given level of power can be computed from the desired width of the confidence interval and the expected effect size.

The power of a statistical test

Statistical power is the probability of rejecting the null hypothesis when the alternative is true. Power depends on three factors: the significance level (higher means more power), the effect size (larger effects are easier to detect), and the sample size (larger samples provide more power). The relationship between these three factors is quantified by the power function.

For the one-sample z-test of versus with known variance , the power at alternative is:

where is the standard normal CDF. Power increases as increases (larger effect), as decreases (less noise), and as increases (more data).

The conventional standard for power is 80% (or sometimes 90%). A power analysis determines the sample size needed to achieve this level of power for a given effect size and significance level. For the two-sample t-test with equal group sizes, the required sample size per group is approximately , where is the minimum detectable difference and is the desired power. For 80% power at , this simplifies to .

Underpowered studies are a major source of false negatives and unreliable research. A study with 30% power has only a 30% chance of detecting a real effect. Even when the effect is detected, the estimate is likely to be inflated (because only large, lucky estimates reach significance), a phenomenon known as the "winner's curse." The replication crisis has highlighted the importance of conducting adequately powered studies.

The relationship between statistical and practical significance

Statistical significance (a small p-value) means only that the observed effect is unlikely under the null hypothesis. It says nothing about the size of the effect or its practical importance. A study with a million observations can detect statistically significant effects that are too small to matter in any practical sense. Conversely, a study with 20 observations may fail to detect an effect that is large and important.

The distinction between statistical and practical significance is one of the most important concepts in statistical literacy. The p-value tells you whether the effect is detectable; the effect size tells you whether it matters. Reporting both (along with a confidence interval for the effect size) gives the reader the information needed to assess both statistical and practical significance. Standardised effect sizes (Cohen's d, Pearson's r, odds ratios) provide a scale-free measure of the magnitude of the effect that can be compared across studies and domains.

Common misinterpretations of p-values

The p-value is one of the most widely misinterpreted quantities in all of statistics. Research by Gigerenzer (2004), Lecoutre (2006), and others has documented persistent misconceptions even among professional researchers and statistics instructors.

The most dangerous misinterpretation is the "p-value fallacy": treating the p-value as the probability that the null hypothesis is true. This error leads researchers to believe that means there is a 3% chance that the null hypothesis is true, when in fact the p-value is computed under the assumption that the null is true. The p-value is , not . Computing the latter requires Bayes' theorem and a prior probability for .

Another common error is treating the p-value as a measure of replicability. A p-value of 0.01 does not mean the result would replicate 99% of the time. The probability of replication depends on the power of the original study, the true effect size, and the criteria for successful replication. Simulation studies have shown that a study with has only about a 50% probability of achieving in an exact replication.

Bibliography Master

  • Fisher, R. A., Statistical Methods for Research Workers (Oliver and Boyd, 1925). Introduced significance testing and the p-value as a practical tool for scientific research.

  • Neyman, J. and Pearson, E. S., "On the Use and Interpretation of Certain Test Criteria for Purposes of Statistical Inference," Biometrika 20A(1-2) (1928), 175-240 and 263-294. Founded the decision-theoretic approach to hypothesis testing.

  • Neyman, J. and Pearson, E. S., "On the Problem of the Most Efficient Tests of Statistical Hypotheses," Philosophical Transactions of the Royal Society A 231 (1933), 289-337. The Neyman-Pearson lemma.

  • Wald, A., Sequential Analysis (Wiley, 1947). Introduced sequential hypothesis testing and the SPRT.

  • Benjamini, Y. and Hochberg, Y., "Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing," Journal of the Royal Statistical Society B 57(1) (1995), 289-300. Introduced FDR control.

  • Ioannidis, J. P. A., "Why Most Published Research Findings Are False," PLoS Medicine 2(8) (2005), e124. Catalysed the replication crisis debate.

  • Wasserstein, R. L. and Lazar, N. A., "The ASA Statement on p-Values: Context, Process, and Purpose," The American Statistician 70(2) (2016), 129-133. Official position on proper p-value use.

  • Wasserstein, R. L., Schirm, A. L., and Lazar, N. A., "Moving to a World Beyond p < 0.05," The American Statistician 73(sup1) (2019), 1-19. Follow-up arguing for abandoning "statistical significance."

  • Lehmann, E. L. and Romano, J. P., Testing Statistical Hypotheses (3e, Springer, 2005). The definitive reference for the mathematical theory of hypothesis testing.

  • Casella, G. and Berger, R. L., Statistical Inference (2e, Duxbury, 2002). Chapters 7-8 provide a rigorous treatment of hypothesis testing and confidence intervals.