Analyst Dojo
Lesson 7 of 13 11–14% of the exam

t-tests of a mean, a difference in means and paired differences

Use a single-mean t-test to compare one sample's mean with a value, a difference-in-means test (pooled variance) for two independent samples, and a paired t-test on the differences when the samples are linked, such as two funds over the same months. Each statistic divides a difference by its standard error.

8 min cram, 40 min full read. Based on the 2027 CFA® Program Level I curriculum, Quantitative Methods, Learning Module 7. Sitting in November 2026? The 2026 version of this lesson is still available.

Tailor this to you: take the self-assessment

Before this: How a hypothesis test works: four steps from claim to decision

On the exam

  • Explain hypothesis testing and its components, including statistical significance, Type I and Type II errors, and the power of a test; construct appropriate hypothesis tests; and interpret the results

Construct t-tests of a mean, of a difference between means and of the mean of differences, and determine their significance. Expect 'which test?' scenarios, degrees of freedom, and a statistic to compute and compare with a critical value in the stem.

How deeply to learn each part
Know the idea
Understand it in general. It frames other topics, but you will not calculate with it.
Use it
Understand it well enough to solve a question with it. Recognize when it applies.
Memorize
Learn it by heart. The exam will not give it to you.

You know this one. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still do.

You tested strong here. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still know it.

Cram mode: the one-screen version of this lesson. Switch to Full for the explanations, worked examples and interactives.

Which t-test do you need?

The three tests share one shape: a difference divided by its standard error, compared with a t critical value that depends on the degrees of freedom (df). What changes is how the data were collected. Ask that question first.

Which t-test fits the data?
How were the data collected?this decides the standard error and the degrees of freedom
  • One sample against a value Memorize
    • Test of a single mean Memorize t = (X̄ − μ₀) ÷ (s ÷ √n); df n − 1
  • Two independent samples Memorize unrelated observations
    • Test of the difference in means Memorize pooled variance; df n₁ + n₂ − 2
  • Two dependent (paired) samples Memorize linked observations, such as the same months
    • Test of paired differences (paired t-test) Memorize test the differences; t = d̄ ÷ (s_d ÷ √n); df n − 1

All three rely on the t-distribution , a symmetric, bell-shaped curve with fatter tails than the normal that depends on the degrees of freedom : the number of independent pieces of information left after estimating what the test needs. Fewer degrees of freedom mean fatter tails and larger critical values. Beyond about 100 the t critical values are close to the z values.

How do you test a single mean?

Memorize

The test of a single mean compares one sample’s mean with a hypothesized value, using the statistic from the four-step lesson: t = (X̄ − μ₀) ÷ (s ÷ √n), with n − 1 degrees of freedom.

How do you test a difference between two independent means?

Memorize

Use the test of the difference in means when the two samples are unrelated and both populations are roughly normal with the same variance. Because the variance is assumed equal, the two sample variances are combined into one estimate, the pooled variance , weighted by degrees of freedom. Δ₀ in the formula is the hypothesized difference between the means, usually 0.

Pooled variance Memorize
sp2=(n1−1)s12+(n2−1)s22n1+n2−2s_p^2 = \frac{(n_1 - 1)s_1^2 + (n_2 - 1)s_2^2}{n_1 + n_2 - 2}
Test of the difference in means (independent samples, equal variances) Memorize
t=(Xˉ1−Xˉ2)−Δ0sp2n1+sp2n2,df=n1+n2−2t = \frac{(\bar{X}_1 - \bar{X}_2) - \Delta_0}{\sqrt{\dfrac{s_p^2}{n_1} + \dfrac{s_p^2}{n_2}}},\quad df = n_1 + n_2 - 2
Rearrange itPooled variance: solve for it from the two samples
The question asks for
Sample 1 has 30 observations and s = 2.00%. Sample 2 has 30 observations and s = 1.80%. The pooled variance, in %², is closest to:

(29 × 4 + 29 × 3.24) ÷ 58 = 3.62

Pooled variance, sₚ² (in %²)3.62

On your calculator
  1. (29×2x²)+(29×1.8x²)=÷58=

x² square

  1. 29ENTER2ENTER××29ENTER1.8ENTER××+58÷

ENTER enter (on the HP, puts the number on the stack)

The independent-samples test can also compare one asset’s mean in two separate periods, such as before and after an event. That differs from measuring the same companies twice: there each observation has a partner, so the test is paired.

How does sample size change the result?

Same means, same standard deviations, more data: t grows with √n.

How do you test paired differences?

Memorize

When the observations are linked, such as two funds over the same months, the two samples are dependent samples . Subtract within each pair, then run a one-sample t-test on the differences. This is the test of paired differences , or paired t-test (older texts call it the paired comparisons test). The differences are assumed to be approximately normal, and the order of the pairing matters.

Mean of the differences Memorize
dˉ=1n∑i=1ndi,di=X1i−X2i\bar{d} = \frac{1}{n}\sum_{i=1}^{n} d_i,\quad d_i = X_{1i} - X_{2i}
Test of paired differences (paired t-test) Memorize
t=dˉ−μ0sd / n,df=n−1t = \frac{\bar{d} - \mu_0}{s_d \,/\, \sqrt{n}},\quad df = n - 1
Interactivet-test of a single mean

Try this 0 of 2

  • Keep the mean at 0.72% and s at 2.4%, two-tailed 5%. Raise n until you reject H₀.
  • Back at n = 36, switch to a one-tailed test (Hₐ: μ > 0).

Single mean: X̄ 0.72%, s 2.4%, n 36. Standard error 0.4000, t 1.80 against a critical value of 2.030 with 35 degrees of freedom: fail to reject H₀. Every t-test is a difference divided by its standard error.

−4−2024t, df 35−2.0302.030t = 1.80
  • Reject H₀ (α 5%)
DecisionFail to reject H₀
t-statistic1.80
Critical value (df 35)±2.030
p-value0.080
Sample (forecast errors)
The test
Alternative
Significance level α
Show working

H₀: μ = 0% against Hₐ: μ ≠ 0%.

Standard error = s ÷ √n = 2.4 ÷ √36 = 2.4 ÷ 6 = 0.4000.

t = (X̄ − μ₀) ÷ SE = (0.72 − 0) ÷ 0.4000 = 1.80, df = n − 1 = 35.

Critical value, two-tailed 5%, df 35: ±2.030. |t| = 1.80 ≤ 2.030 → fail to reject H₀ (p = 0.080).

t-statistic
  1. 0.72−0=÷(2.4÷36√x)=1.8

√x square root

  1. 0.72ENTER0−2.4ENTER36g√x÷÷1.8

ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root

Display: 1.8

Every t-test is a difference divided by its standard error; pick the error that matches how the data were collected.

Flip between the tabs and notice what each standard error is built from. In the paired tab, edit the monthly returns: when both managers move together, the differences vary little and the same average gap becomes significant.

Exam tip Look for the word “same”: the same months, the same companies, before and after. That points to the paired test.

Why is the paired test more powerful?

When observations are linked, the paired test is more powerful than the independent-samples test: differencing removes the factors both series share, and its variance comes from the differences alone. Two funds in the same market both rise and fall with it. That shared movement inflates the spread of each series, which would swamp a small gap if you treated the samples as independent. Subtracting within each month cancels the shared part, leaving a smaller standard error and a sharper test. Use it only when the data really are linked, and do not pool.

Go deeper When the variances are not equal

If the two population variances cannot be assumed equal, a two-sample t-test with unequal variances is used instead. The exam focuses on the pooled version; you only need to know that the unequal-variance version exists. Check the variances with the F-test in the next lesson.

Go deeper Large samples and the z alternative

With very large samples (several hundred observations or more), the t critical values are almost identical to the z values, so a z-test gives the same decision. The t-test is still correct, and it is the one to use when the population variance is estimated from the sample.

Go deeper Why pairing needs the same observations

The paired test needs one-to-one pairs, so both samples have the same n. A fund with 36 months and another with 30 cannot be paired unless you first keep only the 30 shared months. If the samples are different sizes and not matched, they are independent samples and the pooled test applies.

Memorize this

MemorizeThe three t-tests

DataStatisticDegrees of freedom
One sample vs a valueXˉ−μ0s/n\dfrac{\bar{X}-\mu_0}{s/\sqrt{n}}n−1n-1
Two independent samples(Xˉ1−Xˉ2)−Δ0sp2/n1+sp2/n2\dfrac{(\bar{X}_1-\bar{X}_2)-\Delta_0}{\sqrt{s_p^2/n_1+s_p^2/n_2}}n1+n2−2n_1+n_2-2
Paired samples (paired t-test)dˉ−μ0sd/n\dfrac{\bar{d}-\mu_0}{s_d/\sqrt{n}}n−1n-1

Memory hook Every t is a difference over its standard error. Degrees of freedom are the observations minus the number of means you estimated: one mean, n − 1; two means, n₁ + n₂ − 2; one mean of differences, n − 1.

Know it cold Pooled variance: sp2=(n1−1)s12+(n2−1)s22n1+n2−2s_p^2=\dfrac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}. Samples linked by date or subject: paired, never pooled.

MemorizeDecision with a t-statistic

HAH_AReject when
≠\ne (two-tailed)∣t∣>|t| > two-tailed critical value
>> (one-tailed)t>t > critical value
<< (one-tailed)t<t < −critical value

Memory hook Read the sign in HAH_A before opening the t-table.

Know it cold The critical value comes from the degrees of freedom, so find them first.

Which t-test fits the data?
How were the data collected?this decides the standard error and the degrees of freedom
  • One sample against a value Memorize
    • Test of a single mean Memorize t = (X̄ − μ₀) ÷ (s ÷ √n); df n − 1
  • Two independent samples Memorize unrelated observations
    • Test of the difference in means Memorize pooled variance; df n₁ + n₂ − 2
  • Two dependent (paired) samples Memorize linked observations, such as the same months
    • Test of paired differences (paired t-test) Memorize test the differences; t = d̄ ÷ (s_d ÷ √n); df n − 1
Pooled variance Memorize
sp2=(n1−1)s12+(n2−1)s22n1+n2−2s_p^2 = \dfrac{(n_1 - 1)s_1^2 + (n_2 - 1)s_2^2}{n_1 + n_2 - 2}
Quick example

n₁ = 20, s₁ = 3%; n₂ = 15, s₂ = 2.5%. s²ₚ = (19 × 9 + 14 × 6.25) ÷ 33 = 258.5 ÷ 33 = 7.83 (%²).

On your calculator
  1. (19×3x²)+(14×2.5x²)=÷33= 7.8333

x² square

  1. 19ENTER3ENTER××14ENTER2.5ENTER××+33÷ 7.8333

ENTER enter (on the HP, puts the number on the stack)

Test of the difference in means (independent samples, equal variances) Memorize
t=(Xˉ1−Xˉ2)−Δ0sp2n1+sp2n2,df=n1+n2−2t = \dfrac{(\bar{X}_1 - \bar{X}_2) - \Delta_0}{\sqrt{\dfrac{s_p^2}{n_1} + \dfrac{s_p^2}{n_2}}},\quad df = n_1 + n_2 - 2
Quick example

Means 8.0% and 6.5%, Δ₀ = 0, s²ₚ = 7.83, n₁ = 20, n₂ = 15. Standard error = √(7.83 × (1/20 + 1/15)) = 0.956, so t = (1.5 − 0) ÷ 0.956 = 1.57 with 33 degrees of freedom.

On your calculator
  1. 201/x+151/x=×7.8333=√xSTO1 0.956
  2. (8−6.5)÷RCL1= 1.569

1/x reciprocal · √x square root · STO store · RCL recall a stored number

  1. 201/x151/x+7.8333×g√xSTO1 0.956
  2. 8ENTER6.5−RCL1÷ 1.569

1/x reciprocal · g blue shift key · √x square root · STO store · ENTER enter (on the HP, puts the number on the stack) · RCL recall a stored number

Mean of the differences Memorize
dˉ=1n∑i=1ndi,di=X1i−X2i\bar{d} = \dfrac{1}{n}\sum_{i=1}^{n} d_i,\quad d_i = X_{1i} - X_{2i}
Quick example

Four monthly differences of 0.9, −0.2, 0.4 and 0.5 (percentage points): (0.9 − 0.2 + 0.4 + 0.5) ÷ 4 = 0.40.

On your calculator
  1. 0.9−0.2+0.4+0.5=÷4= 0.4
  1. 0.9ENTER0.2−0.4+0.5+4÷ 0.4

ENTER enter (on the HP, puts the number on the stack)

Test of paired differences (paired t-test) Memorize
t=dˉ−μ0sd / n,df=n−1t = \dfrac{\bar{d} - \mu_0}{s_d \,/\, \sqrt{n}},\quad df = n - 1
Quick example

25 paired months, d̄ = 0.8%, s_d = 1.5%, H₀: μ_d = 0. t = 0.8 ÷ (1.5 ÷ √25) = 0.8 ÷ 0.3 = 2.67 with 24 degrees of freedom.

On your calculator
  1. 0.8÷(1.5÷25√x)= 2.6667

√x square root

  1. 0.8ENTER1.5ENTER25g√x÷÷ 2.6667

ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root

How it is asked

  1. Which test fits?

    Two funds, the same 24 months, both driven by the same market. Test the mean difference?

    Linked by month: paired t-test. Trap: pooled difference-in-means.

  2. Paired statistic

    18 paired months, d̄ = 0.30%, s_d = 0.55%. Statistic?

    0.30 ÷ (0.55 ÷ √18) = 2.31. Traps: 0.55 (no √n), 2.25 (√17).

  3. Compare with the critical value

    t = 1.85, df 17, two-tailed 5% critical ±2.110. Conclusion?

    1.85 is less than 2.110: fail to reject. Not "accept".

  4. Degrees of freedom

    Independent samples of 22 and 28. Degrees of freedom for the pooled test?

    22 + 28 − 2 = 48. Trap: 49, or n − 1.

  5. Effect of sample size

    n per group × 4, same means and s.

    t doubles. ×4 is the trap.

Exam traps

  • Using the independent-samples test when observations are paired by date. Paired data test the differences.
  • Wrong degrees of freedom: n₁ + n₂ − 2 for the pooled test, n − 1 for the single-mean and paired tests.
  • Using a one-tailed critical value when Hₐ is 'not equal to'.
  • Dividing by s instead of s ÷ √n (or by √(n − 1)).

Checkpoint

5 exam-style questions. About 90 seconds each.

  1. 1An analyst compares the monthly returns of two funds over the same 36 months, both driven by the same market. The most appropriate test of whether their mean returns differ is a:

  2. 2For 12 paired months the return differences average 0.35% with a standard deviation of 0.50%. The test statistic for H₀: μ_d = 0 is closest to:

  3. 3Twenty-five observations give t = 2.00 against two-tailed 5% critical values of ±2.064. The best conclusion is:

  4. 4An analyst tests whether the mean returns of two independent samples, of 20 and 25 observations, differ, assuming equal variances. The degrees of freedom for the test are:

  5. 5Two independent groups of 40 funds have mean returns of 6.2% and 5.2% and standard deviations of 4.0% and 4.4%, giving a pooled t-statistic of 1.06. If each group had 160 funds with the same means and standard deviations, the t-statistic would be closest to:

Key takeaways

  • Single mean: (X̄ − μ₀) ÷ (s ÷ √n), df n − 1.
  • Independent samples: pooled variance, df n₁ + n₂ − 2.
  • Paired samples: test the differences, df n − 1.
  • Every t-statistic is a difference divided by its standard error.
Pooled variance Memorize
sp2=(n1−1)s12+(n2−1)s22n1+n2−2s_p^2 = \dfrac{(n_1 - 1)s_1^2 + (n_2 - 1)s_2^2}{n_1 + n_2 - 2}
Quick example

n₁ = 20, s₁ = 3%; n₂ = 15, s₂ = 2.5%. s²ₚ = (19 × 9 + 14 × 6.25) ÷ 33 = 258.5 ÷ 33 = 7.83 (%²).

On your calculator
  1. (19×3x²)+(14×2.5x²)=÷33= 7.8333

x² square

  1. 19ENTER3ENTER××14ENTER2.5ENTER××+33÷ 7.8333

ENTER enter (on the HP, puts the number on the stack)

Test of the difference in means (independent samples, equal variances) Memorize
t=(Xˉ1−Xˉ2)−Δ0sp2n1+sp2n2,df=n1+n2−2t = \dfrac{(\bar{X}_1 - \bar{X}_2) - \Delta_0}{\sqrt{\dfrac{s_p^2}{n_1} + \dfrac{s_p^2}{n_2}}},\quad df = n_1 + n_2 - 2
Quick example

Means 8.0% and 6.5%, Δ₀ = 0, s²ₚ = 7.83, n₁ = 20, n₂ = 15. Standard error = √(7.83 × (1/20 + 1/15)) = 0.956, so t = (1.5 − 0) ÷ 0.956 = 1.57 with 33 degrees of freedom.

On your calculator
  1. 201/x+151/x=×7.8333=√xSTO1 0.956
  2. (8−6.5)÷RCL1= 1.569

1/x reciprocal · √x square root · STO store · RCL recall a stored number

  1. 201/x151/x+7.8333×g√xSTO1 0.956
  2. 8ENTER6.5−RCL1÷ 1.569

1/x reciprocal · g blue shift key · √x square root · STO store · ENTER enter (on the HP, puts the number on the stack) · RCL recall a stored number

Mean of the differences Memorize
dˉ=1n∑i=1ndi,di=X1i−X2i\bar{d} = \dfrac{1}{n}\sum_{i=1}^{n} d_i,\quad d_i = X_{1i} - X_{2i}
Quick example

Four monthly differences of 0.9, −0.2, 0.4 and 0.5 (percentage points): (0.9 − 0.2 + 0.4 + 0.5) ÷ 4 = 0.40.

On your calculator
  1. 0.9−0.2+0.4+0.5=÷4= 0.4
  1. 0.9ENTER0.2−0.4+0.5+4÷ 0.4

ENTER enter (on the HP, puts the number on the stack)

Test of paired differences (paired t-test) Memorize
t=dˉ−μ0sd / n,df=n−1t = \dfrac{\bar{d} - \mu_0}{s_d \,/\, \sqrt{n}},\quad df = n - 1
Quick example

25 paired months, d̄ = 0.8%, s_d = 1.5%, H₀: μ_d = 0. t = 0.8 ÷ (1.5 ÷ √25) = 0.8 ÷ 0.3 = 2.67 with 24 degrees of freedom.

On your calculator
  1. 0.8÷(1.5÷25√x)= 2.6667

√x square root

  1. 0.8ENTER1.5ENTER25g√x÷÷ 2.6667

ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root

All Quantitative Methods formulas, every lesson

Practice exam-style questions on Estimation and Hypothesis Testing

Questions about this lesson?

Where this comes back

Questions candidates ask

When should you use a paired t-test?

Use it when each observation in one sample is linked to one in the other, such as two funds over the same months or a firm before and after an event. Test whether the mean of the differences is zero. Pairing removes shared movements, making the test more powerful. The differences are assumed approximately normal, and the pairing order matters.

What is a pooled variance?

It is a weighted average of two sample variances, with weights n − 1, used when two independent populations are assumed to have the same variance. It gives one variance estimate for the standard error of the difference between the two means.

How many degrees of freedom does a difference in means test have?

With independent samples and equal variances assumed, n₁ + n₂ − 2, because one degree of freedom is lost for each sample mean. A paired test has n − 1, where n is the number of pairs, because it works on one set of differences.

Spotted an error? Tell us and we will fix it.

  1. The central limit theorem and the standard error of the mean
  2. Confidence intervals for a mean return
  3. Value at risk from the normal distribution
  4. Sampling methods and sampling error
  5. How a hypothesis test works: four steps from claim to decision
  6. Type I and Type II errors and the power of a test
  7. t-tests of a mean, a difference in means and paired differences
  8. Chi-square and F-tests of variance
  9. Is a correlation significant? The t-test of correlation
  10. P-values, p-hacking and critical values from software
  11. Parametric vs non-parametric tests
  12. Spearman rank correlation: the non-parametric test
  13. Chi-square test of independence with a contingency table

Ask Sensei Listen instead

Questions on t-tests of a mean, a difference in means and paired differences

Learn with Sensei, out loud The voice tutor, in early access

Sensei teaches the lesson aloud and stops when you interrupt: "wait, why is the geometric mean lower?" It answers with the lesson's own example, then quizzes you by voice. Every account can try Sensei on one module, with one voice question.

USD 149 a month founding price (regular USD 199), kept for as long as you stay subscribed. Everything in Plus included.

In active development and improving every day. Send feedback · Plans and pricing

Analyst Dojo Plus

Your free review list holds 10 items.

Plus keeps everything you save, for USD 19 a month. To make room on the free plan, remove something from your review list.

See Plus

Lessons, checkpoints and the lesson questions in practice stay free. Compare plans