Significance Levels
Hypothesis Testing
Setting the Bar for Evidence
The significance level α is the probability threshold for rejecting the null hypothesis, set before data collection. It directly controls the Type I error rate and shapes the stringency of your statistical test.
- Medical Research — Using α = 0.01 or stricter for high-stakes drug approvals
- Social Science — Balancing discovery rigor against exploratory flexibility
- Quality Control — Setting acceptance criteria for incoming materials
What You'll Learn
- 1State α as a long-run false positive rate and list the three probabilities it does not represent
- 2Choose α from the relative costs of false positives and false negatives before seeing data
- 3Explain how multiple testing inflates the family-wise error rate and apply Bonferroni and Šidák corrections
- 4Read critical values for one- and two-tailed tests and connect them to reported p-values
Every hypothesis test ends with a comparison: is the p-value smaller than the threshold you committed to? That threshold — the significance level, written α — is the most consequential number in the analysis and the only one that must be chosen with zero access to the results. It encodes how many false alarms you are willing to fund, how expensive a wrong approval would be, and how surprising the evidence must become before you abandon the null. Treating 0.05 as a natural constant rather than a policy decision is the root of much wasted research; this lesson builds the machinery to choose α on purpose.
Alpha as a Long-Run Error Rate
Formally, α is the maximum probability of rejecting a true null hypothesis:
Three clarifications prevent the standard misreadings. α is not the probability that the null hypothesis is true given the data — that would be a posterior probability requiring Bayes' theorem and a prior. It is not the probability that the observed result occurred by chance; the p-value, computed under the null, addresses that question and even then only as a tail-area statement. And α is not a property of the data at all: it is a property of your decision rule, fixed in the methods section, applied uniformly to whatever the sample delivers. The simulation below demonstrates the long-run contract: generate ten thousand samples from a population where the null is exactly true, run a t-test at α = 0.05 each time, and count rejections. The rate lands near 0.05 — the frequentist guarantee made concrete.
import numpy as np
from scipy import stats
np.random.seed(42)
n_experiments = 10_000
alpha = 0.05
false_positives = 0
for _ in range(n_experiments):
sample = np.random.normal(0, 1, 30) # true mean is exactly mu_0 = 0
_, p = stats.ttest_1samp(sample, popmean=0)
if p < alpha:
false_positives += 1
rate = false_positives / n_experiments
print(f"H0 true in every experiment; alpha = {alpha}")
print(f"Rejections: {false_positives}/{n_experiments} = {rate:.4f}")
print(f"Expected long-run rate: {alpha} (sampling error ~{np.sqrt(alpha * (1 - alpha) / n_experiments):.4f})")
Setting Alpha Before the Data Arrive
Choosing α after inspecting results — trying 0.05, then 0.10 "just to see," then pooling subgroups until something clears the bar — converts a controlled error rate into an unknown and usually inflated one. The five-subgroup example quantifies the damage: five independent looks at α = 0.05 yield at least one false positive with probability , more than four times the nominal rate. Pre-registration, analysis plans, and staged reporting are the institutional fixes, but the individual habit is simpler: write the threshold into the analysis plan before the first row of data lands, and treat any later change as a new experiment requiring its own correction. α is a promise to your future self about how skeptical you will be when the results are inconvenient.
| Commitment device | What it locks in | Typical use |
|---|---|---|
| Preregistered analysis plan | α, endpoints, subgroups | Clinical and academic studies |
| Sequential testing boundaries | Spending function for α | A/B tests peeked at daily |
| Registered report | Hypotheses and α before data | Journal pipelines |
| Analysis plan in the ticket | Threshold and exclusions | Product experimentation |
The Alpha-Power Trade-off
α does not act alone. For a fixed sample size, lowering α reduces false positives but also reduces power — the chance of detecting a true effect — pushing the complementary Type II error rate upward. With 32 observations and a true standardized effect of 0.5, a two-sided test at α = 0.05 delivers power near 0.47; relaxing to α = 0.10 lifts it toward 0.60; tightening to α = 0.01 drags it near 0.25. Each step trades one error type for the other, and the economics depend on consequences. A harmful drug approved on weak evidence can injure thousands, so medicine accepts low power and demands large trials instead. A missed product improvement costs the opportunity to ship, so many teams tolerate α = 0.10 for internal tests. The rule of thumb — set α from the cost ratio, then size the sample to recover the power you need — keeps the two knobs in the right order.
def recommend_alpha(false_positive_cost, false_negative_cost):
ratio = false_positive_cost / false_negative_cost
if ratio > 10:
alpha, rationale = 0.01, 'false positives very costly -> strict alpha'
elif ratio > 3:
alpha, rationale = 0.05, 'moderate false-positive concern -> standard alpha'
elif ratio > 1:
alpha, rationale = 0.10, 'false negatives relatively costly -> relaxed alpha'
else:
alpha, rationale = 0.20, 'screening context -> very relaxed alpha'
print(f"FP cost / FN cost = {ratio:.1f} -> alpha = {alpha} ({rationale})")
return alpha
print('Drug with severe side effects:')
recommend_alpha(100, 5)
print('Cancer screening test:')
recommend_alpha(1, 50)
print('Website A/B test:')
recommend_alpha(2, 3)
# Power at three alpha levels for the same design
from statsmodels.stats.power import TTestPower
power_analysis = TTestPower()
for alpha in [0.01, 0.05, 0.10]:
pwr = power_analysis.power(effect_size=0.5, nobs=32, alpha=alpha, alternative='two-sided')
print(f"alpha = {alpha:.2f} -> power = {pwr:.3f} (n = 32, true d = 0.5)")
One-Tailed versus Two-Tailed: Splitting the Threshold
The alternative hypothesis determines how α is distributed across the rejection region. A two-sided alternative splits α evenly into both tails, so α = 0.05 puts 0.025 beyond each critical value — z = 1.96 in a large-sample z-test. A one-sided alternative puts the whole 0.05 in one tail, z = 1.645. The choice is a scientific commitment, not a tuning parameter: you may only run a one-sided test if the opposite direction would be treated as evidence of no effect regardless of magnitude. Worked example — an observed z of 1.8 corresponds to a one-sided p of 0.0359 and a two-sided p of 0.0718. At α = 0.05 the one-sided framing rejects and the two-sided framing does not, from identical data. That flip is exactly why journals require the tail choice to be declared in advance, and why post-hoc switching to one-sided tests is a well-known p-hacking pattern.
| α | One-sided critical z | Two-sided critical z | Two-sided tail area |
|---|---|---|---|
| 0.10 | 1.282 | 1.645 | 0.05 per tail |
| 0.05 | 1.645 | 1.960 | 0.025 per tail |
| 0.01 | 2.326 | 2.576 | 0.005 per tail |
| 0.001 | 3.090 | 3.291 | 0.0005 per tail |
print(f"{'alpha':<8} {'one-sided z':<14} {'two-sided z'}")
for alpha in [0.10, 0.05, 0.025, 0.01, 0.005, 0.001]:
z_one = stats.norm.ppf(1 - alpha)
z_two = stats.norm.ppf(1 - alpha / 2)
print(f"{alpha:<8.3f} {z_one:<14.4f} {z_two:.4f}")
z_obs = 1.8
p_one = 1 - stats.norm.cdf(z_obs)
p_two = 2 * (1 - stats.norm.cdf(z_obs))
print(f"\nObserved z = {z_obs}: one-sided p = {p_one:.4f} | two-sided p = {p_two:.4f}")
print(f"At alpha = 0.05: one-sided {'rejects' if p_one < 0.05 else 'fails to reject'}, "
f"two-sided {'rejects' if p_two < 0.05 else 'fails to reject'}")
Multiple Testing Inflates the False Positive Rate
Run twenty independent tests, each at α = 0.05, on twenty true nulls and the probability of at least one false rejection is — a false positive is now more likely than not, even though every individual test honored its threshold. The family-wise error rate (FWER) is that compounded probability, and genomics, large-scale A/B platforms, and feature-selection sweeps all live with hundreds or millions of simultaneous tests, which is why genome-wide association studies set α near rather than 0.05. Two classical corrections restore control. Bonferroni divides α by the number of tests: 0.05/20 = 0.0025 per test, valid under any dependence structure and slightly conservative. The Šidák correction = 0.00256 per test is exact under independence and marginally more permissive. When the goal shifts from "any false positive is unacceptable" to "keep the proportion of false discoveries among rejections bounded," the Benjamini-Hochberg procedure offers a more powerful alternative — the subject of its own lesson.
np.random.seed(42)
n_tests = 20
alpha = 0.05
n_simulations = 10_000
any_false_positive = 0
for _ in range(n_simulations):
p_values = stats.ttest_1samp(np.random.normal(0, 1, (n_tests, 30)), 0, axis=1).pvalue
if np.any(p_values < alpha):
any_false_positive += 1
fwer_simulated = any_false_positive / n_simulations
fwer_theoretical = 1 - (1 - alpha) ** n_tests
bonferroni = alpha / n_tests
sidak = 1 - (1 - alpha) ** (1 / n_tests)
print(f"{n_tests} tests at alpha = {alpha}, all nulls true")
print(f"Simulated FWER: {fwer_simulated:.4f}")
print(f"Theoretical FWER: {fwer_theoretical:.4f}")
print(f"Bonferroni per-test alpha: {bonferroni:.4f}")
print(f"Sidak per-test alpha: {sidak:.4f}")
⚠️Peeking spends alpha you do not have
Field Conventions and Cost-Ratio Reasoning
The 0.05 convention traces to R. A. Fisher's 1920s tables and hardened into a default rather than a derivation. Fields have since diverged in instructive ways. Social science still uses 0.05, though a growing movement proposes 0.005 to align published effects with replicable ones. Medicine holds 0.05 for most trials and stricter thresholds for safety-critical endpoints. Particle physics demands five-sigma evidence — roughly — because the cost of a false discovery (and the volume of automated tests) is enormous. Genetics uses for the same compounding reason at a different scale. Quality control derives α from inspection economics: the producer's risk of rejecting a good lot and the consumer's risk of accepting a bad one set the operating characteristic curve, and α falls where those costs intersect. The unifying question is always the same — what does a false positive cost, and how many tests will I run?
| Field | Common α | Reasoning |
|---|---|---|
| Social science | 0.05 | Fisher's convention; 0.005 proposed for replicability |
| Clinical medicine | 0.05 or 0.01 | Patient safety; sometimes one-sided |
| Psychology | 0.05 | Replication crisis driving reform |
| Genetics (GWAS) | 5 × 10⁻⁸ | Millions of simultaneous tests |
| Particle physics | ≈ 3 × 10⁻⁷ (5σ) | Extraordinary claims, huge test volumes |
| Product A/B tests | 0.05 or 0.10 | Balanced against shipping speed |
| Industrial acceptance | Varies | Producer and consumer risk economics |
Reporting and Reproducibility Checklist
An α value without context is half a statement. Complete reporting names the threshold in the methods section before results appear, states whether the test is one- or two-sided, discloses the number of tests and any correction applied, and reports the exact p-value alongside the binary decision so readers can re-threshold at their own α. When the analysis plan changes — new endpoint, added subgroup, extended sample — the revision is documented with its date, because an undocumented amendment is indistinguishable from outcome-driven tuning. These habits cost minutes and buy the one thing peer review cannot reconstruct after the fact: evidence that the skepticism was genuine.
# A compact pre-analysis plan rendered as code
analysis_plan = {
'primary_endpoint': 'conversion_rate',
'alpha': 0.05,
'alternative': 'two-sided',
'planned_sample_size': 4000,
'multiplicity': 'Bonferroni across 2 secondary endpoints',
'peeking': 'fixed horizon, no interim looks',
}
print("Pre-analysis plan:")
for key, value in analysis_plan.items():
print(f" {key}: {value}")
secondary_bonferroni = analysis_plan['alpha'] / 2
print(f"\nSecondary endpoint threshold: {secondary_bonferroni:.4f}")
print("Every later p-value is judged against the plan, not against mood.")
Common Mistakes
Treating p less than 0.05 as proof the null is false
Fix: α controls the long-run false positive rate; it says nothing about the probability the null is true. Report the effect size and confidence interval beside the decision.
Choosing α after seeing the data, or mid-analysis
Fix: Fix α in a written plan before collection; any later change is a new analysis requiring disclosure and multiplicity correction.
Running many tests at α = 0.05 with no correction
Fix: Apply Bonferroni or Šidák for FWER control, or Benjamini-Hochberg when a bounded false discovery rate is acceptable.
Best Practices
- Derive α from the relative costs of false positives and false negatives, not from habit
- State the α, tail choice, and multiplicity plan in the methods section before results
- Report exact p-values plus effect sizes and confidence intervals, not just reject/fail decisions
- Size the sample for target power at your chosen α before the study begins
Key Takeaways
- α is the long-run probability of rejecting a true null hypothesis — one false positive every twenty studies at α = 0.05
- It must be fixed before data collection; post-hoc adjustment turns a known error rate into an unknown one
- Lowering α reduces false positives but also lowers power, so the trade-off must be priced with the costs of both error types
- Multiple tests compound: twenty tests at 0.05 give a 64 percent chance of at least one false positive unless corrected
Frequently Asked Questions
Is α = 0.05 required for a result to be valid?
No. 0.05 is a century-old convention, not a theorem. What matters is that α is stated in advance, justified by the error costs of the application, and applied consistently — some fields legitimately run at 0.01, 0.005, or 0.10.
How is α different from the p-value?
α is the threshold you commit to before the experiment; the p-value is computed from the observed data under the null. The decision rule is mechanical: reject when the p-value falls below α. Confusing the two produces statements like "there is a 5 percent probability the null is true," which the frequentist framework does not support.
What should I do if my p-value is 0.06 at α = 0.05?
Report the exact p-value, the effect size, and the confidence interval, and conclude that the evidence did not meet the pre-committed threshold. Do not relax α, switch to a one-sided test, or drop outliers until it clears — each move invalidates the error guarantee you paid for with your sample size.
Interview Questions
Q1: What does rejecting a hypothesis at α = 0.05 actually assert?
It asserts that data at least this extreme would occur no more than 5 percent of the time if the null were true — a statement about the long-run false positive rate of the procedure, not about the probability that this particular null is true.
Q2: Why must alpha be set before data collection?
Choosing α after seeing results converts a controlled Type I error rate into an unknown, inflated one. Any flexibility in the threshold is flexibility a motivated analyst will exploit, consciously or not.
Q3: Twenty tests run at α = 0.05 with no correction. What is the chance of at least one false positive?
1 − 0.95²⁰ ≈ 0.642 under independence. Bonferroni would set each per-test threshold to 0.0025, restoring family-wise error to at most 0.05 under any dependence structure.
Q4: How does α relate to statistical power?
Power is 1 − β, the probability of detecting a true effect. Holding sample size fixed, decreasing α shrinks the rejection region and therefore shrinks power; recovering the original power requires a larger sample.