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.

Two Independent GroupsMean Differencet-statisticp-value
Progress0/8

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

GROUP 1
App Users
Sample mean x̄₁
GROUP 2
Website Users
Sample mean x̄₂
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

1

Business Question

2

Independent Groups

3

Difference

4

Standard Error

5

t-Statistic

6

p-value

Two-Sample t-Test Quick Reference

QuantityFormula / Meaning
Observed Differencex̄₁ − x̄₂
Standard Error√(s₁²/n₁ + s₂²/n₂)
t-Statistic(x̄₁ − x̄₂) / SE
Decision Rulep ≤ α → 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₀.