1 Concept and Definition

1.1 Hypothesis Testing Setup

In hypothesis testing, researchers specify two competing statements about a population or data-generating mechanism. The null hypothesis, commonly written \(H_0\), represents a baseline model (often a “no effect” or “no difference” claim). The alternative hypothesis, \(H_1\), expresses departures from that baseline. Data are summarized into a test statistic, and the goal is to assess whether the observed data are unusually inconsistent with \(H_0\) under a chosen probability model.

1.2 Formal Definition of the p-value

A p-value is defined in relation to a test statistic \(T\) and an observed value \(t_{\text{obs}}\). Under the null hypothesis, the p-value is the probability (according to the null model) of obtaining a test statistic at least as extreme as \(t_{\text{obs}}\), in the direction specified by the alternative. For continuous test statistics, the “at least as extreme” event corresponds to a tail probability; for discrete cases, it is defined using a convention that yields the correct ordering of extremeness.

1.3 Statistical Meaning Under the Null

The key interpretive anchor for a p-value is what it means *if \(H_0\) were true*. Under \(H_0\), the p-value quantifies how surprising the observed outcome would be relative to what the null model predicts. If the observed data look typical under \(H_0\), the p-value tends to be relatively large. If the data fall in the tails of the null distribution of the statistic, the p-value becomes small, suggesting the null model provides a poor fit to the observed results.

1.4 Relationship to Test Statistics

The p-value is not a property of the raw data alone; it depends on (i) the choice of test statistic, (ii) the probability model under \(H_0\), and (iii) how “extremeness” is defined (one-sided or two-sided). As a result, different reasonable testing strategies can yield different p-values for the same dataset, because they encode different assumptions and different notions of departure from \(H_0\).

2 Computation and Methods

2.1 Parametric Tests

Parametric tests assume a specific distributional form for the data under \(H_0\), typically depending on parameters that are known or estimated. Once a test statistic is computed, its sampling distribution (or an approximation) under \(H_0\) is used to calculate the corresponding tail probability.

2.1.1 t-tests and z-tests

z-tests and t-tests are common parametric methods for mean comparisons. A z-test is used when the variance is known (or effectively known), while the t-test is used when the variance is estimated from the sample, producing a t-distributed statistic under \(H_0\). The p-value is then obtained by evaluating the relevant tail probability for the realized test statistic.

2.1.2 Chi-square tests

Chi-square tests are used for categorical data and for assessing discrepancies between observed and expected counts. Under \(H_0\), the test statistic follows a chi-square distribution with degrees of freedom determined by the model structure. The p-value corresponds to the probability, under that chi-square model, of achieving a value at least as large as the observed statistic, typically reflecting worse-than-expected agreement.

2.2 Nonparametric Approaches

Nonparametric approaches rely less on strict distributional assumptions. They typically use permutation or rank-based machinery to approximate how extreme the observed test statistic would be under the null.

2.2.1 Permutation tests

Permutation tests randomize the data in a way consistent with \(H_0\), then recompute the test statistic across many permutations. The p-value is estimated as the proportion of randomized outcomes whose statistic is at least as extreme as the observed one. This approach is especially useful when the exact null distribution is difficult to derive.

2.2.2 Rank-based tests

Rank-based methods transform data into ranks and perform inference using these order statistics. Because ranks are less sensitive to particular distributional shapes, such tests can be more robust to deviations from normality, depending on the exact scenario and assumptions about exchangeability under \(H_0\).

2.3 Exact vs. Asymptotic p-values

Some settings permit exact computation: the null distribution of the statistic can be determined exactly from combinatorial or distributional results. In many other cases, exact forms are unavailable, and p-values are computed using asymptotic approximations, which rely on large-sample behavior.

2.3.1 Discrete Test Statistics and Ties

When the test statistic is discrete or when the data contain ties (common in rank-based procedures), the p-value calculation must respect the step-like nature of the null distribution. In such cases, the p-value may not behave smoothly with the test statistic, and different conventions for “extremeness” can lead to slightly different values. Reporting the method and definition becomes important for reproducibility.

2.4 Numerical and Simulation Techniques

When analytic evaluation is impractical, numerical integration, Monte Carlo simulation, or resampling can be used to approximate p-values. For simulation-based procedures, p-values are typically accompanied by error due to finite simulation runs. Good practice includes using sufficiently many iterations and, when relevant, reporting computational settings.

3 Interpretation and Misconceptions

3.1 Correct Interpretation (Compatibility with H0)

A commonly emphasized interpretation is: the p-value measures the degree of compatibility between the observed data and \(H_0\), assessed through the null model and the chosen test. Lower p-values indicate that the observed data reside in less typical regions of the null distribution for the selected statistic. This does not automatically quantify the probability that \(H_0\) is correct; rather, it reflects how the data compare to what the null would likely produce.

3.2 Common Misinterpretations

3.2.1 “Probability the null is true”

A frequent misunderstanding is reading the p-value as \(P(H_0 \mid \text{data})\), the probability that the null hypothesis is true given the results. The p-value is computed without treating \(H_0\) as a random variable with a prior probability; it is defined as a probability of data-like outcomes under the assumption that \(H_0\) holds.

3.2.2 “Probability of obtaining the result”

Another confusion treats the p-value as the probability of seeing exactly the observed dataset. In most hypothesis tests, the p-value concerns a whole set of outcomes at least as extreme as the observed one, not the probability of that specific outcome alone. In continuous cases, the probability of observing precisely the same value is effectively zero, so the phrasing must refer to sets or regions, not single outcomes.

3.2.3 Confusing p-values with effect sizes

P-values address evidence against \(H_0\), not the magnitude of an effect. A large p-value may occur even when effects are practically meaningful but sample sizes are small or variance is large. Conversely, very small p-values can arise from tiny effects in very large samples. Distinguishing statistical significance from substantive importance is central to proper interpretation.

3.3 p-values vs. Confidence Intervals

Confidence intervals provide a range of parameter values consistent with the data under a frequentist coverage criterion. While p-values and confidence intervals are related (for many tests, each can be derived from the other), they answer different questions. A p-value evaluates extremeness under a null parameter value; a confidence interval describes plausible values for the parameter and conveys uncertainty more directly than a binary reject-or-not outcome.

4 Reporting and Decision-Making

4.1 Significance Levels and Rejection Rules

A significance level \(\alpha\) (such as 0.05) is a pre-specified threshold used to decide whether to reject \(H_0\). When \(p \le \alpha\), the result is labelled statistically significant; otherwise, there is insufficient evidence to reject the null using that rule. This decision rule does not “prove” \(H_0\) false; it only formalizes a criterion for evidence under the chosen model and testing framework.

4.2 Multiple Testing and p-value Adjustment

In many analyses, multiple hypotheses are tested simultaneously. If raw p-values are compared to \(\alpha\) without adjustment, the chance of obtaining at least one false positive increases.

4.2.1 Family-wise error control

Family-wise error rate (FWER) control methods aim to bound the probability of one or more false rejections within a set of tests. Classic approaches include procedures designed to maintain the overall error rate at a target level, trading off power for stricter protection against false discoveries.

4.2.2 False discovery rate control

False discovery rate (FDR) control focuses on the expected proportion of false rejections among all rejections. FDR-oriented procedures generally provide greater power than strict FWER control, especially when many tests are performed, while still controlling the rate of incorrect findings in aggregate.

4.3 Reporting Standards

4.3.1 Effect size and uncertainty

Comprehensive reporting typically includes an effect size estimate and a measure of uncertainty, such as a standard error or confidence interval. This practice helps readers assess practical impact rather than relying solely on evidence metrics.

4.3.2 Test assumptions and modeling choices

Reporting also benefits from clarifying the statistical model, assumptions (for example, distributional forms or exchangeability), the definition of the alternative (one- or two-sided), and how missing data or outliers were handled. When resampling or simulation is used, describing the number of iterations and the randomization scheme improves transparency.

5 Behavior and Properties

5.1 Under the Null: Distribution of p-values

When the null hypothesis is true and the test is valid, p-values follow a distribution that is uniform on \([0,1]\) for continuous test statistics. For discrete test statistics, the distribution is often stochastically larger than uniform, meaning p-values may take only certain values and tend to be conservative under the null.

5.2 Under Alternatives: Power and Sensitivity

When \(H_1\) is true (or more precisely, when the data-generating process deviates from \(H_0\)), p-values tend to be smaller. The tendency to produce low p-values under alternatives is quantified by power: the probability of rejecting \(H_0\) when a specified alternative is true. Sensitivity depends on the strength of the departure from the null, the variability, and the sample size.

5.3 Robustness to Model Misspecification

If assumptions underlying the null distribution or test statistic are incorrect, p-values can lose their nominal interpretation. Some tests are robust to certain departures (for example, mild non-normality), while others can be sensitive to heteroscedasticity, dependence, or incorrect functional form. Robustness is often evaluated through theory, diagnostics, and sensitivity analyses.

5.4 Influence of Sample Size

Sample size strongly affects p-values because it controls the precision of estimates and the spread of the test statistic under both null and alternative regimes. With larger samples, even small deviations from \(H_0\) may become detectable, resulting in smaller p-values. With smaller samples, evidence may be weak even for moderate effects, leading to larger p-values and low power.

6 p-values in Practice

6.1 Choosing the Test and Tail (One- vs. Two-sided)

Selecting the correct test aligns the statistic with the data structure and the hypothesized form of departure. Choosing one-sided versus two-sided tests changes the p-value because it alters which region of outcomes counts as “more extreme.” Best practice is to align the directionality with the research question and to predefine the tail choice when possible to avoid post hoc flexibility.

6.2 Checking Assumptions

Before relying on a parametric p-value, analysts often assess whether conditions such as independence, approximate normality, or equal variances are reasonable. Diagnostics can include residual checks, variance comparisons, and examination of leverage or influence. If assumptions appear doubtful, alternative tests or variance-stabilizing strategies may be considered.

6.3 Handling Outliers and Data Issues

Outliers can affect mean- and variance-based test statistics disproportionately. Because p-values reflect the chosen statistic, outliers may produce spurious evidence against \(H_0\). Appropriate handling includes investigating data quality, verifying measurement procedures, using robust methods when suitable, and documenting any transformations or exclusions according to a prespecified rationale.

6.4 Reproducibility and Seed Control (Simulation/Permutation)

For resampling and simulation procedures, results can depend on random number generation. Reproducibility is improved by recording the random seed, the software environment, and the number of permutations or simulation iterations. When reporting simulation-based p-values, it is also helpful to describe the approximation method and its computational settings.

7 Alternatives and Complements

7.1 Likelihood Ratios and Bayes Factors

Likelihood ratio approaches compare how well competing models explain the observed data, often producing a statistic that can be mapped to significance-like measures. Bayesian methods summarize evidence using Bayes factors, which compare the predictive support for one model against another given prior assumptions. These frameworks answer different questions than p-values, but they can complement them in model evaluation.

7.2 Confidence Levels and Confidence Distributions

Confidence-related concepts focus on uncertainty about parameters rather than tail probabilities alone. Confidence levels can be interpreted as degrees of belief in parameter values under repeated-sampling criteria. Confidence distributions aim to characterize the entire distribution of plausible parameter values, offering a more graded representation than a single hypothesis-decision threshold.

7.3 Effect Size Emphasis over Binary Decisions

A practical complement to p-values is emphasis on effect size and uncertainty, including standardized measures and confidence intervals. This shifts attention from a binary reject/retain narrative toward describing the size, direction, and precision of the observed association or difference, which is often more informative for decision-making in applied contexts.

8 Illustrative Examples

8.1 Walkthrough: Simple Normal Mean Test

Suppose a researcher measures a quantitative outcome and wants to test whether the population mean equals a target value \(\mu_0\). Under assumptions of normality with unknown variance, the test statistic takes the form of a t-statistic: it compares the sample mean to \(\mu_0\), scaled by the estimated standard error. After computing the realized t value, the p-value is obtained by evaluating the appropriate tail probability under the t-distribution with the corresponding degrees of freedom. For a two-sided test, the procedure uses both tails, effectively doubling the extremeness criterion under symmetry.

8.2 Walkthrough: Proportions and Proportional Differences

Consider testing whether two independent groups have the same success proportion. A common strategy is to build a statistic based on the difference between sample proportions, scaled by the variability expected under \(H_0\). Under the null, this standardized difference is approximated by a normal distribution for sufficiently large samples. The p-value is then computed from the relevant tail area for the chosen alternative direction. If sample sizes are small or approximations are unreliable, exact or simulation-based methods may be preferable.

8.3 Walkthrough: Permutation Test Example

A permutation test can be used to compare group means without relying on a specific parametric form. The procedure begins by computing an observed statistic, such as the difference between group averages. Next, group labels are shuffled repeatedly while maintaining the group sizes. For each shuffle, the same statistic is recalculated, producing an empirical null distribution. The p-value is estimated as the fraction of permuted statistics that are at least as extreme as the observed difference. A larger count in the extreme tail indicates that the observed separation between groups is less unusual under the null, producing a larger p-value.