Module 8 · Quantitative Methods

Hypothesis Testing

EN: Framework for testing claims about a population: H0/Ha, test statistics, p-value, Type I/II errors.
VN: Kiểm định giả thuyết: H0/Ha, thống kê kiểm định, p-value, sai lầm loại I/II.

In this module
  1. Hypothesis Framework
  2. Test of Mean — σ Known (z-test)
  3. Test of Mean — σ Unknown (t-test)
  4. Test of Difference Between Two Means
  5. Test of Single Variance (χ² test)
  6. Test of Equality of Two Variances (F-test)
  7. Type I & Type II Errors

1. Hypothesis Framework Core

About: Hypothesis testing is the formal procedure to decide whether sample evidence is strong enough to reject a default claim (H0). Always: state H0/Ha, pick α, compute statistic, compare to critical value or p-value.Tóm tắt: Kiểm định giả thuyết là quy trình quyết định bằng chứng có đủ mạnh bác bỏ H0 hay không. Luôn: nêu H0/Ha, chọn α, tính statistic, so với critical value hoặc p-value.

Setup

  • H₀ Null hypothesis — the claim being tested (always contains "=").
  • Hₐ Alternative — what we accept if we reject H₀.
  • α Significance level — max acceptable probability of Type I error (commonly 1%, 5%, 10%).
  • Decision Reject H₀ if |test stat| > critical value, OR p-value < α.

Two-tailed: H₀: μ = μ₀ vs Hₐ: μ ≠ μ₀.
One-tailed: H₀: μ ≤ μ₀ vs Hₐ: μ > μ₀ (or the reverse).

2. Test of Mean — σ Known (z-statistic) Core

About: Use z-statistic when population σ is known. Reject H0 if |z| > critical value or p-value < α. Rarely used in practice — included here for theory.Tóm tắt: Dùng z khi biết σ tổng thể. Bác bỏ H0 nếu |z| > critical hoặc p < α. Thực tế ít gặp, học chủ yếu để hiểu lý thuyết.
\[ z = \frac{\bar{X} - \mu_0}{\sigma/\sqrt{n}} \]
Practice problem

H0: μ = 5%. Sample n = 100 has \(\bar{X}\) = 5.6%. σ known = 2%. Compute z statistic and decide at α = 5% (two-tailed).

Show solution
SE = 2/√100 = 0.2%
z = (5.6 − 5.0)/0.2 = 3.0
Critical z(α/2) = ±1.96 → |3.0| > 1.96
Reject H0 — significantly different from 5%.

3. Test of Mean — σ Unknown (t-statistic) Core

About: The most common test in finance — use sample s and t-distribution. Same logic as z-test, just with t critical values reflecting extra estimation noise from using s.Tóm tắt: Test phổ biến nhất — dùng s mẫu và phân phối t. Cùng logic z-test nhưng critical t lớn hơn để bù bất định khi ước lượng s.

EN: The most common test in practice — use Student's t with \(df = n - 1\).
VN: Test phổ biến nhất thực tế — dùng phân phối t với bậc tự do \(n - 1\).

\[ t = \frac{\bar{X} - \mu_0}{s/\sqrt{n}}, \quad df = n - 1 \]
Practice problem

A fund claims annual mean return = 12%. Sample of n = 25 has \(\bar{X}\) = 10.5%, s = 4%. Test at α = 5% (two-tailed) whether the true mean differs from 12%.

Show solution
\(t = (10.5 - 12)/(4/\sqrt{25}) = -1.5/0.8 = -1.875\)
Critical t (df = 24, α/2 = 0.025) ≈ ±2.064
|–1.875| < 2.064 → fail to reject H₀
No evidence the true mean differs from 12% at 5% significance.

4. Test of Difference Between Two Means Core

About: Test whether two population means differ. Pooled-variance t-test assumes equal variances; otherwise Welch's t-test. Common use: compare two manager returns or two factor exposures.Tóm tắt: Kiểm định hai trung bình tổng thể có khác nhau không. T-test hợp nhất giả định variance bằng nhau. Dùng so sánh hai manager.

EN: Independent samples, assuming equal population variances — pooled-variance t-test.
VN: Hai mẫu độc lập, giả định phương sai bằng nhau.

\[ t = \frac{(\bar{X}_1 - \bar{X}_2) - (\mu_1 - \mu_2)_0}{\sqrt{\dfrac{s_p^{2}}{n_1} + \dfrac{s_p^{2}}{n_2}}} \] \[ s_p^{2} = \frac{(n_1 - 1)\,s_1^{2} + (n_2 - 1)\,s_2^{2}}{n_1 + n_2 - 2}, \quad df = n_1 + n_2 - 2 \]
Practice problem

n1 = 20, \(\bar{X}_1\) = 12%, s1² = 25; n2 = 30, \(\bar{X}_2\) = 9%, s2² = 16. Compute pooled variance.

Show solution
\(s_p^{2} = [19(25) + 29(16)] / (20+30-2) = (475 + 464)/48\)
≈ 19.56

5. Test of a Single Variance — χ² Test Core

About: χ² test on a single population variance. Right-skewed distribution, df = n−1. Used in risk-management to test whether realized volatility matches assumed σ.Tóm tắt: Test chi-square cho một phương sai. Phân phối lệch phải, df = n−1. Dùng kiểm tra volatility thực tế so với giả định.
\[ \chi^{2} = \frac{(n - 1)\,s^{2}}{\sigma_0^{2}}, \quad df = n - 1 \]

Chi-square distribution is right-skewed and bounded by 0 — critical values differ on the upper and lower tails.

Practice problem

H0: σ² = 36. Sample n = 25 has s² = 50. Compute χ² statistic.

Show solution
\(\chi^{2} = (24)(50)/36 = 1200/36\)
≈ 33.33 (df = 24)

6. Equality of Two Variances — F-test Core

About: F-test compares two population variances (ratio s1²/s2²). Use larger variance on top. Common preliminary check before running pooled-variance t-test.Tóm tắt: F-test so sánh hai phương sai (tỉ số). Đặt variance lớn hơn lên trên. Bước check trước khi t-test hợp nhất.
\[ F = \frac{s_1^{2}}{s_2^{2}}, \quad \text{put the larger variance on top} \]

Components / Thành phần

  • df1 = n₁ − 1 (numerator).
  • df2 = n₂ − 1 (denominator).
Practice problem

Sample 1: n1 = 21, s1² = 60. Sample 2: n2 = 16, s2² = 25. Compute F statistic.

Show solution
F = larger/smaller = 60/25
F = 2.40 (df1 = 20, df2 = 15)

7. Type I and Type II Errors Core

About: Two ways to be wrong: reject true H0 (Type I, prob α) or fail to reject false H0 (Type II, prob β). Power = 1 − β. Lowering α raises β — only larger n improves both.Tóm tắt: Hai loại sai: bác bỏ H0 đúng (loại I, α) hoặc không bác bỏ H0 sai (loại II, β). Power = 1 − β. Tăng n cải thiện cả hai.

Definitions / Định nghĩa

  • Type I Rejecting H₀ when H₀ is true. P(Type I) = α.
  • Type II Failing to reject H₀ when H₀ is false. P(Type II) = β.
  • Power P(reject H₀ | H₀ false) = 1 − β.
  • p-value Smallest α at which H₀ would be rejected. Reject if p < α.

Trade-off: Lowering α reduces Type I but increases Type II (lower power). Larger n is the only "free lunch" — reduces both.