M1-076M1: Mathematics & Statistics FundamentalsHypothesis TestingEasy
⚡Flashcard Drill➔Mastery:

Explain the Decision Criteria Between Two-Sample t-Test and z-Test

🎯 Active Recall Self-Check (Draft First, Verify After)
Login-free practice tracker: recall core answer, audit pitfalls, and log review status.
Step 1 · Draft your concise answer & assumptions
Step 2 · Check Pitfalls & Follow-up Inquiries
Next: M1-077 →
📐 Mathematical Definition
t=Xˉ−μs/n∼tn−1,z=Xˉ−μσ/n∼N(0,1)t=\frac{\bar X-\mu}{s/\sqrt n}\sim t_{n-1},\qquad z=\frac{\bar X-\mu}{\sigma/\sqrt n}\sim\mathcal N(0,1)
⚡ One-Sentence Core Answer
Use a z-test when population variance σ2\sigma^2 is known or sample size NN is very large (N>30N > 30) by CLT; use a t-test when variance is unknown and estimated via sample variance s2s^2 in small-to-moderate samples.

📌 Key Takeaways

  • •
    z-test: Assumes known variance or invokes CLT for large samples; statistic Z=Xˉ−μ0σ/n∼N(0,1)Z = \frac{\bar{X} - \mu_0}{\sigma / \sqrt{n}} \sim \mathcal{N}(0, 1).
  • •
    t-test: Accounts for additional variance from estimating s2s^2; statistic T=Xˉ−μ0s/n∼tn−1T = \frac{\bar{X} - \mu_0}{s / \sqrt{n}} \sim t_{n-1}.
  • •
    Heavier tails: Student's t-distribution has fatter tails than Gaussian, producing more conservative critical values for small NN.

📐 Mathematical Derivations

Derivation of Student's t-distribution: Let X1,…,Xn∼N(μ,σ2)X_1, \dots, X_n \sim \mathcal{N}(\mu, \sigma^2). Then Xˉ∼N(μ,σ2/n)\bar{X} \sim \mathcal{N}(\mu, \sigma^2/n), and (n−1)s2/σ2∼χn−12(n-1)s^2/\sigma^2 \sim \chi^2_{n-1}, with Xˉ\bar{X} and s2s^2 statistically independent by Cochran's theorem. A Student's t-variable is defined as the ratio of a standard normal to the square root of an independent normalized chi-square variable: T=(Xˉ−μ)/(σ/n)((n−1)s2/σ2)/(n−1)=Xˉ−μs/n∼tn−1T = \frac{(\bar{X} - \mu)/(\sigma/\sqrt{n})}{\sqrt{((n-1)s^2/\sigma^2)/(n-1)}} = \frac{\bar{X} - \mu}{s/\sqrt{n}} \sim t_{n-1}. As degrees of freedom ν=n−1→∞\nu = n-1 \to \infty, tν→dN(0,1)t_\nu \xrightarrow{d} \mathcal{N}(0, 1) by Slutsky's theorem.

🏭 Production Trade-offs

In industrial A/B testing where sample size NN is in the millions per variant, the tt-distribution and normal distribution are numerically indistinguishable (t1000000≈N(0,1)t_{1000000} \approx \mathcal{N}(0, 1)). However, Welch's t-test (which relaxes the equal variance assumption: se=sA2/NA+sB2/NB\text{se} = \sqrt{s_A^2/N_A + s_B^2/N_B} with Satterthwaite degrees of freedom) is the industry standard default because equal group variance is rarely guaranteed.
⚠️ Common Interview Pitfalls
  • ✕
    Using Student's t-test with pooled variance when group variances are unequal (violates homoscedasticity; Welch's t-test must be used).
  • ✕
    Assuming t-tests are fully robust to extreme outliers in small sample sizes (N<20N < 20).
🎯 Interviewer Follow-up Inquiries
  • ?
    How does Welch's t-test approximate degrees of freedom via the Welch-Satterthwaite equation?
  • ?
    Why is Welch's t-test preferred over Student's pooled t-test even when sample sizes are equal?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
📚

Associated Knowledge Base Guides & Mindmaps

← PreviousM1-075: Explain Shrinkage Estimators and the James-Stein Phenomenon📋 Back to BankNext →M1-077: Explain the Three Primary Statistical Applications of the Chi-Square Test