All Revision Notes

COM6005 Statistical Modeling · Module 3

Confidence Interval & Hypothesis Testing: Concepts

COM6005 · Module 3 · Source: M3_CI_HT_Concepts_v2_L02_complete.pdf (24 slides,by Carlin Chu)

Contents · 12 sections

🎯 本講重點 (Learning outcomes)

  • 分清 point estimate 同 interval estimate;理解 unbiasedness E(xˉ)=μE(\bar x)=\mu。
  • 由 sampling distribution(Central Limit Theorem)推導 Confidence Interval,並正確解讀 95% 嘅意思。
  • 識計 Z-based 同 t-based CI,識查 critical value(1.645 / 1.96 / 2.576)。
  • 理解 Hypothesis testing 嘅邏輯:H0/H1H_0 / H_1、significance level α\alpha、p-value、rejection region、one-tailed vs two-tailed。
  • Type I error (α\alpha)、Type II error (β\beta)、Power (1−β1 - \beta);statistical vs practical significance。
  • CI 同 Hypothesis test 係「同一個銀幣嘅兩面」。

⭐ 考試必溫 Top-5

  1. CI 公式:xˉ±zα/2 σ/n\bar x \pm z_{\alpha/2}\,\sigma/\sqrt n(σ\sigma known)或 xˉ±tα/2,n−1 s/n\bar x \pm t_{\alpha/2,n-1}\, s/\sqrt n,同埋 slide 11 嘅推導。
  2. 95% CI 嘅正確解讀:重複呢個 procedure 好多次,95% 嘅 interval 會 cover 真正 μ\mu(唔係「μ\mu 有 95% 機會喺呢個 interval」)。
  3. p-value 定義:假設 H0H_0 成立,得到 equal to or more extreme 結果嘅 conditional probability;p<αp < \alpha → reject H0H_0。
  4. Type I / Type II error / Power 表,α\alpha = Type I error = significance level。
  5. One-tailed vs two-tailed 嘅 H0/H1H_0/H_1 寫法同 rejection region;95% CI 唔包 μ0\mu_0 ⇔ two-tailed test p<0.05p < 0.05。

1. 乜嘢係 Confidence Interval?(Candy Jar)

Slide 2:老師帶咗一大罐朱古力入課室,問「入面有幾多粒?」

  • The Exact Guess (Not a CI):你估「500」。要 100% 啱好難——真數係 501 你都錯。
  • The Confidence Interval (Range Guess):「我有 95% 信心粒數喺 450 至 550 之間。」
  • The Interval:450 至 550 呢個 range estimate。
  • The Confidence Level:95% 即係如果你用同一種聰明方法估 100 個唔同嘅罐,大約有 95 次個 range 會估啱。

科學家數唔晒全世界,就測試一小組(sample),再為所有人(population)俾一個「安全 range」。

2. Point estimate 同 Unbiasedness

Inferential statistical process(slide 3):

  • Point estimate:sample statistic → population parameter,即 xˉ,s2→μ,σ2\bar x, s^2 \to \mu, \sigma^2。
  • Inductive reasoning:用 sample 去總結 population 嘅特徵。
  • Point estimator 常見嘅性質:Unbiasedness E(xˉ)=μE(\bar x) = \mu——「好多個」sample mean 嘅平均 = 真正 population mean。每個 sample 只會俾一個特定嘅 point estimate。

Slide 4 “Which one is ‘correct’??”:三個 sample 分別得到 xˉ=12,10,13\bar x = 12, 10, 13,如果只信 point estimate,就會分別得出「population mean 係 12 / 10 / 13」——三個答案互相矛盾,冇一個肯定啱。

3. 點解需要 Confidence Interval?

Slide 5:

  • 實務上通常只有一個 sample,結果幾乎肯定(almost surely)同真值唔同。
  • 點樣更好咁估 population parameter?→ Interval estimate。
  • Interval estimate 建基於 sampling distribution 嘅統計性質,例如 Central Limit Theorem:sample mean is normally distributed。
  • Meaning of C.I.:95% of the results from the C.I. procedure will contain the true population mean → the C.I. procedure is good to be used。
💡 直覺理解:Central Limit Theorem

就算原始數據唔係 normal,只要 n 夠大,xˉ\bar x 嘅 sampling distribution 都近似 N(μ,σ2/n)N(\mu, \sigma^2/n)。σ/n\sigma/\sqrt n 叫 standard error:n 越大,xˉ\bar x 越集中喺 μ\mu 附近,CI 越窄。

3.1 Notation(slide 6)

MeanStandard deviation
Populationmu (μ\mu)Sigma (σ\sigma) or σμ\sigma_\mu
Samplex-bar (xˉ\bar x)σxˉ\sigma_{\bar x} or ss

4. Interval estimate 公式

Slide 7 嘅 t-based interval(σ\sigma 未知,用 sample SD s):

xˉ−tn−1sn  ≤  μ  ≤  xˉ+tn−1sn\bar x - t_{n-1}\frac{s}{\sqrt n} \;\le\; \mu \;\le\; \bar x + t_{n-1}\frac{s}{\sqrt n}

各部分(slide 7 標註):xˉ\bar x = sample mean;ss = sample SD;nn = sample size;tn−1t_{n-1} = distribution value(critical value)。Slide 7 用三個 sample(xˉ=12,10,13\bar x = 12, 10, 13)各自砌出一個 interval(例如 10–14、7.5–12.5、12–14),表示「95% of chance that the population mean falls in the interval」——每個 sample 嘅 interval 都唔同,有啲 cover 到真 μ\mu、有啲 cover 唔到。

4.1 Boundary、alpha 同 tails(slides 8–10)

  • Slide 8:standard normal 曲線下面積 = probability,例如 P(Z<−1)P(Z < -1)(左尾陰影)同 P(Z>−1)P(Z > -1)(其餘部分);兩者加埋 = 1。
  • Slide 9(Two tail case):α\alpha 分喺左尾同右尾兩邊,中間係 1−α1 - \alpha。
  • Slide 10(Empirical rule):
⭐ 68–95–99.7 rule(slide 10)
  • 約 68.3% 數據喺 μ±1σ\mu \pm 1\sigma 之內
  • 約 95.5% 喺 μ±2σ\mu \pm 2\sigma 之內
  • 約 99.7% 喺 μ±3σ\mu \pm 3\sigma 之內

“What is alpha for 6 sigma?”(即 μ−3σ\mu - 3\sigma 至 μ+3σ\mu + 3\sigma,總闊度 6σ6\sigma)→ α=1−99.7%=\alpha = 1 - 99.7\% = 0.3%。
每段面積:μ\mu 至 μ±1σ\mu \pm 1\sigma 各 34.1%;1σ1\sigma 至 2σ2\sigma 各 13.6%;2σ2\sigma 至 3σ3\sigma 各 2.1%;3σ3\sigma 以外各 0.1%。

4.2 由 sampling distribution 推導 CI(slide 11)

假設 xˉ\bar x normally distributed 而 σ\sigma 已知:

P(−zα/2≤Z≤zα/2)=1−αP ⁣(−zα/2≤xˉ−μσ/n≤zα/2)=1−αP ⁣(−zα/2σn−xˉ≤−μ≤zα/2σn−xˉ)=1−αP ⁣(zα/2σn+xˉ≥μ≥−zα/2σn+xˉ)=1−αP ⁣(xˉ−zα/2σn≤μ≤xˉ+zα/2σn)=1−α\begin{aligned} &P(-z_{\alpha/2} \le Z \le z_{\alpha/2}) = 1-\alpha \\ &P\!\left(-z_{\alpha/2} \le \frac{\bar x-\mu}{\sigma/\sqrt n} \le z_{\alpha/2}\right) = 1-\alpha \\ &P\!\left(-z_{\alpha/2}\frac{\sigma}{\sqrt n} - \bar x \le -\mu \le z_{\alpha/2}\frac{\sigma}{\sqrt n} - \bar x\right) = 1-\alpha \\ &P\!\left(z_{\alpha/2}\frac{\sigma}{\sqrt n} + \bar x \ge \mu \ge -z_{\alpha/2}\frac{\sigma}{\sqrt n} + \bar x\right) = 1-\alpha \\ &P\!\left(\bar x - z_{\alpha/2}\frac{\sigma}{\sqrt n} \le \mu \le \bar x + z_{\alpha/2}\frac{\sigma}{\sqrt n}\right) = 1-\alpha \end{aligned}
⭐ 考試重點:推導步驟
  1. 由 standard normal 開始:中間面積 1−α1 - \alpha。
  2. 代入 Z=(xˉ−μ)/(σ/n)Z = (\bar x - \mu)/(\sigma/\sqrt n)。
  3. 乘 σ/n\sigma/\sqrt n,再減 xˉ\bar x。
  4. 乘 −1(不等號反轉)。
  5. 整理成 xˉ±zα/2 σ/n\bar x \pm z_{\alpha/2}\,\sigma/\sqrt n。
Confidence level 1−α1 - \alphaα\alphazα/2z_{\alpha/2}(two-sided)zαz_\alpha(one-sided)
90%0.101.6451.282
95%0.051.961.645
99%0.012.5762.326

(呢啲數就係 t-table 最底 ∞ 嗰行;Python:stats.norm.ppf(0.975) = 1.96。)

4.3 Worked example:計 CI

⭐ 例 1(Z-based,用 slide 19 嘅數據)

xˉ=13, s2=3, n=100\bar x = 13,\ s^2 = 3,\ n = 100。求 μ\mu 嘅 95% 同 99% CI。

  1. Standard error:s/n=3/10=0.1732s/\sqrt n = \sqrt 3/10 = 0.1732(n=100n = 100 大,用 z 近似)
  2. 95%:z0.025=1.96z_{0.025} = 1.96 → margin of error = 1.96 × 0.1732 = 0.3395
  3. 95% CI = 13 ± 0.3395 = (12.66, 13.34)
  4. 99%:2.576 × 0.1732 = 0.4462 → 99% CI = (12.55, 13.45)(confidence 越高,interval 越闊)
⭐ 例 2(t-based,Module 3a 腫瘤數據)

n=10n = 10,yˉ=1.74\bar y = 1.74,s=2.6505s = 2.6505。求 95% CI。

  1. df=n−1=9df = n - 1 = 9;查 t-table α=0.025\alpha = 0.025(two-sided 95%)→ t0.025,9=2.262t_{0.025,9} = 2.262
  2. SE=2.6505/10=0.8381SE = 2.6505/\sqrt{10} = 0.8381
  3. Margin = 2.262 × 0.8381 = 1.896
  4. 95% CI = 1.74 ± 1.896 = (−0.156, 3.636)

4.4 正確解讀 CI(slide 12)

⭐ Interpretation(slide 12)

Given a set of random sample, you can follow the above procedure to construct an interval to ‘cover’ the true underlying parameter. If the procedure is repeated for hundreds of times, (1−α1 - \alpha)% of the constructed intervals will cover the true value.

⚠️ 常見錯誤

μ\mu 係一個固定(但未知)嘅數,唔係 random;random 嘅係 interval。所以嚴格嚟講唔應該話「μ\mu 有 95% 機會喺 (12.66, 13.34) 入面」,而應該話「用呢個 procedure 砌出嚟嘅 interval,長遠有 95% 會 cover μ\mu」。

5. Hypothesis Testing 嘅推理(Coin Toss Challenge)

Slide 14:朋友擲硬幣連續 5 次 Heads,你懷疑個硬幣有古惑。

  • H0H_0 (Null Hypothesis,Boring Idea):硬幣完全正常,佢只係好彩。
  • H1H_1 (Alternative Hypothesis,Detective Idea):硬幣被做咗手腳,傾向出 Heads。
  • The Math Check:假設公平硬幣 p=0.5p = 0.5,P(HHHHH)=0.55=0.03125≈3%P(HHHHH) = 0.5^5 = 0.03125 \approx 3\%。
  • The Decision:3% 對「純粹好彩」嚟講太低 → reject H0H_0,硬幣好大機會有古惑。但即使 H0H_0 其實啱,都有機會判錯(have risk even H0H_0 is correct)。
  • Pre-specified acceptable level of risk = significance level α=0.05\alpha = 0.05;0.03125 < 0.05 → reject。

Hypothesis testing 就係一個正式、逐步嘅方法去問:「呢個證據夠唔夠強去支持新理論,定只係巧合?」

5.1 Hypothesis 同 probability(slide 15)

  • Population characteristic 嘅可能狀態叫 hypothesis,例如 H0:Population mean=10H_0: \text{Population mean} = 10;H1:Population mean≠10H_1: \text{Population mean} \ne 10。
  • Hypothesis testing 嘅「probability」係 conditional probability:假設 null 為真,得到 equal to or more extreme 結果嘅機率。
  • 佢 NOT 係 H0H_0 發生嘅機率。要計「某個 state 發生嘅機率」要用 Bayesian approach(out of scope)。

5.2 Logic of Hypothesis testing(slide 16)

  • 根據 sampling distribution 作「induced judgement」:observed sample statistic → population parameter;observed values → H0H_0 或 H1H_1。
  • 假設 H0H_0 為真,有幾大機會見到咁嘅結果?如果機會低過預先指定嘅 significance level α\alpha,就 reject null,改為接受 alternative。→ 有機會作出錯誤結論。
  • 研究者通常將佢嘅「hope」放喺 alternative hypothesis;reject null 時 hope 就得到支持。
  • Significance level α\alpha = Type I error。

6. Type I、Type II error 同 Power

⭐ 考試重點(slide 17)
Test result \ Actual situationH0H_0 is false(H1H_1 真)H0H_0 is true
Reject H0H_0(+ve)TP:Power (1−β1 - \beta) ✔FP:Type I error (α\alpha) ✘
Do not reject H0H_0(−ve)FN:Type II error (β\beta) ✘TN:(1−α1 - \alpha) ✔
  • Type I (α\alpha) error:Incorrect rejection of a true null hypothesis. P(reject H0∣H0 true)P(\text{reject } H_0 \mid H_0 \text{ true})。
  • Type II (β\beta) error:Fail to reject a false null hypothesis. P(fail to reject H0∣H1 true)P(\text{fail to reject } H_0 \mid H_1 \text{ true})。
  • Power (1−β1 - \beta):Correctly reject the null when it is wrong. P(reject H0∣H1 true)P(\text{reject } H_0 \mid H_1 \text{ true})。
💡 直覺理解:法庭比喻

H0H_0 = 被告無罪。Type I error = 冤枉好人(判有罪但其實無罪);Type II error = 放走犯人。α\alpha 係我哋願意承受冤枉好人嘅風險,所以要定得細(0.05 / 0.01)。降低 α\alpha 通常會令 β\beta 上升;增加 sample size 可以同時降低兩者(提升 power)。

⚠️ 易混淆

Slide 17 嘅表用咗 classification 嘅 TP/FP/FN/TN 標籤,「positive」= reject H0H_0。原 slide 欄位標題寫法有啲反轉(“True (H0H_0 is wrong)” / “False (H0H_0 is correct)”),記住核心:H0H_0 啱但 reject = Type I;H0H_0 錯但唔 reject = Type II。

7. Statistical vs Practical significance

Slide 18:

  • Reject H0H_0 時,我哋話 subject of interest 係 statistically significant。
  • Statistical significance:表示個 effect 唔係由 chance 造成。
  • Statistical significance ≠ practical significance:一個好細嘅 coefficient,practical significance 好細,但如果 sample size 好大,都可以 highly statistically significant。
💡 例子

一個新教學法令考試平均分高 0.3 分(滿分 100)。如果 n=100,000n = 100{,}000,standard error 極細,p-value 可以 < 0.001(statistically significant),但 0.3 分喺實際上冇乜意義(practically insignificant)。

8. p-value、significance level 同 rejection region

⭐ p-value 定義(slide 19)

p-value = (conditional) probability of obtaining a (any) result which is ‘equal to or more extreme’ than what was actually observed, when the null hypothesis is true.

Slide 例子:H0H_0:Population mean μ≤10\mu \le 10;observed xˉ=13, s2=3, n=100\bar x = 13,\ s^2 = 3,\ n = 100;xˉ′\bar x' = 另一組新 random data 嘅結果:

p-value=Prob(xˉ′>xˉ∣μ≤10, xˉ=13, s2=3, n=100)\text{p-value} = \text{Prob}(\bar x' > \bar x \mid \mu \le 10,\ \bar x = 13,\ s^2 = 3,\ n = 100)

p-value 可以用嚟作判斷:p-value 落喺某範圍(significance level)就 reject null → Regions of Rejection and Non-rejection。

Slide 20:

  • Significance level α\alpha(= 0.05, 0.1):假設 H0H_0 正確,出現嗰啲極端值嘅機率;亦即我哋願意承受作出「錯誤」決定(Type I error)嘅 risk——H0H_0 正確但我哋結論佢錯。
  • p-value:假設 H0H_0 正確,數據出現比目前 sample 更極端值(圖中右手邊)嘅機率。
  • Slide 20 嘅圖:sampling distribution of z=(xˉ−μ0)/(σ/n)z = (\bar x - \mu_0)/(\sigma/\sqrt n),α=0.05\alpha = 0.05 嘅 critical line,p-value = 0.011(右尾橙色面積)。p-value 細過 α\alpha → H0H_0 is rejected。
  • α\alpha 係接受錯誤結論(H0H_0 啱都 reject)嘅 risk;p-value 細過 α\alpha,即呢個 risk 可以接受 → reject H0H_0。
⭐ Worked example:用 slide 19 數據做完整 test(5-step procedure)
  1. State hypotheses:H0:μ≤10H_0: \mu \le 10;H1:μ>10H_1: \mu > 10(right-tailed)。
  2. Significance level:α=0.05\alpha = 0.05。
  3. Test statistic:z=xˉ−μ0s/n=13−103/100=30.1732=17.32z = \dfrac{\bar x - \mu_0}{s/\sqrt n} = \dfrac{13 - 10}{\sqrt 3/\sqrt{100}} = \dfrac{3}{0.1732} = 17.32。
  4. Critical value / p-value:right-tailed α=0.05\alpha = 0.05 → z0.05=1.645z_{0.05} = 1.645;p-value = P(Z>17.32)≈0P(Z > 17.32) \approx 0。
  5. Decision & conclusion:17.32 > 1.645(或 p≈0<0.05p \approx 0 < 0.05)→ reject H0H_0。有充分證據顯示 population mean 大於 10。

8.1 One-tailed vs Two-tailed(slide 21)

⭐ Region of rejection
Test TypeHypothesesRejection RegionCritical value(α=0.05\alpha = 0.05, Z)
Two-TailedH0:μ=μ0H_0:\mu=\mu_0;Ha:μ≠μ0H_a:\mu\ne\mu_0兩邊尾,每邊 α/2\alpha/2∣z∣>1.96|z| > 1.96
Right-TailedH0:μ≤μ0H_0:\mu\le\mu_0;Ha:μ>μ0H_a:\mu>\mu_0右尾 α\alphaz>1.645z > 1.645
Left-TailedH0:μ≥μ0H_0:\mu\ge\mu_0;Ha:μ<μ0H_a:\mu<\mu_0左尾 α\alphaz<−1.645z < -1.645

規則:等號永遠喺 H0H_0;H1H_1 嘅方向(>>、<<、≠\ne)決定 rejection region 喺邊。

⚠️ 常見錯誤
  • 將「hope」放咗喺 H0H_0:例如想證明新藥有效,H1H_1 先係「有效」。
  • Two-tailed 用錯 critical value:α=0.05\alpha = 0.05 two-tailed 要查 α/2=0.025\alpha/2 = 0.025(1.96),唔係 1.645。
  • 結論寫「accept H0H_0」:應寫「do not reject H0H_0 / fail to reject H0H_0」——冇足夠證據唔等於證明 H0H_0 啱。

9. Confidence Interval vs Hypothesis Testing

Slides 22–24(provided by Google AI):

Confidence intervalHypothesis testing
gives a range of plausible values for an unknown population parameterdecides whether a specific claim about a population is supported by sample data
⭐ Two sides of the same coin(slide 24)
  • A 95% confidence interval corresponds to an α=0.05\alpha = 0.05 significance test.
  • If a 95% CI excludes the null hypothesis value, the two-tailed test will yield p<0.05p < 0.05 (statistically significant, reject H0H_0).
  • If the CI includes the null value, p≥0.05p \ge 0.05 (fail to reject H0H_0).

例:slide 19 數據嘅 95% CI = (12.66, 13.34),唔包 10 → two-tailed test H0:μ=10H_0: \mu = 10 會 reject(p<0.05p < 0.05)。如果 H0:μ=13H_0: \mu = 13,13 喺 CI 入面 → do not reject。

10. 總結:Hypothesis testing 5-step procedure

⭐ 考試答題框架(之後 3a t-test、3b chi-square、4 regression 都用)
  1. State H0H_0 and H1H_1(mutually exclusive、collectively exhaustive;等號喺 H0H_0;判斷 one- / two-tailed)。
  2. Choose significance level α\alpha(通常 0.05 或 0.01)。
  3. Compute the test statistic(z、t、χ2\chi^2、F)。
  4. Find the critical value from the table(或計 p-value)。
  5. Decision & conclusion in context:test statistic 落 rejection region(或 p<αp < \alpha)→ reject H0H_0;否則 do not reject H0H_0。用題目語境寫結論。

自我測驗 Self-test

Q1. n=64n = 64,xˉ=52\bar x = 52,σ=8\sigma = 8(known)。求 μ\mu 嘅 95% CI。

SE=8/64=1SE = 8/\sqrt{64} = 1;margin = 1.96 × 1 = 1.96;95% CI = (50.04, 53.96)。

Q2. 同上,如果要 90% CI 呢?比較兩者闊度。

z=1.645z = 1.645 → 52 ± 1.645 = (50.355, 53.645)。90% CI 較窄:confidence 低啲,interval 窄啲。

Q3. 有人話「95% CI (50.04, 53.96) 代表 μ\mu 有 95% 機率喺 50.04 同 53.96 之間」。啱唔啱?

嚴格嚟講唔啱。μ\mu 係固定值;正確講法:如果重複抽樣並用同一 procedure 砌好多個 interval,約 95% 嘅 interval 會 cover 真正 μ\mu(slide 12)。

Q4. 解釋 Type I error、Type II error、Power,並講 α\alpha 同邊個有關。

Type I:H0H_0 真但 reject(機率 α\alpha = significance level)。Type II:H0H_0 假但冇 reject(機率 β\beta)。Power = 1−β1 - \beta:H0H_0 假時正確 reject。

Q5. 某廠聲稱電池平均壽命至少 500 小時,你想證明佢誇大。寫 H0H_0 同 H1H_1,係咩 tail?

H0:μ≥500H_0: \mu \ge 500;H1:μ<500H_1: \mu < 500。Left-tailed test。

Q6. 一個 two-tailed test 得 p-value = 0.03。α=0.05\alpha = 0.05 同 α=0.01\alpha = 0.01 時結論各係咩?對應 95% / 99% CI 會唔會包 μ0\mu_0?

α=0.05\alpha = 0.05:0.03 < 0.05 → reject H0H_0;95% CI 唔包 μ0\mu_0。α=0.01\alpha = 0.01:0.03 > 0.01 → do not reject;99% CI 包 μ0\mu_0。

Q7. 擲硬幣 5 次全部 Heads。假設公平,p-value 係幾多(one-sided)?α=0.05\alpha = 0.05 結論?

p-value = P(5 heads∣fair)=0.55=0.03125<0.05P(5 \text{ heads} \mid \text{fair}) = 0.5^5 = 0.03125 < 0.05 → reject H0H_0,結論硬幣傾向出 Heads(但有 α\alpha 嘅 Type I 風險)。

Q8. 「n=1,000,000n = 1{,}000{,}000,回歸係數 0.0001,p<0.001p < 0.001」。點評?

Statistically significant 但 practical significance 可能好細:sample size 極大時,極細嘅 effect 都會顯著(slide 18)。

Q9. 「6 sigma」嘅 α\alpha 係幾多?點解?

μ±3σ\mu \pm 3\sigma(闊 6σ6\sigma)包含約 99.7% 數據,所以 α=1−99.7%=0.3%\alpha = 1 - 99.7\% = 0.3\%。

一頁總結 Cheat sheet

⭐ 考前速記
  • Point estimate:xˉ→μ, s2→σ2\bar x \to \mu,\ s^2 \to \sigma^2;unbiased:E(xˉ)=μE(\bar x)=\mu。
  • CLT:xˉ∼normal\bar x \sim \text{normal},SE=σ/nSE = \sigma/\sqrt n。
  • CI:xˉ±zα/2σn\bar x \pm z_{\alpha/2}\frac{\sigma}{\sqrt n};σ\sigma 未知 → xˉ±tα/2,n−1sn\bar x \pm t_{\alpha/2,n-1}\frac{s}{\sqrt n}。z:90% 1.645|95% 1.96|99% 2.576。
  • 解讀:重複 procedure,(1−α1 - \alpha) 嘅 interval cover 真值。
  • 68.3–95.5–99.7 rule;6 sigma α=0.3%\alpha = 0.3\%。
  • H0H_0 = boring idea(有等號);H1H_1 = researcher's hope。
  • p-value = P(結果 ≥ 觀察值咁極端 | H0H_0 真);唔係 P(H0H_0 真)。p<αp < \alpha → reject H0H_0。
  • Type I = reject 真 H0H_0(α\alpha);Type II = 唔 reject 假 H0H_0(β\beta);Power = 1−β1 - \beta。
  • Two-tailed:≠\ne,∣z∣>1.96|z| > 1.96;Right:>>,z>1.645z > 1.645;Left:<<,z<−1.645z < -1.645(α=0.05\alpha = 0.05)。
  • Statistical ≠ practical significance(大 n 令細 effect 都顯著)。
  • 95% CI 唔包 μ0\mu_0 ⇔ two-tailed p<0.05p < 0.05 ⇔ reject H0H_0。
  • 5 steps:H0/H1H_0/H_1 → α\alpha → test statistic → critical value / p-value → decision + conclusion。