Inferential Statistics • Lesson 15
Two-Sample t-Test
Learn how to compare the means of two independent groups and determine whether their population means are statistically different.
CONCEPT 1
When Should You Use a Two-Sample t-Test?
A two-sample t-test is used when we want to compare the means of two independent populations. Instead of comparing one population mean with a fixed number, we compare the difference between two population means.
Visual
Two Independent Groups
Think of two separate groups whose average outcomes are being compared.
Your Turn
Solve the activity
Which statistical test is appropriate when comparing the average order value of separately selected app users and website users?
Hint: The two groups contain different individuals rather than the same people measured twice.
Analyst Workflow
Two-Sample t-Test in Practice
Business Question
Independent Groups
Difference
Standard Error
t-Statistic
p-value
Two-Sample t-Test Quick Reference
| Quantity | Formula / Meaning |
|---|---|
| Observed Difference | x̄₁ − x̄₂ |
| Standard Error | √(s₁²/n₁ + s₂²/n₂) |
| t-Statistic | (x̄₁ − x̄₂) / SE |
| Decision Rule | p ≤ α → Reject H₀ |
| Alternative | μ₁ − μ₂ ≠ 0 |
Real-World Analytics
Compare Two Marketing Channels
A company wants to know whether average order value differs between customers acquired through Google Ads and customers acquired through social media advertising.
Google Ads
x̄₁ = ₹2,800
s₁ = ₹600
n₁ = 40
Social Media
x̄₂ = ₹2,500
s₂ = ₹550
n₂ = 40
Difference = 2800 − 2500 = ₹300
The analyst would then calculate the standard error, t-statistic, degrees of freedom, and p-value to evaluate whether the observed difference provides sufficient statistical evidence against H₀.