5  T-Tests: Part #1

5.1 Key Concepts

  • Normal Distribution
  • Variance, Standard Deviation
  • Probability Values
  • Cut-Off Points

5.2 Key Formulas

\[t = \frac{M - \mu_0}{s / \sqrt{N}}\]

\[t = \frac{\bar{D}}{s_D / \sqrt{N}}\]

\[SE = \frac{s}{\sqrt{N}}, \qquad df = N - 1\]

5.3 Code Examples

library(palmerpenguins)
library(tidyverse)

adelie <- penguins |>
  filter(species == "Adelie") |>
  drop_na(flipper_length_mm)

t.test(adelie$flipper_length_mm, mu = 190)
penguins |>
  drop_na(bill_length_mm, bill_depth_mm) |>
  slice_head(n = 20) |>
  with(t.test(bill_length_mm, bill_depth_mm, paired = TRUE))

5.4 Exercises

5.4.1 Conceptual Questions

  1. Dependent-measures t-tests should be used when:

    A. Whenever possible

    B. We have repeated measurements from the same participants (or matched pairs)

    C. We are interested in a dependent variable

    D. Our independent variable has two levels

  2. A t-test is preferred over a z-test when we lack information about the:

    A. Sample size

    B. Population mean

    C. Population standard deviation

    D. Sample variance

  3. The t-table provides different cutoff values of t for different:

    A. Variances

    B. Experimental designs

    C. Degrees of freedom (N – 1)

    D. Types of t-tests (independent vs. dependent)

  4. TRUE or FALSE: The t distribution looks like the z (normal) distribution, but only when sample size is sufficiently large.

    A. True

    B. False

  5. A data set has 100 participants, each contributing one response. The mean of the responses is 75.32. How many responses are free to vary?

    A. 99

    B. 100

    C. 1

    D. Not enough information to know


5.4.2 Computational Questions

Note: if direction is not specified, use direction implied by hypothesis.

For each problem: write H₀ and H₁, identify the cutoff value(s), compute the necessary descriptive statistics and t (showing all steps), state your decision, and interpret the result in plain language.


Problem 1 — One-Sample t-Test

An athletic trainer believes a new training protocol increases golf swing speed. The historical population mean is μ₀ = 98 MPH, but the population standard deviation is unknown. N = 12 participants were tested after completing the protocol. Use α = .05.

Participant Swing Speed (MPH)
1 103
2 102
3 97
4 102
5 99
6 105
7 95
8 98
9 99
10 105
11 101
12 103
mu0         <- 98   # historical population mean (MPH)
swing_speed <- c(103, 102, 97, 102, 99, 105, 95, 98, 99, 105, 101, 103)
alpha       <- 0.05

Compute the following before finding t:

Statistic Value
Sum =
N =
Mean =
SS =
Variance =
SD =
df =

Write H₀/H₁ and determine the cutoff value:

 

Compute t, state your decision, and interpret:

 

 

 


Problem 2 — Dependent-Measures (Within-Subjects) t-Test

The same athletic trainer now wants to test whether the protocol increases swing speed within subjects. N = 12 participants are tested before and after the training protocol. Use α = .05.

Participant Before (MPH) After (MPH) Difference (D) D − M̄D (D − M̄D)²
1 101 103
2 102 102
3 95 97
4 102 101
5 99 96
6 101 105
7 93 95
8 97 98
9 99 98
10 103 105
11 101 104
12 101 102
Sum
before <- c(101, 102, 95, 102, 99, 101, 93, 97, 99, 103, 101, 101)
after  <- c(103, 102, 97, 101, 96, 105, 95, 98, 98, 105, 104, 102)
D      <- after - before
alpha  <- 0.05

Compute the following:

Statistic Value
Sum of D =
Mean of D =
N =
SSD =
VarianceD =
SDD =
df =

Write H₀/H₁ and determine the cutoff value:

 

Compute t, state your decision, and interpret:

 

 

 


Problem 3 — One-Sample t-Test

You are hired by the Minnesota Vikings to determine if they score a different number of points per game than the NFL average. Use α = .01.

Parameter Value
Sample mean (M) 28 points
Sample SD 7
Sample size (N) 16 games
Population mean (μ₀) 24 points
mu0   <- 24   # NFL average points per game
M     <- 28   # Vikings sample mean
SD    <- 7    # Vikings sample SD
N     <- 16   # number of games
alpha <- 0.01

Write H₀/H₁, determine cutoff, compute t, decide, and interpret:

 

 

 


Problem 4 — One-Sample t-Test

A counseling center uses a standardized depression score (lower = fewer symptoms), with a known population mean of μ₀ = 22. Researchers expect the new group-therapy program to decrease scores. Use α = .10.

Parameter Value
Population mean (μ₀) 22
Sample mean (M) 19.2
Sample SD 3.5
Sample size (N) 36
mu0   <- 22    # population mean (lower = fewer symptoms)
M     <- 19.2  # sample mean
SD    <- 3.5   # sample SD
N     <- 36    # sample size
alpha <- 0.10

Write H₀/H₁, determine cutoff, compute t, decide, and interpret: