Analyst Dojo
Lesson 3 of 5 6–9% of the exam

You are reading the 2026 curriculum (exams up to November 2026). Sitting in February 2027 or later? Go to the 2027 Quantitative Methods guide.

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. Use a difference-in-means test (pooled variance) for two independent samples. Use a paired t-test on the differences when the two 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 2026 CFA® Program Level I curriculum, Quantitative Methods, Learning Module 8. This is the 2026 version of the lesson. Sitting in February 2027 or later? Read the updated 2027 version.

Tailor this to you: take the self-assessment

Before this: How a hypothesis test works: null, critical value, p-value

On the exam

  • Construct hypothesis tests and determine their statistical significance, the associated Type I and Type II errors, and power of the test given a significance level

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. 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
    • Paired comparisons 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 previous 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.

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ˉ2sp2n1+sp2n2,df=n1+n2−2t = \frac{\bar{X}_1 - \bar{X}_2}{\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)

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 the mean of the differences , also called the paired comparisons test .

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}
Paired comparisons test Memorize
t=dˉ−μd0sd / n,df=n−1t = \frac{\bar{d} - \mu_{d0}}{s_d \,/\, \sqrt{n}},\quad df = n - 1
Interactivet-test of a single mean

Try this 0 of 2

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

Single mean: X̄ 0.60%, s 1.5%, n 25. Standard error 0.3000, t 2.00 against a critical value of 2.064 with 24 degrees of freedom: fail to reject H₀. Every t-test is a difference divided by its standard error.

−4−2024t, df 24−2.0642.064t = 2.00
  • Reject H₀ (α 5%)
DecisionFail to reject H₀
t-statistic2.00
Critical value (df 24)±2.064
p-value0.057
Sample (forecast errors)
The test
Alternative
Significance level α
Show working

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

Standard error = s ÷ √n = 1.5 ÷ √25 = 1.5 ÷ 5 = 0.3000.

t = (X̄ − μ₀) ÷ SE = (0.60 − 0) ÷ 0.3000 = 2.00, df = n − 1 = 24.

Critical value, two-tailed 5%, df 24: ±2.064. |t| = 2.00 ≤ 2.064 → fail to reject H₀ (p = 0.057).

t-statistic
  1. 0.6−0=÷(1.5÷25√x)=2

√x square root

  1. 0.6ENTER0−1.5ENTER25g√x÷÷2

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

Display: 2

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 does the paired test usually do better?

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 populations cannot be assumed to have equal variances, a different statistic is used with an adjusted standard error and an approximate degrees of freedom. The exam focuses on the pooled version. Check equality of variances with the F-test in the next lesson, which is why these tests often appear together.

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

DataStatisticdf
One sample vs a valueXˉ−μ0s/n\dfrac{\bar{X}-\mu_0}{s/\sqrt{n}}n−1n-1
Two independent samplesXˉ1−Xˉ2sp2/n1+sp2/n2\dfrac{\bar{X}_1-\bar{X}_2}{\sqrt{s_p^2/n_1+s_p^2/n_2}}n1+n2−2n_1+n_2-2
Paired samplesdˉsd/n\dfrac{\bar{d}}{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

HₐReject 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 Hₐ before opening the t-table.

Know it cold The critical value comes from the degrees of freedom, so find dfdf 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
    • Paired comparisons 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ˉ2sp2n1+sp2n2,df=n1+n2−2t = \dfrac{\bar{X}_1 - \bar{X}_2}{\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%, s²ₚ = 7.83, n₁ = 20, n₂ = 15. SE = √(7.83 × (1/20 + 1/15)) = 0.956, so t = 1.5 ÷ 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.4, −0.1, 0.6 and 0.5 (percentage points): (0.4 − 0.1 + 0.6 + 0.5) ÷ 4 = 0.35.

On your calculator
  1. 0.4−0.1+0.6+0.5=÷4= 0.35
  1. 0.4ENTER0.1−0.6+0.5+4÷ 0.35

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

Paired comparisons test Memorize
t=dˉ−μd0sd / n,df=n−1t = \dfrac{\bar{d} - \mu_{d0}}{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 36 months, both driven by the same market. Test the mean difference?

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

  2. Paired statistic

    12 paired months, d̄ = 0.35%, s_d = 0.50%. Statistic?

    0.35 ÷ (0.50 ÷ √12) = 2.42. Traps: 0.70 (no √n), 2.32 (√11).

  3. Compare with the critical value

    t = 2.00, df 24, two-tailed 5% critical ±2.064. Conclusion?

    2.00 is less than 2.064: fail to reject. Not "accept".

  4. Degrees of freedom

    Independent samples of 20 and 25. Degrees of freedom for the pooled test?

    20 + 25 − 2 = 43. Trap: 44, or n − 1.

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

4 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:

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ˉ2sp2n1+sp2n2,df=n1+n2−2t = \dfrac{\bar{X}_1 - \bar{X}_2}{\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%, s²ₚ = 7.83, n₁ = 20, n₂ = 15. SE = √(7.83 × (1/20 + 1/15)) = 0.956, so t = 1.5 ÷ 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.4, −0.1, 0.6 and 0.5 (percentage points): (0.4 − 0.1 + 0.6 + 0.5) ÷ 4 = 0.35.

On your calculator
  1. 0.4−0.1+0.6+0.5=÷4= 0.35
  1. 0.4ENTER0.1−0.6+0.5+4÷ 0.35

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

Paired comparisons test Memorize
t=dˉ−μd0sd / n,df=n−1t = \dfrac{\bar{d} - \mu_{d0}}{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

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. Compute the differences and test whether their mean is zero. Pairing removes shared movements, which makes the test sharper.

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. How a hypothesis test works: null, critical value, p-value
  2. Type I and Type II errors and the power of a test
  3. t-tests of a mean, a difference in means and paired differences
  4. Chi-square and F-tests of variance
  5. Parametric vs nonparametric tests

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