BIOL 200 · Comparing two means

Is the difference real? The two-sample t-test

Lizards in sun vs. shade, frogs in parks vs. wetlands, blackbirds before vs. after a hormone implant. Each time, two groups have different averages. The t-test tells you whether that gap is bigger than you'd expect from ordinary variation alone.

How to use this page

Work through the tabs in order. Each tab matches a section of your Canvas questions. Two buttons in the bottom corner stay with you everywhere: the Calculator (so you don't need a separate one) and the t-table. Answer boxes check themselves as you type.

1Which t-test do I need?

A t-test asks: "Are the means of two groups statistically different from each other?" Before you calculate anything, you have to know how your two groups are related.

Independent samples t-test

Compares two separate groups of different individuals. Each individual appears in only one group.

Lizards from grassland vs. lizards from forest. Treated cells vs. untreated cells.

Paired samples t-test

Compares the same individuals measured twice (before/after, or under two conditions). You test the difference within each individual.

The same 13 blackbirds before and after a testosterone implant.

Quick sort: independent or paired? 0 / 6

Ask yourself: could I draw a line connecting each measurement in group 1 to one specific measurement in group 2?

Choose the right test, one question at a time

This follows the "2-Sample Comparison" flowchart from lecture. Answer the questions and the page tells you which test to run.

The six steps of every t-test

  1. State the hypotheses. H₀: μ₁ = μ₂ (no difference). HA: μ₁ ≠ μ₂ (there is a difference).
  2. Choose a significance level (α), usually 0.05.
  3. Calculate the t-statistic.
  4. Determine the p-value (or compare t to the critical value from the table).
  5. Compare p to α and draw a conclusion. p ≤ α → reject H₀. p > α → fail to reject H₀.
  6. If p is close to α, check the effect size to see how big the difference really is.

Try this

  1. Finish the quick sort. Which clue in the study description told you a design was paired?
  2. Use the flowchart for the lecture's horned lizard study: 30 lizards killed by shrikes vs. 154 different living lizards, data look normal, Levene's test p = 0.15. Which test does it give you?