Hypothesis tests
| English | Chinese | Pinyin |
|---|---|---|
| hypothesis test | 假设检验 | jiǎ shè jiǎn yàn |
| null hypothesis | 原假设 | yuán jiǎ shè |
| alternative | 备择假设 | bèi zé jiǎ shè |
| one-tailed | 单尾 | dān wěi |
| two-tailed | 双尾 | shuāng wěi |
| significance level | 显著性水平 | xiǎn zhù xìng shuǐ píng |
| test statistic | 检验统计量 | jiǎn yàn tǒng jì liàng |
| rejection region | 拒绝域 | jù jué yù |
| critical value | 临界值 | lín jiè zhí |
| Type I error | 第一类错误 | dì yī lèi cuò wù |
| Type II error | 第二类错误 | dì èr lèi cuò wù |
The courtroom of statistics
- A drug company claims their new medicine works better than the old one. How do you decide if the evidence is strong enough?
- Hypothesis testing 假设检验 is the statistical equivalent of a courtroom: you assume the defendant (the null hypothesis 原假设) is innocent until proven guilty beyond reasonable doubt.
Setting up the hypotheses
- A hypothesis test uses sample data to judge a claim.
- The null hypothesis $H_0$ — the default position (usually "no change" or "no effect").
- The alternative 备择假设 $H_1$ — what you suspect is true.
- One-tailed 单尾 if $H_1$ points one way ($\mu > 50$); two-tailed 双尾 if both ($\mu \neq 50$).
Worked example. A machine fills bottles with 500 mL. You suspect it's underfilling. $H_0: \mu = 500$ (machine is correct). $H_1: \mu < 500$ (underfilling). This is a one-tailed test.

A two-tailed 5% test rejects H0 in the shaded tails beyond plus or minus 1.96
The rejection region
reject H₀ if z < −z*
The shaded tail is the rejection region — if the test statistic lands there, reject H₀.
The null hypothesis H₀ usually states that:
H₀ is the claim being tested, usually "no change"; H₁ is the suspected alternative.
If H₁ states μ > 50, the test is:
H₁ pointing in one direction (μ > 50 or μ < 50) makes it a one-tailed test.
Running the test
- Fix a significance level 显著性水平 (often 5%), compute a test statistic 检验统计量, and see if it lands in the rejection region 拒绝域.
- If $|z|$ exceeds the critical value 临界值 (1.96 for 5% two-tailed, 1.645 for 5% one-tailed), reject $H_0$.

A one-tailed test at 5% rejects H₀ only if the test statistic lands in the shaded tail.
Significance level is NOT the probability that $H_0$ is true. A 5% significance level means: if $H_0$ is true, there's a 5% chance of getting data this extreme. It does NOT mean there's a 5% chance $H_0$ is true.
Types of error
- Type I error 第一类错误: rejecting $H_0$ when it is true (false positive). Probability = significance level $\alpha$.
- Type II error 第二类错误: accepting $H_0$ when it is false (false negative).
A Type I error is:
Type I = reject a true H₀; Type II = accept a false H₀.
A Type II error means accepting H₀ when it is actually false.
Type II = fail to reject a false H₀ (false negative).
Worked example — z-test
- $H_0: \mu = 50$, $H_1: \mu \neq 50$ (two-tailed, 5% level). $\sigma = 8$, $n = 64$, $\bar{x} = 52$.
- $z = \dfrac{52 - 50}{8/\sqrt{64}} = \dfrac{2}{1} = 2$.
- Critical value for 5% two-tailed: $1.96$. Since $2 > 1.96$, reject $H_0$.
- Set a null and alternative hypothesis; the test statistic falls in the critical region (reject) or the acceptance region. A Type II error is accepting a false $H_0$. Tests may use a binomial or Poisson distribution.
Population mean claimed 50, σ = 8, sample n = 64, x̄ = 52. What is z = (x̄ − μ)/(σ/√n)?
z = (52 − 50)/(8/√64) = 2/(8/8) = 2/1 = 2.
For a 5% two-tailed test, you reject H₀ if |z| > 1.96.
The critical value for a 5% two-tailed test is 1.96. If |z| exceeds this, reject H₀.
You've got it
- $H_0$ (no change) vs $H_1$ (suspected); one- or two-tailed
- test statistic $z = \dfrac{\bar{x} - \mu}{\sigma/\sqrt{n}}$; reject $H_0$ if it's in the rejection region
- Type I = reject a true $H_0$; Type II = accept a false $H_0$