Hypothesis tests
Đã giới thiệu| English | Ý nghĩa |
|---|---|
| hypothesis test/haɪˈpɒθəsɪs test/ | kiểm định giả thuyết |
| null hypothesis/nʌl haɪˈpɒθəsɪs/ | giả thuyết không |
| alternative/ɔːlˈtɜːnətɪv/ | giả thuyết thay thế |
| one-tailed/wʌn teɪld/ | một phía |
| two-tailed/tuː teɪld/ | hai phía |
| significance level/sɪɡˈnɪfɪkəns ˈlevl/ | mức ý nghĩa |
| test statistic/test stəˈtɪstɪk/ | thống kê kiểm định |
| rejection region/rɪˈdʒekʃn ˈriːdʒn/ | vùng bác bỏ |
| critical value/ˈkrɪtɪkl ˈvæljuː/ | giá trị tới hạn |
| Type I error/taɪp aɪ ˈerə/ | lỗi loại I |
| Type II error/taɪp ˈtuː ˈerə/ | Lỗi loại II |
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:
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
H₀ is the claim being tested, usually "no change"; H₁ is the suspected alternative.
If H₁ states μ > 50, the test is:
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
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:
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
Type I = reject a true H₀; Type II = accept a false H₀.
A Type II error means accepting H₀ when it is actually false.
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
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)?
Độ khó 2/5 · 140 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
z = (52 − 50)/(8/√64) = 2/(8/8) = 2/1 = 2.
For a 5% two-tailed test, you reject H₀ if |z| > 1.96.
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
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$
Write from a test that does not reject
- H0 says the mean wait is 8 minutes. H1 says it is greater than 8. The test statistic is 1.2 and the critical value is 1.96.
For an upper-tail test of a mean of 8 minutes, the statistic is 1.2 and the 5 percent critical value is 1.96. What is the decision?
The statistic has not reached the critical value, so H0 stays in place.
What is the decision?
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
1.2 is below 1.96, so the upper-tail test does not reject H0.