Biology  by Bradford
support
03 / resources  ·  internal assessment  ·  stats toolkit

IB Biology IA statistics toolkit. Table it. Plot it. Test it.

The two things students get stuck on most: a data table that survives moderation, and the right statistical test, actually run. Both live in your browser: a t-test, chi-squared, Spearman’s rank or ANOVA with Tukey. Under the tool, each test is worked through by hand.

100% arithmetic. No AI, no server, no data leaves your browser.

  1. Start herePractise on real dataNine datasets to click through, if you are not sure where to begin.
  2. 01Build your tableType it, paste it from a spreadsheet, or drop a CSV.
  3. 02Visualise itBars or a scatter, with error bars.
  4. 03Pick the testThree questions take you to the right one.
  5. 04Run itt-test, chi-squared, Spearman’s, ANOVA with Tukey, working shown.
Practise firstPractise on real data

Nine real datasets from IA-style practicals. Pick one and click through the processing, from anomalies to the conclusion. Every number carries through, so excluding a value in step 1 changes everything after it.

Step 01Build your data table
Drop a CSV hereor paste cells from Excel or Google Sheets into the table below. It is read in your browser, never uploaded.
0 groups One row per IV level (group). One column per repeat.

Clean, IA-ready table

Step 02Visualise it
Step 03Which test do I need?

The whole decision tree at a glance, or step through it question by question below. The tests side by side, with a worked example of each, are under the tool.

What are you comparing? A relationship between two variables A difference between group means Observed vs expected counts Both continuous Categorical 2 groups · paired 2 groups · independent 3+ groups Counts against an expected ratio Spearman's rank Chi-squared (association) Paired t-test Unpaired t-test ANOVA + Tukey HSD Chi-squared (goodness of fit)
Step 04Run the test

Uses the two groups from your Step 01 table directly, no need to re-enter anything. Worked examples, unpaired and paired.

Goodness of fit: compare observed counts against an expected ratio (e.g. a genetic cross, Hardy-Weinberg, or a habitat preference). Type each category’s observed count and the count the ratio predicts. Worked example.

CategoryObservedExpected

Enter paired continuous values, one per line (or comma-separated). X and Y must have the same number of values, and ideally n ≥ 10. Worked example.

Uses all groups from your Step 01 table directly (needs 3+ groups, each with 2+ repeats). Runs a one-way ANOVA, then Tukey HSD on every pair. Worked example.

The tests, explained

Which statistical test for your IB Biology IA?

Each test answers one kind of question. Find yours in the first column and check your data match the second. Each test then has a worked example below: the null hypothesis, the working, the result and the sentence for your IA.

The question you are askingYour dataThe testWhat it tells youWhen not to use it
Do two groups differ?Is stomatal density different on sun and shade leaves? A measurement, with repeats, in two separate groups Unpaired t-test Whether the gap between the two means is bigger than the spread of the repeats would give by chance Three or more groups (use ANOVA); the same individuals measured twice (use the paired t-test); counts in categories (use chi-squared)
Did the same individuals change?Does each potato cylinder gain mass in water? Two measurements on each individual or sample: before and after, or under two conditions Paired t-test Whether the mean of the differences is different from zero The two sets come from different individuals, so a value has no partner in the other set
Do three or more groups differ?Does the sugar change how much carbon dioxide yeast gives off? A measurement, with repeats, in three or more groups One-way ANOVA, then Tukey’s HSD ANOVA: whether at least one mean differs. Tukey: which pairs differ Only two groups (use the t-test); counts in categories (use chi-squared)
Do counts fit an expected ratio?Do seedlings from a cross fit 3 green : 1 albino? Counts of individuals in categories, and a ratio that predicts them Chi-squared goodness of fit Whether the observed counts differ from the expected counts by more than chance would explain Means, percentages or measurements (it needs the raw counts); any expected count below 5
Are two sets of categories linked?Does each species of plantain favour a different zone beside a path? Counts of individuals, each sorted two ways into a contingency table Chi-squared test of association Whether the two variables are associated, and from the biggest terms, where As for goodness of fit; and never count one individual twice
Do two measured variables rise or fall together?Does moss cover increase with soil moisture? Pairs of values measured on the same quadrats or samples, ideally 10 pairs or more Spearman’s rank correlation How strongly, and which way, the two are correlated (rs from −1 to +1), and whether that is significant Comparing groups (use a t-test or ANOVA). A correlation never shows that one variable causes the other

How the numbers are rounded. Every example gives the numbers the calculator gives for the same data, and each has a button that loads them in to check. Means and standard deviations carry one decimal place more than the readings. In the sentences the test statistic has 2 decimal places and p has 3 (or reads p < 0.001), as the calculator’s own sentence does; its results card shows one place more of each. Critical values have 3 decimal places, as tables print them, at the 0.05 significance level the calculator uses. Work with unrounded values and round at the end.

Test 1

t-test: is the difference between two means significant?

A t-test compares the means of two groups. It asks whether the gap between them is big compared with how much the repeats vary, or small enough to be down to random variation. Use the unpaired t-test for two separate groups, and the paired t-test when the same individuals or samples are measured twice.

Worked example: stomata on sun and shade leaves

Stomata were counted on the lower surface of six leaves from the sunny side of a hedge and six from the shaded side, using nail varnish peels, and each count was converted to stomata per mm².

Null hypothesis (H0)There is no difference in mean stomatal density between sun leaves and shade leaves.

Stomatal density / stomata per mm²
Leaves123456Mean ± SD
Sun leaves212236198241225219221.8 ± 15.8
Shade leaves186199171205182193189.3 ± 12.3
  1. Mean and standard deviation of each group: sun 221.8 ± 15.8, shade 189.3 ± 12.3 stomata per mm² (n = 6 each).
  2. Pooled variance: sp² = [(6 − 1) × 15.82² + (6 − 1) × 12.27²] ÷ (6 + 6 − 2) = 200.4
  3. t = (x̄1 − x̄2) ÷ √(sp²(1/n1 + 1/n2)) = (221.83 − 189.33) ÷ √(200.4 × (1/6 + 1/6)) = 32.50 ÷ 8.17 = 3.98
  4. Degrees of freedom: df = n1 + n2 − 2 = 10
  5. Critical value of t for df = 10 at p = 0.05 (two-tailed): 2.228. As 3.98 > 2.228, the difference is significant.
t
3.98
df
10
Critical t (p = 0.05)
2.228
p
0.003
The sentence for your IA

Mean stomatal density was higher on sun leaves (221.8 ± 15.8 stomata per mm²) than on shade leaves (189.3 ± 12.3 stomata per mm²). An unpaired t-test gave t = 3.98 (df = 10), p = 0.003. As p < 0.05, the null hypothesis, that there is no difference in mean stomatal density between sun and shade leaves, is rejected: the difference is statistically significant.

The calculator’s t-test pools the two standard deviations (Student’s t-test), which assumes the two groups vary by a similar amount. Here they do: 15.8 and 12.3.

Paired t-test: the same potato cylinders, before and after

Six potato cylinders were weighed, left in distilled water for 30 minutes, blotted dry and weighed again. Each cylinder has its own before and after mass, so the two sets are paired: the test works on each cylinder’s change in mass, which takes the differences between cylinders out of the comparison.

Null hypothesis (H0)The mean change in mass of the potato cylinders is zero.

Cylinder123456
Before / g2.312.452.182.522.372.29
After / g2.442.612.302.642.552.40
Change / g+0.13+0.16+0.12+0.12+0.18+0.11
  1. Change in mass of each cylinder, after − before: the last row of the table.
  2. Mean change d̄ = 0.137 g, standard deviation of the changes sd = 0.027 g, n = 6
  3. t = d̄ ÷ (sd ÷ √n) = 0.1367 ÷ (0.02733 ÷ √6) = 0.1367 ÷ 0.01116 = 12.25
  4. Degrees of freedom: df = n − 1 = 5
  5. Critical value of t for df = 5 at p = 0.05 (two-tailed): 2.571. As 12.25 > 2.571, the change is significant.
t
12.25
df
5
Critical t (p = 0.05)
2.571
p
< 0.001
The sentence for your IA

The potato cylinders gained a mean of 0.137 ± 0.027 g in distilled water (n = 6). A paired t-test gave t = 12.25 (df = 5), p < 0.001. As p < 0.05, the null hypothesis, that the mean change in mass is zero, is rejected: the gain in mass is statistically significant.

Test 2

Chi-squared test: observed counts against expected counts

Chi-squared works on counts: the number of individuals in each category, never means, percentages or lengths. It adds up how far each observed count (O) is from the count expected (E): χ² = Σ (O − E)² ÷ E. A goodness of fit test takes E from a ratio you predict; a test of association works E out from the table itself. Every expected count should be 5 or more, or the test is not reliable.

Goodness of fit: do seedlings fit a 3 : 1 ratio?

Seeds from a cross between two tobacco plants, both heterozygous for a recessive albino allele, were germinated on damp paper. Of 150 seedlings, 104 were green and 46 albino. A monohybrid cross predicts 3 green : 1 albino.

Null hypothesis (H0)There is no difference between the observed numbers of green and albino seedlings and the numbers expected from a 3 : 1 ratio.

PhenotypeObserved (O)Expected (E)(O − E)² ÷ E
Green104150 × 3/4 = 112.50.642
Albino46150 × 1/4 = 37.51.927
Total150150χ² = 2.569
  1. Expected counts from the ratio: 150 × 3/4 = 112.5 green, 150 × 1/4 = 37.5 albino.
  2. χ² = (104 − 112.5)² ÷ 112.5 + (46 − 37.5)² ÷ 37.5 = 0.642 + 1.927 = 2.569
  3. Degrees of freedom: df = number of categories − 1 = 1
  4. Critical value of χ² for df = 1 at p = 0.05: 3.841. As 2.57 < 3.841, the difference is not significant.
χ²
2.57
df
1
Critical χ² (p = 0.05)
3.841
p
0.109
The sentence for your IA

A chi-squared test gave χ² = 2.57 (df = 1), p = 0.109. As p > 0.05, the null hypothesis, that the seedlings fit the expected 3 : 1 ratio of green to albino, cannot be rejected: the difference from the expected counts could be due to chance alone.

Not significant is a result too: the counts are consistent with a 3 : 1 ratio, though that does not prove it. The calculator’s goodness of fit mode takes the expected counts, so work them out from the ratio first, as in step 1.

Test of association: a contingency table

Beside a footpath, every plantain plant in ten quadrats in each of three zones was identified as greater plantain (Plantago major) or ribwort plantain (Plantago lanceolata). Each plant is counted once, by its species and its zone.

Null hypothesis (H0)There is no association between the species of plantain and the zone it grows in.

Observed (O)Path edgeVergeGrassTotal
P. major3422965
P. lanceolata11253975
Total454748140
  1. Expected count for each cell = row total × column total ÷ grand total. For greater plantain at the path edge: 65 × 45 ÷ 140 = 20.89.
  2. Then (O − E)² ÷ E for each of the six cells, as for goodness of fit:
Expected (E)Path edgeVergeGrass
P. major20.8921.8222.29
P. lanceolata24.1125.1825.71
(O − E)² ÷ EPath edgeVergeGrass
P. major8.2230.0017.920
P. lanceolata7.1260.0016.864
  1. χ² = the sum of the six terms = 30.137 (added before rounding)
  2. Degrees of freedom: df = (rows − 1) × (columns − 1) = (2 − 1) × (3 − 1) = 2
  3. Critical value of χ² for df = 2 at p = 0.05: 5.991. As 30.14 > 5.991, the association is significant.
χ²
30.14
df
2
Critical χ² (p = 0.05)
5.991
p
< 0.001
The sentence for your IA

A chi-squared test of association gave χ² = 30.14 (df = 2), p < 0.001. As p < 0.05, the null hypothesis, that there is no association between the species of plantain and the zone, is rejected: greater plantain was found more often than expected at the path edge, and ribwort plantain more often than expected in the grass.

The biggest terms show where the association lies: the path edge and the grass. The verge counts are almost exactly as expected. In the calculator, choose Test of association and type only the observed counts: it works out the expected counts, every term and df = (rows − 1) × (columns − 1) for you. Run as goodness of fit instead, six cells would wrongly get df = 5.

Test 3

Spearman’s rank correlation: do two variables rise or fall together?

Spearman’s rank correlation coefficient, rs, measures how consistently one variable rises (or falls) as the other rises. It works on ranks, not the values themselves, so the relationship does not have to be a straight line. rs runs from −1 (a perfect negative correlation) through 0 (none) to +1 (a perfect positive correlation).

Worked example: moss cover and soil moisture

Ten quadrats were placed at 2 m intervals along a transect running down a slope to a stream. In each, soil moisture was read with a probe and the percentage cover of moss was estimated.

Null hypothesis (H0)There is no correlation between soil moisture and the percentage cover of moss.

QuadratSoil moisture / %RankMoss cover / %Rankdd²
11215100
2183224−11
31529200
424414311
531630600
6275418−39
735726524
8461052911
93986110−24
1043938724
Σd²24
  1. Rank each variable on its own, smallest = 1. Tied values share the mean of their ranks (two values in 3rd and 4th place both get 3.5); the calculator does this for you.
  2. For each quadrat, d = the difference between its two ranks. Square each d and add them: Σd² = 24
  3. rs = 1 − (6Σd²) ÷ (n(n² − 1)) = 1 − (6 × 24) ÷ (10 × 99) = 1 − 144 ÷ 990 = 0.8545, so rs = 0.85
  4. Spearman tables are read with n, the number of pairs, rather than df: n = 10
  5. Critical value of rs for n = 10 at p = 0.05 (two-tailed): 0.648. As 0.85 > 0.648, the correlation is significant.
rs
0.85
n
10
Critical rs (p = 0.05)
0.648
p (approximate)
0.002
The sentence for your IA

Spearman’s rank correlation gave rs = 0.85 (n = 10), p = 0.002. As p < 0.05, the null hypothesis, that there is no correlation between soil moisture and moss cover, is rejected: there is a significant positive correlation.

The calculator works p out from an approximation that is less exact below about 10 pairs, so with a small sample compare rs with the critical value from a table, as in step 5. A significant correlation does not show cause: something else that changes along the transect, such as shade, could be behind both. And the R² that Step 02 gives for a line of best fit says how closely the means follow the line; it describes the fit and is not a test.

Test 4

ANOVA with Tukey’s HSD: comparing three or more means

A one-way ANOVA compares the means of three or more groups in one test. It works out F: the variation between the group means divided by the variation within the groups. ANOVA only says whether at least one mean differs; Tukey’s honestly significant difference (HSD) test then compares every pair and says which. Running a t-test on every pair instead raises the risk of a false positive: three groups means three tests, each with a 5% chance of a significant result by luck alone.

Worked example: yeast respiring three sugars

Yeast was mixed with a 5% solution of glucose, sucrose or maltose at 30 °C, and the volume of carbon dioxide given off in 10 minutes was measured, five times for each sugar.

Null hypothesis (H0)There is no difference in the mean volume of carbon dioxide given off by yeast with glucose, sucrose and maltose. For Tukey’s test, each pair has its own: there is no difference between the two means.

Volume of carbon dioxide in 10 minutes / cm³
Sugar12345Mean ± SD
Glucose8.49.17.88.88.68.54 ± 0.49
Sucrose8.18.77.48.37.98.08 ± 0.48
Maltose6.97.66.27.36.86.96 ± 0.53
  1. Grand mean of all 15 values: x̄grand = 7.86 cm³
  2. SSbetween = Σ ni(x̄i − x̄grand)² = 6.604, and SSwithin = ΣΣ(xij − x̄i)² = 3.012
  3. Each mean square is SS ÷ df: MSbetween = 6.604 ÷ 2 = 3.302, and MSwithin = 3.012 ÷ 12 = 0.251
  4. F = MSbetween ÷ MSwithin = 3.302 ÷ 0.251 = 13.16, with df = 2 (k − 1) and 12 (N − k)
  5. Critical value of F for df = 2 and 12 at p = 0.05: 3.885. As 13.16 > 3.885, at least one mean differs. Now Tukey finds which.
SourceSSdfMSFp
Between groups6.60423.30213.1550.0009
Within groups3.012120.251
Total9.61614
  1. For each pair, q = |x̄i − x̄j| ÷ √(MSwithin ÷ n). For glucose and maltose: 1.580 ÷ √(0.251 ÷ 5) = 1.580 ÷ 0.224 = 7.05
  2. Critical value of q for 3 groups and df = 12 at p = 0.05: 3.773. A pair whose q is above it differs significantly.
PairMean difference / cm³qpSignificant?
Glucose vs Maltose1.5807.0520.0009Yes
Sucrose vs Maltose1.1204.9990.0106Yes
Glucose vs Sucrose0.4602.0530.3471No
F
13.16
df
2 and 12
Critical F (p = 0.05)
3.885
p
< 0.001
The sentence for your IA

Mean volume of carbon dioxide was highest with glucose (8.54 ± 0.49 cm³), then sucrose (8.08 ± 0.48 cm³), and lowest with maltose (6.96 ± 0.53 cm³). A one-way ANOVA gave F(2, 12) = 13.16, p < 0.001. As p < 0.05, the null hypothesis, that the mean volume of carbon dioxide is the same for all three sugars, is rejected. Tukey’s HSD test shows that maltose differs significantly from both glucose (p < 0.001) and sucrose (p = 0.011), but glucose and sucrose do not differ significantly (p = 0.347).

Got a whole draft? Mark my IA gives you the move that gains each criterion its next mark.

back to
IB Biology Internal Assessment: the four criteria and a tool for each