Learning Objectives

By the end of this chapter, you will be able to:

  • Understand when to use t-tests instead of z-tests
  • Perform one-sample t-tests for small samples
  • Perform independent samples t-tests
  • Calculate pooled variance and degrees of freedom
  • Interpret t-test results correctly

When to Use t-Test

Use t-test when:

  1. Testing claims about population means
  2. Sample size is small (n < 30)
  3. Population is approximately normal
  4. σ is unknown (always for small samples)
flowchart TD
    A["Testing mean?"]
    B{"Is σ known?"}
    C{"Is n ≥ 30?"}
    D["Z-test"]
    E{"Is population<br/>normal?"}
    F["t-test"]
    G["Non-parametric test"]

    A --> B
    B -->|Yes| D
    B -->|No| C
    C -->|Yes| D
    C -->|No| E
    E -->|Yes/Approx| F
    E -->|No| G

The t-Distribution

When σ is unknown and the sample is small, you estimate the SE with $s/\sqrt{n}$. That extra uncertainty (estimating σ from the same small sample) produces a sampling distribution with heavier tails than the standard normal. Extremely large $ t $ values are more common by chance than under z—so critical values from the t-table are larger than the familiar 1.96 / 1.645 cutoffs until df grows large.

Properties

  • Bell-shaped, symmetric around 0
  • Heavier tails than normal distribution
  • Depends on degrees of freedom (df)
  • As df → ∞, t → z (normal)
flowchart LR
    A["df = 5: Heavy tails"]
    B["df = 15: Moderate tails"]
    C["df = 30: Near normal"]
    D["df = ∞: Normal"]

    A --> B --> C --> D

PA takeaway: Pilot evaluations and small ward-level samples (n = 12–25) almost always need t, not z. Using z with small n understates uncertainty and rejects $H_0$ too easily.


One-Sample t-Test

Test Statistic

\[t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}\]

Degrees of freedom: df = n - 1


Step-by-Step Example 1: One-Sample t-Test

Problem: A government claims average processing time is 30 minutes. A sample of 16 cases shows:

  • Mean: 34 minutes
  • Standard deviation: 8 minutes

Test at α = 0.05 if processing time exceeds 30 minutes.

Solution:

Step 1: State hypotheses

  • $H_0: \mu = 30$
  • $H_1: \mu > 30$ (right-tailed)

Step 2: Check conditions

  • n = 16 < 30 (small sample)
  • σ unknown
  • Assume population is approximately normal

Step 3: Calculate test statistic \(t = \frac{34 - 30}{8/\sqrt{16}} = \frac{4}{2} = 2.00\)

Step 4: Find critical value

  • df = 16 - 1 = 15
  • Right-tailed, α = 0.05
  • From t-table: t* = 1.753

Step 5: Decision

  • t = 2.00 > 1.753
  • Reject H₀

Step 6: Conclusion At the 0.05 level of significance, there is sufficient evidence to conclude that average processing time exceeds 30 minutes.


t-Table Reference (Selected Values)

df α = 0.10 α = 0.05 α = 0.025 α = 0.01 α = 0.005
5 1.476 2.015 2.571 3.365 4.032
10 1.372 1.812 2.228 2.764 3.169
15 1.341 1.753 2.131 2.602 2.947
20 1.325 1.725 2.086 2.528 2.845
25 1.316 1.708 2.060 2.485 2.787
30 1.310 1.697 2.042 2.457 2.750

Note: For two-tailed test at α = 0.05, use α/2 = 0.025 column.


Independent Samples t-Test

Used to compare means from two independent groups when at least one sample is small.

Assumptions

  1. Both samples are random and independent
  2. Both populations are approximately normal
  3. Population variances are equal (for pooled t-test)

Pooled Variance

Pooling is justified when the two groups can reasonably be treated as draws from populations with the same spread—for example, two training batches measured on the same scale under similar conditions. You then combine information about variability into one $s_p$, which improves the SE estimate when that assumption holds.

If one group is much more variable than the other (common when comparing urban vs remote service centers, or experienced vs new staff), pooling can distort the SE and the p-value. In that case prefer Welch’s t-test (below). When in doubt, check whether $s_1$ and $s_2$ look similar; if they differ sharply, use Welch and say so.

When we assume equal population variances:

\[s_p^2 = \frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1 + n_2 - 2}\]

Pooled Standard Error

\[SE = s_p\sqrt{\frac{1}{n_1} + \frac{1}{n_2}}\]

Test Statistic

\[t = \frac{\bar{x}_1 - \bar{x}_2}{s_p\sqrt{\frac{1}{n_1} + \frac{1}{n_2}}}\]

Degrees of freedom: df = n₁ + n₂ - 2


Step-by-Step Example 2: Independent Samples t-Test

Problem: Compare productivity of two teams:

  Team A Team B
n 12 10
Mean 85 78
SD 8 10

Test at α = 0.05 if Team A has higher productivity.

Solution:

Step 1: State hypotheses

  • $H_0: \mu_1 = \mu_2$
  • $H_1: \mu_1 > \mu_2$ (right-tailed)

Step 2: Calculate pooled variance \(s_p^2 = \frac{(12-1)(8)^2 + (10-1)(10)^2}{12 + 10 - 2}\) \(= \frac{11(64) + 9(100)}{20} = \frac{704 + 900}{20} = \frac{1604}{20} = 80.2\)

\[s_p = \sqrt{80.2} = 8.96\]

Step 3: Calculate standard error \(SE = 8.96\sqrt{\frac{1}{12} + \frac{1}{10}} = 8.96\sqrt{0.0833 + 0.1} = 8.96\sqrt{0.1833}\) \(= 8.96 \times 0.428 = 3.84\)

Step 4: Calculate test statistic \(t = \frac{85 - 78}{3.84} = \frac{7}{3.84} = 1.82\)

Step 5: Find critical value

  • df = 12 + 10 - 2 = 20
  • Right-tailed, α = 0.05
  • t* = 1.725

Step 6: Decision

  • t = 1.82 > 1.725
  • Reject H₀

Step 7: Conclusion At the 0.05 level of significance, there is sufficient evidence to conclude that Team A has higher productivity than Team B.


Step-by-Step Example 3: Two-Tailed t-Test

Problem: Compare exam scores of two teaching methods:

  Method 1 Method 2
n 15 18
Mean 72 78
SD 10 12

Test at α = 0.05 if means differ.

Solution:

Step 1: State hypotheses

  • $H_0: \mu_1 = \mu_2$
  • $H_1: \mu_1 \neq \mu_2$ (two-tailed)

Step 2: Calculate pooled variance \(s_p^2 = \frac{(14)(100) + (17)(144)}{31} = \frac{1400 + 2448}{31} = \frac{3848}{31} = 124.13\)

\[s_p = 11.14\]

Step 3: Calculate standard error \(SE = 11.14\sqrt{\frac{1}{15} + \frac{1}{18}} = 11.14\sqrt{0.0667 + 0.0556}\) \(= 11.14\sqrt{0.1222} = 11.14 \times 0.350 = 3.90\)

Step 4: Calculate test statistic \(t = \frac{72 - 78}{3.90} = \frac{-6}{3.90} = -1.54\)

Step 5: Find critical value

  • df = 15 + 18 - 2 = 31
  • Two-tailed, α = 0.05
  • t* = ±2.040 (approximately, for df = 30)

Step 6: Decision

  • |t| = 1.54 < 2.040
  • Fail to Reject H₀

Step 7: Conclusion At the 0.05 level of significance, there is insufficient evidence to conclude that the teaching methods produce different mean scores.


Confidence Interval for Difference of Means

\[(\bar{x}_1 - \bar{x}_2) \pm t^* \times SE\]

Example 4: 95% CI

Using Example 2 data:

  • Difference = 85 - 78 = 7
  • SE = 3.84
  • df = 20, t* = 2.086 (two-tailed)

\(95\% \text{ CI} = 7 \pm 2.086 \times 3.84 = 7 \pm 8.01\) \(= (-1.01, 15.01)\)

Since 0 is in the interval, at 95% confidence the difference is not significant (for two-tailed test).


Unequal Variances (Welch’s t-Test)

When population variances are NOT equal, use Welch’s approximation. In applied PA work, when in doubt, prefer Welch: it does not require equal variances and software reports it by default in many packages. For hand calculation in exams, use pooled t unless the problem states variances differ or the sample SDs clearly disagree.

Test Statistic

\[t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}\]

Degrees of Freedom (Welch-Satterthwaite)

\[df = \frac{\left(\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}\right)^2}{\frac{(s_1^2/n_1)^2}{n_1-1} + \frac{(s_2^2/n_2)^2}{n_2-1}}\]

(This is complex - often calculated by software)


Common Mistakes

  1. Using z when n < 30 and σ unknown. That understates uncertainty; use t with df = n − 1 (one sample) or the appropriate two-sample df.
  2. Treating paired data as independent. Before/after training on the same officers is a paired t-test, not an independent-samples t-test.
  3. Wrong degrees of freedom. One-sample: n − 1. Pooled two-sample: n₁ + n₂ − 2. Welch: use the Welch–Satterthwaite formula (or software).
  4. Pooling automatically. Equal-variance pooling is an assumption, not a default—check SDs or use Welch.

Summary: Choosing the Right Test

Condition Test to Use
σ known, any n Z-test
σ unknown, n ≥ 30 Z-test (with s)
σ unknown, n < 30, normal pop t-test
Equal variances assumed Pooled t-test
Unequal variances Welch’s t-test

Practice Problems

Problem 1

A sample of 20 employees has mean productivity 95 with s = 15. Test at α = 0.05 if mean differs from 100.

Answer / solution sketch $H_0{:}\ \mu=100$, $H_1{:}\ \mu\neq 100$; df = 19; $t^*=\pm 2.093$. $$t=\frac{95-100}{15/\sqrt{20}}\approx -1.49$$ $|t|<2.093$ → **fail to reject $H_0$**.

Problem 2

Compare two groups:

  • Group 1: n = 10, $\bar{x}$ = 45, s = 6
  • Group 2: n = 12, $\bar{x}$ = 40, s = 8

Test at α = 0.05 if means differ.

Answer / solution sketch $$s_p^2=\frac{9(36)+11(64)}{20}=51.4,\quad t=\frac{45-40}{\sqrt{51.4(1/10+1/12)}}\approx 1.63$$ df = 20; $t^*=\pm 2.086$. $|t|<2.086$ → **fail to reject $H_0$**.

Problem 3

For Problem 2, construct a 95% CI for the difference in means.

Answer / solution sketch $SE=\sqrt{51.4(1/10+1/12)}\approx 3.07$; df = 20; $t^*=2.086$. $$5\pm 2.086(3.07)\approx (-1.40,\ 11.40)$$

Problem 4

Test scores:

  • Morning class: n = 15, $\bar{x}$ = 82, s = 10
  • Afternoon class: n = 18, $\bar{x}$ = 76, s = 12

Test if morning class has higher scores at α = 0.01.

Answer / solution sketch $H_1{:}\ \mu_M>\mu_A$; df = 31; $t^*\approx 2.45$ (one-tailed, α = 0.01). $$s_p^2=\frac{14(100)+17(144)}{31}\approx 124.1,\quad t=\frac{82-76}{\sqrt{124.1(1/15+1/18)}}\approx 1.54$$ $1.54<2.45$ → **fail to reject $H_0$**.

Problem 5

A sample of 25 gives $\bar{x}$ = 50, s = 8. Find the 99% CI for the population mean.

Answer / solution sketch df = 24; $t^*\approx 2.797$. $$50\pm 2.797\cdot\frac{8}{\sqrt{25}}\approx (45.52,\ 54.48)$$

Summary

Component Formula
One-sample t $t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}$, df = n-1
Pooled variance $s_p^2 = \frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1 + n_2 - 2}$
Two-sample t $t = \frac{\bar{x}_1 - \bar{x}_2}{s_p\sqrt{1/n_1 + 1/n_2}}$, df = n₁+n₂-2
Decision Compare t to critical value from t-table

Next Topic

In the next chapter, we will study Paired t-Test - testing for differences when samples are dependent (matched pairs).