Back to List

What Hypothesis Testing Actually Asks: Could Chance Alone Produce the Difference?

Understand whether an observed difference could arise from sampling variation through null and alternative hypotheses, p-values, significance level, and two kinds of error.

Beginner
|
48min
|
Verified (2026-08-14)
null hypothesisalternative hypothesisp-valuesignificance levelType I errorType II errorpowerJMP
Progress0/19 (0%)

Existing process A had mean yield 84.2 and improved process B had mean 85.5, a difference of 1.3. Because B is larger, can we immediately declare improvement?

Not yet. Even if the two population means are equal, different samples can have different sample means. First ask how easily a difference like 1.3 could appear in a reference world with no effect.

This unit asks one question.
Could sampling variation alone reasonably produce the observed difference?

A hypothesis test is not a machine that decides whether a cause exists. It defines a reference statistical model and measures how extreme the result is under that model, providing one part of the evidence.

귀무가설 H0기준 차이 또는 효과가 없다는 검정의 출발 모형
대립가설 H1연구 질문이 겨냥하는 차이의 방향과 형태
p-valueH0 아래 관측값 이상으로 극단적인 결과의 확률
유의수준 αH0가 참일 때 감수할 제1종오류의 사전 기준

At least two explanations lie behind an observed difference

When a sample shows a difference of 1.3:

  • population means may be equal and sampling variation produced 1.3;
  • population means may differ and that difference contributed to 1.3.

The first explanation becomes the reference world, the null hypothesis H0. For example, H0: μB−μA=0 states no population-mean difference.

The research alternative is H1. A non-directional question uses H1: μB−μA≠0; a prespecified improvement-only question might use H1: μB−μA>0.

Figure 01 · 두 설명의 경쟁
관측 차이는 H0 세계에서도 생길 수 있고 H1 세계에서도 생길 수 있습니다
H0 · 기준 차이 0H1 · 실제 차이 존재관측된 검정통계량
가설검정은 어느 세계가 참일 확률을 직접 계산하지 않습니다. 먼저 H0가 만든 표집분포에서 현재 결과가 얼마나 이례적인지를 평가합니다.

H0 and H1 are not labels attached after seeing favorable data. Connect the effect definition, direction, design, and analysis model to the research question in advance.

H0 is a calculation reference, not a preferred truth

We do not begin because we believe H0 is completely true in reality. It supplies a no-effect reference model for examining how compatible the current data are with that model.

A test statistic puts the difference on a common scale

A difference of 1.3 is difficult to judge alone. It carries different evidence when observations barely vary versus when they are widely dispersed.

A test statistic generally follows this intuition:

test statistic = difference between observed effect and H0 expectation / standard error of the effect

It expresses how far the effect lies from the H0 reference relative to sampling variation. The specific statistic may be t, F, χ², or a rank statistic depending on the question and structure. Later units choose among one, two, or many groups; continuous or categorical outcomes; and independent or paired designs.

A p-value is a tail probability under H0

Omitting its starting condition creates most p-value misunderstandings.

Assuming H0 and the test-model assumptions hold, the probability of a test statistic as extreme as or more extreme than the observed value in the direction defined by H1.

Figure 02 · p-value의 자리
p-value는 H0 분포에서 관측값 이상으로 극단적인 꼬리 면적입니다
H0 아래 검정통계량 분포p/2p/2
양측 검정에서는 양쪽 방향의 극단성을 합칩니다. p-value는 H0가 참일 확률, 결과가 우연일 확률 또는 효과의 크기가 아닙니다.

For a two-sided p=.03, under H0 and the model, about 3% of repeated results would have test statistics at least this extreme in either direction.

p=.03 does not mean:

  • H0 has a 3% probability of being true;
  • chance caused the result with 3% probability;
  • H1 has a 97% probability of being true;
  • 97% of repetitions will reproduce the result;
  • the effect is large or biologically important.
A p-value is not a property of the data alone

The same numerical table can produce different p-values under different test directions, independent versus paired structures, distributional models, missing-data rules, or test statistics. A p-value without what was tested loses its meaning.

Set significance level α before seeing the data

Significance level α sets the long-run willingness to make a Type I error: rejecting H0 when H0 is true. Choosing α=.05 uses a rule allowing about 5% false positives in repeated settings where H0 and all procedural assumptions hold.

p < αH0 기각

H0 기준 세계에서 보기 드문 결과라는 증거

p ≥ αH0 기각하지 못함

효과 없음의 증명이 아니라 증거 부족

효과크기차이는 얼마나 큰가?

통계적 유의성과 별개의 실질적 질문

신뢰구간어떤 효과가 자료와 양립하는가?

추정의 범위와 방향을 함께 표현

If p<α, the result is sufficiently extreme under H0 to reject H0. If p≥α, there is insufficient evidence to reject H0. We have not accepted or proved H0.

With small samples and large spread, an important effect can still produce p≥α. Therefore “not significant = no difference = equivalent” is invalid. Equivalence requires prespecified equivalence margins and an analysis designed for that question.

0.049 and 0.051 are not different universes

A threshold creates a decision rule, but evidence strength does not flip discontinuously at the boundary. Report the exact p-value with effect size, confidence interval, design quality, and practical importance.

One-sided and two-sided tests encode direction

A two-sided H1 treats both larger and smaller effects as differences. A right-sided H1 targets larger values; a left-sided H1 targets smaller values.

Figure 04 · 방향은 사전에
양측은 두 방향을, 단측은 연구가 정한 한 방향을 검정합니다
양측 H1: 차이가 있다α/2α/2단측 H1: 더 크다α
데이터를 보고 유리한 방향의 단측검정으로 바꾸면 제1종오류 기준이 무너집니다. 반대 방향의 중요한 변화도 놓쳐서는 안 되는 질문이라면 양측이 자연스럽습니다.

A one-sided test places all α in one tail and can more readily detect an effect in the prespecified direction. It does not count a large effect in the opposite direction as evidence for that H1. Therefore:

  1. choose direction with the research question before seeing data;
  2. justify why the opposite direction is scientifically irrelevant or handled by a separate safety decision;
  3. report unexpected opposite-direction results.

Changing a two-sided test to a favorable one-sided test after seeing the mean can inflate the actual Type I error above the promised α.

The two error types are different failures

Figure 03 · 판단의 네 칸
검정 결과에는 항상 두 종류의 오류 가능성이 남습니다
판단H0 기각 안 함H0 기각실제 세계H0 참옳은 결정H0 참제1종오류 αH1 참제2종오류 βH1 참검정력 1−β
α는 H0가 참인데 기각하는 장기 비율입니다. β와 검정력은 특정한 실제 효과를 정해야 계산할 수 있으며 U13에서 자세히 다룹니다.
  • Type I error: reject a true H0; a false positive claiming an effect that is absent.
  • Type II error: fail to reject H0 when a specified H1 is true; a false negative missing a real effect.
  • Power 1−β: probability of correctly rejecting H0 under a specified H1.

α is set before analysis, but β is not one universal constant. It depends on true effect size, spread, n, test direction, and method. Larger effects, smaller spread, and more independent units are generally easier to detect. Unit 13 develops sample size and power.

Repetition changes p-values too

The Lab repeats a one-sample z test in a simple normal model with reference mean μ0=10 and known σ=3. It is an educational model connecting sampling variation, p-values, and errors—not a replacement for choosing a real analysis.

  1. At δ=0 with a two-sided test, inspect 80 p-values. Even with true H0, some may be below .05.
  2. Press New batch of 80 and watch false-positive counts vary.
  3. Increase δ through 0.5, 1.0, and 1.5; compare n=8 with n=32.
  4. With positive δ, choose a “smaller” one-sided H1 and observe the conflict between data direction and question direction.
처음이라면: 무엇을 눌러야 하나요?
  1. 1. 질문을 먼저 읽기Lab 제목에서 이번에 비교할 한 가지를 확인합니다.
  2. 2. 조건 하나만 바꾸기처음에는 n, 효과, 산포 같은 입력 중 하나만 바꾸십시오.
  3. 3. New batch of 80 누르기새 합성 데이터가 만들어집니다. 같은 조건도 표본에 따라 달라질 수 있습니다.
  4. 4. p-value distribution and rejection count 비교하기바꾸기 전후 무엇이 움직이고 무엇이 그대로인지 한 문장으로 적어보십시오.

막히면 초기화로 돌아가 기본 결과를 본 뒤 조건 하나만 바꾸십시오. 이 Lab은 정답 판정기가 아니라 패턴 관찰 도구입니다.

In-Silico Lab · Hypothesis Testing

같은 세계에서도 p-value가 달라지는 것을 보세요

기준 평균 μ0=10, 알려진 σ=3인 교육용 정규모형입니다. 실제 평균 차이, 독립 n과 검정 방향을 바꾸며 80개 반복 p-value를 관찰합니다.

같은 설정으로 반복한 80개 p-value

α=.05
p<.05 p≥.05

첫 표본과 반복 결과

첫 x̄9.857
첫 z-0.213
첫 p0.8312
첫 판단H0 기각 못함
80회 p<.055/80

H0가 참이어도 일부 표본은 α=.05에서 거짓 양성을 만듭니다.

교육용 one-sample z test: μ0=10 · known σ=3 · α=.05 · 정규 독립표집 · simulator_version: u07-ztest-guided-v1. 실제 연구에서는 알려지지 않은 σ, 설계 구조, 검정 가정, 다중성 등을 반영한 방법을 선택해야 합니다.

Exactly four of 80 need not have p<.05. α=.05 is not a quota for every batch; it is a long-run error rate under many repetitions of the same procedure.

Distinguish three routes to a smaller p-value

  • A larger observed effect can increase the test statistic.
  • Smaller spread makes the same effect clearer.
  • Larger independent n reduces standard error, so even a tiny effect can yield a small p-value.

Thus p<.001 in a huge sample may accompany a trivial practical effect, while p=.08 in a small exploratory study does not rule out an important effect. Read effect size and CI in both cases.

JMP output separates parts of the evidence

JMP report names vary by analysis, but the core relationship joins the test statistic, p-value, H1, effect, and confidence interval.

Test Statistic

효과를 표준오차와 비교해 H0 기준 척도로 옮긴 값입니다.

Prob > |t| 또는 p-value

선택한 양측·단측 H1에 맞는 꼬리확률을 읽습니다.

Difference + Confidence Interval

차이의 방향·크기와 양립 가능한 범위를 p-value와 함께 봅니다.

Output such as Prob > |t| identifies the tails used in a two-sided t test. For a one-sided p-value, verify that the statistic sign matches the prespecified H1. Do not select whichever p-value appears smallest after analysis.

Figure 05 · 검정의 흐름
α와 가설은 데이터를 보기 전에, 해석은 효과크기와 함께 정합니다
질문효과·방향가설H0 · H1기준α · 모형자료통계량 · p결론효과 · CI와 함께p<α만 남기지 말고 질문·가정·효과의 크기까지 다시 연결하기
p-value는 전체 판단 흐름의 한 요소입니다. 검정 선택, 가정, 누락·다중성·표본 구조도 결론에 영향을 줍니다.

Statistical software does not guarantee that:

  1. each row is the correct independent experimental unit;
  2. assumptions and sample selection are valid;
  3. only favorable analyses were not selected from many outcomes;
  4. the effect is biologically, clinically, or qualitatively important;
  5. a new experiment will reproduce the result.

Report more than reject or fail to reject

Bad:

The improved process works because p<.05.

Better:

In a prespecified two-sided analysis of independent batches, mean yield difference B−A was 1.3 percentage points, with 95% CI −1.8–4.4 and p=.39. This sample did not reject H0; it does not establish no improvement or equivalence of the processes.

Preserve the method, independent n, effect units, CI, exact p-value, test direction, and whether the analysis was prespecified. A p-value is part of an evidence sentence, not a one-character conclusion.

Seven statements to check before finishing

  • H0 is a no-effect reference model; H1 carries the research direction.
  • A test statistic scales the observed effect by its standard error under H0.
  • A p-value is the probability, under H0 and the model, of an equally or more extreme result.
  • A p-value is neither the probability H0 is true nor the effect size.
  • At p≥α, fail to reject H0; do not accept it.
  • α is the Type I error criterion under true H0 and is set before data.
  • A rejection decision cannot replace effect size, CI, design, and practical meaning.
p-value는 효과가 존재할 확률이 아닙니다. H0와 모형이 만든 기준 세계에서 현재 결과가 얼마나 극단적인지를 보여주며, 효과크기·CI·설계·생물학적 의미와 함께 읽어야 합니다.

The next unit asks whether spread is equal before comparing two group means. We examine equal-variance assumptions and why one variance-test result should not mechanically choose the entire analysis.

Official supplementary resources

The numbers, figures, and In-Silico Lab in this article are synthetic material for explaining statistics. They cannot support real research, clinical, quality, or regulatory decisions.

💬 Questions & Comments

0 comments

You can post without signing in. Guest comments cannot be edited or deleted by their author.

0/2000

Loading...