Fatskills
Practice. Master. Repeat.
Study Guide: How to Solve: IB AI HL/SL – Statistical Tests (t-test, Chi-squared, Spearman’s Rank, p-Values)
Source: https://www.fatskills.com/ib-exams/chapter/how-to-solve-ib-ai-hlsl-statistical-tests-t-test-chi-squared-spearmans-rank-p-values

How to Solve: IB AI HL/SL – Statistical Tests (t-test, Chi-squared, Spearman’s Rank, p-Values)

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~6 min read

How to Solve: IB AI HL/SL – Statistical Tests (t-test, Chi-squared, Spearman’s Rank, p-Values)


Introduction

"Mastering statistical tests in IB Math AI HL/SL can earn you 10-15% of your final exam score—and help you answer real-world questions like: ‘Is this new drug effective?’ or ‘Is there a link between study time and grades?’ Today, you’ll learn the exact steps to ace t-tests, Chi-squared, Spearman’s Rank, and p-values—so you can walk into your exam confident and prepared."


What You Need To Know First

Before diving in, ensure you understand: 1. Hypothesis Testing Basics – Null hypothesis (H₀) vs. alternative hypothesis (H₁), significance level (α). 2. Normal Distribution & Critical Values – How to read statistical tables (t-distribution, Chi-squared, Spearman’s). 3. Basic Probability – p-values, Type I/II errors.


Key Vocabulary

Term Plain-English Definition Quick Example
Null Hypothesis (H₀) The default assumption (no effect/no difference). "There is no difference in test scores between Group A and Group B."
Alternative Hypothesis (H₁) The claim we’re testing (there is an effect). "Group A scores higher than Group B."
p-value Probability of seeing your data (or more extreme) if H₀ is true. p = 0.03 → 3% chance H₀ is correct.
Significance Level (α) Threshold for rejecting H₀ (usually 0.05). If p < 0.05, reject H₀.
Degrees of Freedom (df) Number of independent values in a calculation. For t-test: df = n₁ + n₂ – 2.
Critical Value Cutoff from statistical tables (depends on α and df). If test statistic > critical value, reject H₀.

Formulas To Know

1. t-test (Independent Samples)

Formula: [ t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} ] Variables: - (\bar{x}_1, \bar{x}_2) = sample means - (s_1^2, s_2^2) = sample variances - (n_1, n_2) = sample sizes MEMORISE THIS (but check if given on your exam sheet).

Degrees of Freedom (df): [ df = n_1 + n_2 - 2 ]


2. Chi-squared (χ²) Test for Independence

Formula: [ \chi^2 = \sum \frac{(O - E)^2}{E} ] Variables: - (O) = observed frequency - (E) = expected frequency (row total × column total ÷ grand total) GIVEN ON EXAM SHEET (but know how to use it).

Degrees of Freedom (df): [ df = (r - 1)(c - 1) ] (where (r) = rows, (c) = columns)


3. Spearman’s Rank Correlation Coefficient

Formula: [ r_s = 1 - \frac{6 \sum d_i^2}{n(n^2 - 1)} ] Variables: - (d_i) = difference between ranks - (n) = number of pairs MEMORISE THIS (but check exam sheet).

Interpretation: - (r_s = 1) → perfect positive correlation - (r_s = -1) → perfect negative correlation - (r_s = 0) → no correlation


4. p-Value Interpretation

  • If p < α → Reject H₀ (statistically significant).
  • If p ≥ α → Fail to reject H₀ (not significant). MEMORISE THIS LOGIC (not a formula, but critical).

Step-by-Step Method

General Hypothesis Testing Steps (Applies to All Tests)

  1. State Hypotheses
  2. Write H₀ (no effect) and H₁ (effect).
  3. Example: H₀: μ₁ = μ₂ vs. H₁: μ₁ ≠ μ₂ (two-tailed t-test).

  4. Choose Significance Level (α)

  5. Usually α = 0.05 (given in exam).

  6. Calculate Test Statistic

  7. Use the correct formula (t, χ², or rₛ).

  8. Find Critical Value or p-Value

  9. Critical Value Approach: Compare test statistic to table value.
  10. p-Value Approach: Compare p-value to α.

  11. Make Decision

  12. If test statistic > critical value OR p < α → Reject H₀.
  13. Otherwise → Fail to reject H₀.

  14. Write Conclusion in Context

  15. Example: "There is sufficient evidence to conclude that the drug has an effect."

Worked Example: t-test (Independent Samples)

Question: Two groups of students took a math test. Group A (n=10) had a mean score of 75 with s=8. Group B (n=12) had a mean of 70 with s=6. Test at α=0.05 if Group A performed better.

Step-by-Step Solution:

  1. State Hypotheses
  2. H₀: μ₁ = μ₂ (no difference)
  3. H₁: μ₁ > μ₂ (Group A is better) → One-tailed test

  4. Significance Level

  5. α = 0.05

  6. Calculate t-statistic
    [ t = \frac{75 - 70}{\sqrt{\frac{8^2}{10} + \frac{6^2}{12}}} = \frac{5}{\sqrt{6.4 + 3}} = \frac{5}{3.07} ≈ 1.63 ]

  7. Degrees of Freedom
    [ df = 10 + 12 - 2 = 20 ]

  8. Find Critical Value

  9. One-tailed t-table (df=20, α=0.05) → 1.725

  10. Compare t to Critical Value

  11. 1.63 < 1.725 → Fail to reject H₀

  12. Conclusion
    "There is insufficient evidence to conclude that Group A performed better."

What we did and why: - Used a one-tailed t-test because the question asked "better" (directional). - Compared t to critical value (not p-value) since the exam often expects this. - Failed to reject H₀ because the test statistic was less extreme than the critical value.


Worked Examples

Example 1 – Basic: Chi-squared Test

Question: A survey asked 100 students if they prefer online or in-person learning. Test at α=0.05 if preference is independent of grade level.

Online In-Person Total
Grade 11 30 20 50
Grade 12 25 25 50
Total 55 45 100

Solution:

  1. Hypotheses
  2. H₀: Preference is independent of grade level.
  3. H₁: Preference depends on grade level.

  4. Expected Frequencies (E)

  5. E (Grade 11, Online) = (50 × 55) / 100 = 27.5
  6. E (Grade 11, In-Person) = (50 × 45) / 100 = 22.5
  7. E (Grade 12, Online) = 27.5
  8. E (Grade 12, In-Person) = 22.5

  9. Calculate χ²
    [ \chi^2 = \frac{(30-27.5)^2}{27.5} + \frac{(20-22.5)^2}{22.5} + \frac{(25-27.5)^2}{27.5} + \frac{(25-22.5)^2}{22.5} ]
    [ = \frac{6.25}{27.5} + \frac{6.25}{22.5} + \frac{6.25}{27.5} + \frac{6.25}{22.5} ≈ 0.227 + 0.278 + 0.227 + 0.278 = 1.01 ]

  10. Degrees of Freedom
    [ df = (2-1)(2-1) = 1 ]

  11. Critical Value (α=0.05, df=1)

  12. χ² table → 3.841

  13. Decision

  14. 1.01 < 3.841 → Fail to reject H₀

  15. Conclusion
    "There is no evidence that learning preference depends on grade level."


Example 2 – Medium: Spearman’s Rank

Question: 6 students ranked their math and science difficulty (1=easiest, 6=hardest). Test if there’s a correlation at α=0.05.

Student Math Rank Science Rank
A 2 3
B 1 1
C 4 5
D 3 2
E 6 6
F 5 4

Solution:

  1. Hypotheses
  2. H₀: No correlation between math and science difficulty.
  3. H₁: There is a correlation (two-tailed).

  4. Calculate Differences (d) and d²
    | Student | Math (x) | Science (y) | d = x-y | d² |
    |---------|----------|-------------|---------|----|
    | A | 2 | 3 | -1 | 1 |
    | B | 1 | 1 | 0 | 0 |
    | C | 4 | 5 | -1 | 1 |
    | D | 3 | 2 | 1 | 1 |
    | E | 6 | 6 | 0 | 0 |
    | F | 5 | 4 | 1 | 1 |
    Σd² = 4

  5. Calculate rₛ
    [ r_s = 1 - \frac{6 \times 4}{6(36 - 1)} = 1 - \frac{24}{210} ≈ 0.886 ]

  6. Critical Value (n=6, α=0.05, two-tailed)

  7. Spearman’s table → 0.886

  8. Decision

  9. 0.886 ≥ 0.886 → Reject H₀

  10. Conclusion
    "There is a significant positive correlation between math and science difficulty rankings."


Example 3 – Exam-Style: p-Value Interpretation

Question: A t-test gives p=0.03. The significance level is α=0.05. What conclusion can you draw?

Solution:

  1. Compare p to α
  2. p = 0.03 < 0.05 → Reject H₀

  3. Conclusion
    "There is sufficient evidence to reject the null hypothesis at the 5% significance level."

What we did and why: - Used p-value approach (common in exams). - Rejected H₀ because p was less than α, meaning the result is statistically significant.


Common Mistakes

Mistake Why it Happens Correct Approach
Using wrong test (e.g., t-test for categorical data) Confusing when to use t-test vs. Chi-squared. t-test = numerical data, Chi-squared = categorical.
Forgetting degrees of freedom Not calculating df correctly. t-test: df = n₁ + n₂ – 2. Chi-squared: df = (r-1)(c-1).
Mixing up one-tailed vs. two-tailed Not reading the question carefully. "Better/higher" = one-tailed. "Different" = two-tailed.
Misinterpreting p-value Thinking p=0.03 means 97% chance H₀ is wrong. p=0.03 means 3% chance of seeing this data if H₀ is true.
Ignoring assumptions (e.g., normal distribution for t-test) Skipping checks. For t-test: n ≥ 30 or normally distributed data.

Exam Traps

Trap How to Spot it How to Avoid it
Tricky wording (e.g., "at least" vs. "different") Question says "at least" or "no more than." "At least" = one-tailed. "Different" = two-tailed.
Given p-value but asked for critical value Exam provides p but expects critical value comparison. Always check what the question asks for (p or critical value).
Small sample size without normality check n < 30 and no mention of normality. State assumption: "Assuming data is normally distributed..."

1-Minute Recap

"Here’s your last-minute cheat sheet for statistical tests in IB Math AI:

  1. t-test: Compare means of two groups. Formula: ((\bar{x}_1 - \bar{x}_2) / \text{SE}). Degrees of freedom = n₁ + n₂ – 2.
  2. Chi-squared: Test independence in tables. Formula: (\sum (O-E)^2 / E). Degrees of freedom = (rows-1)(columns-1).
  3. Spearman’s Rank: Correlation for ranked data. Formula: (1 - 6 \sum d^2 / n(n^2-1)).
  4. p-value: If p < α, reject H₀. If p ≥ α, fail to reject.
  5. Always state hypotheses, check assumptions, and write a conclusion in context.

Now go ace that exam!




ADVERTISEMENT