Compare
Compare and choose
A decision guide first, then every comparison table from the chapters in one place.
Which method do I use?
Ask three things: type of response, number of groups, independent or paired.
Categorical response, one group
Compare with a stated proportion → one-proportion z-test / interval (ch. 2, 4). Compare with a full model over several categories → chi-square goodness-of-fit (ch. 7).
Compare with a stated proportion → one-proportion z-test / interval (ch. 2, 4). Compare with a full model over several categories → chi-square goodness-of-fit (ch. 7).
Categorical response, two groups
Two proportions → two-proportion z-test / interval (ch. 6). Several groups or a table with more than two rows or columns → chi-square homogeneity / independence (ch. 7).
Two proportions → two-proportion z-test / interval (ch. 6). Several groups or a table with more than two rows or columns → chi-square homogeneity / independence (ch. 7).
Quantitative response, one group
Mean against a claimed value, or an interval → one-sample t (ch. 3, 5). Skewed or ordinal and small → rank-based alternative (ch. 11).
Mean against a claimed value, or an interval → one-sample t (ch. 3, 5). Skewed or ordinal and small → rank-based alternative (ch. 11).
Quantitative response, two paired groups
Same units measured twice → paired t on the differences (ch. 5). Non-Normal differences → Wilcoxon signed-rank (ch. 11).
Same units measured twice → paired t on the differences (ch. 5). Non-Normal differences → Wilcoxon signed-rank (ch. 11).
Quantitative response, two independent groups
Welch t by default, pooled t only if equal variances are credible (ch. 6). Non-Normal or ordinal → Mann–Whitney (ch. 11).
Welch t by default, pooled t only if equal variances are credible (ch. 6). Non-Normal or ordinal → Mann–Whitney (ch. 11).
Quantitative response, three or more groups
Rank-based Kruskal–Wallis (ch. 11). One-way ANOVA is the parametric counterpart but is outside the course.
Rank-based Kruskal–Wallis (ch. 11). One-way ANOVA is the parametric counterpart but is outside the course.
Two quantitative variables
Describe with r and the line (ch. 8); test the slope with t on n − 2 df and use intervals (ch. 9); check residuals (ch. 10); monotone but not linear or ordinal → Spearman / Kendall (ch. 11).
Describe with r and the line (ch. 8); test the slope with t on n − 2 df and use intervals (ch. 9); check residuals (ch. 10); monotone but not linear or ordinal → Spearman / Kendall (ch. 11).
Tables from the chapters
Assessment at a glance Ch 01 →
| Part | Weight | Format |
|---|---|---|
| Intermediate test | 10% | On a computer in R during the semester; no resit, the mark carries over to the second session |
| Exam | 90% | Multiple choice, half theory and half exercises; pass requires at least 10/20 on the exam |
| Tools | — | Formula sheet and statistical tables are provided; a TI-84 and the ability to read and run R code are expected |
Common z* critical values Ch 01 →
| Confidence | Two-sided z* | Matching α (two-sided) | One-sided z* for that α |
|---|---|---|---|
| 90% | 1.645 | 0.10 | 1.282 |
| 95% | 1.960 | 0.05 | 1.645 |
| 98% | 2.326 | 0.02 | 2.054 |
| 99% | 2.576 | 0.01 | 2.326 |
Conditions for the Normal model of p̂ Ch 02 →
| Assumption | Condition | What to check |
|---|---|---|
| Independence | Randomisation | Random sample, or random assignment in an experiment |
| Independence | 10% condition | Sampling without replacement: n ≤ 10% of the population |
| Large enough sample | Success/failure | np ≥ 10 and nq ≥ 10 (use p when known, p̂ when building an interval) |
Wrong vs right reading of a 95% CI Ch 02 →
| Claim | Verdict |
|---|---|
| "We are 95% confident the interval captures the true p." | Right |
| "There is a 95% probability that p lies in this interval." | Wrong — p is fixed, not random |
| "95% of individuals fall in this interval." | Wrong — the interval is about p, not about individuals |
| "95% of other samples' p̂ will land here." | Wrong — it describes p, not future p̂ values |
Proportions vs means at a glance Ch 03 →
| Proportion | Mean | |
|---|---|---|
| Data | Categorical (success/failure) | Quantitative |
| Parameter → statistic | p → p̂ | μ → ȳ |
| SD of the statistic (known) | √(pq/n) | σ/√n |
| Standard error (estimated) | √(p̂q̂/n) | s/√n |
| Reference model | Normal (z) | Student's t, df = n − 1 |
How Normal must the data look? (by n) Ch 03 →
| Sample size | What you need |
|---|---|
| n < 15 | Very nearly Normal: no outliers, no visible skew |
| 15 – 40 | Unimodal and reasonably symmetric |
| 40 – 100 | Fine unless extremely skewed; mention outliers |
| 100 + | Generally safe; still watch outliers |
Choosing the alternative Ch 04 →
| Alternative | Form | Use when |
|---|---|---|
| Two-sided | p ≠ p₀ | A difference in either direction matters (the default) |
| Upper one-sided | p > p₀ | Only an increase matters, decided in advance |
| Lower one-sided | p < p₀ | Only a decrease matters, decided in advance |
Interval vs test: which proportion goes in the formula? Ch 04 →
| Procedure | Uses | Because |
|---|---|---|
| Confidence interval | p̂, q̂ → SE | p is unknown, so estimate it |
| Hypothesis test | p₀, q₀ → SD | H₀ is assumed true, so p = p₀ is "known" |
Computing the p-value from z Ch 04 →
| Alternative | p-value | TI-84 |
|---|---|---|
| H_A: p ≠ p₀ | 2 × P(Z > |z|) | 2·normalcdf(−1E99, −|z|) |
| H_A: p > p₀ | P(Z > z) | normalcdf(z, 1E99) |
| H_A: p < p₀ | P(Z < z) | normalcdf(−1E99, z) |
p-value from a t statistic Ch 05 →
| Alternative | p-value | TI-84 |
|---|---|---|
| μ ≠ μ₀ | 2 × P(Tₙ₋₁ > |t|) | 2·tcdf(|t|, 1E99, df) |
| μ > μ₀ | P(Tₙ₋₁ > t) | tcdf(t, 1E99, df) |
| μ < μ₀ | P(Tₙ₋₁ < t) | tcdf(−1E99, t, df) |
Outcomes of a hypothesis test Ch 05 →
| H₀ true | H₀ false | |
|---|---|---|
| Reject H₀ | Type I error (probability α) | Correct: power = 1 − β |
| Fail to reject H₀ | Correct | Type II error (probability β) |
What raises power? Ch 05 →
| Change | Effect on power |
|---|---|
| Larger sample size | Up (narrower sampling distribution) |
| Larger true effect | Up (the two distributions separate) |
| Larger α | Up, at the price of more Type I errors |
| Smaller σ | Up |
| One-sided instead of two-sided | Up, in the pre-chosen direction |
Conditions for two-sample t procedures Ch 06 →
| Condition | How to check |
|---|---|
| Independence within groups | Random sampling or random assignment in each group |
| Independence between groups | Study design: the groups must be unrelated (not paired). No test can verify this |
| 10% condition | Each sample ≤ 10% of its population (not needed for randomised experiments) |
| Nearly Normal in each group | A histogram per group; large groups (≈30+) make the test robust. One failing group violates the condition |
Welch vs pooled vs paired Ch 06 →
| Welch | Pooled | Paired | |
|---|---|---|---|
| SE | √(s₁²/n₁ + s₂²/n₂) | s_p√(1/n₁ + 1/n₂) | s_d/√n |
| df | technology (Satterthwaite) | n₁ + n₂ − 2 | n − 1 |
| Extra assumption | none | σ₁² = σ₂² | data genuinely paired |
| TI-84 | 4:2-SampTTest, Pooled: No | 4:2-SampTTest, Pooled: Yes | T-Test on L1 − L2 |
| R | t.test(y ~ g) | var.equal = TRUE | paired = TRUE |
Where chi-square sits in the course Ch 07 →
| Chapter | Variables | Groups |
|---|---|---|
| 10 / 12 | 1 binary categorical | 1 |
| 14 | 1 quantitative | 2 |
| 15 | 1–2 categorical, any number of categories | 1 or several |
The three chi-square tests Ch 07 →
| Test | Question | Data | H₀ | df |
|---|---|---|---|---|
| Goodness-of-fit | Does one variable follow a stated distribution? | 1 variable, 1 sample, k cells | Counts follow the model proportions | k − 1 |
| Homogeneity | Is the distribution of a variable the same across groups? | 1 variable, r separate groups | Same distribution in every group | (r − 1)(c − 1) |
| Independence | Are two variables associated? | 2 variables, 1 sample | Variables are independent | (r − 1)(c − 1) |
Properties of r Ch 08 →
| Property | Detail |
|---|---|
| Range | −1 ≤ r ≤ +1; the sign gives the direction |
| Units | None; rescaling x or y (kg to lb) does not change r |
| Symmetry | r(x, y) = r(y, x) |
| Outliers | A single extreme point can push r up or down sharply |
| Shape | Measures only linear association; r = 0 does not mean "no relationship" |
LINE: assumptions for regression inference Ch 09 →
| Assumption | How to check | |
|---|---|---|
| L | Linearity: the true relation is straight | Scatterplot; residual plot without curvature |
| I | Independent errors | Data collection; residuals against time or order |
| N | Nearly Normal errors | Histogram or Normal probability plot of the residuals |
| E | Equal spread at all x | Residuals against fitted values: a band, not a fan |
Interval for the mean vs prediction interval Ch 09 →
| CI for the mean response μ_v | Prediction interval for one new y_v | |
|---|---|---|
| Question | Where does the mean response of every unit at x = x_v sit? | Where will a single new unit with x = x_v fall? |
| SE² | SE²(b₁)(x_v − x̄)² + s_e²/n | SE²(b₁)(x_v − x̄)² + s_e²/n + s_e² |
| Width | Narrower | Always wider (adds individual scatter) |
| Normality | Helped by the CLT for large n | Needs Normal errors; the CLT does not rescue it |
Outliers, leverage and influence Ch 10 →
| Term | Meaning (as defined in this course) | Typical diagnostic |
|---|---|---|
| Outlier | Large residual: far from the line vertically | Residual plot |
| High-leverage point | Extreme x: far from x̄ horizontally | Scatterplot |
| Influential point | Removing it changes the line, mainly the slope b₁, noticeably | Refit with and without it |
Durbin–Watson decision rules Ch 10 →
| D close to | Meaning |
|---|---|
| 2 | No autocorrelation |
| Below 2 | Positive autocorrelation (neighbours move together) |
| Above 2 | Negative autocorrelation (neighbours alternate) |
Common transformations Ch 10 →
| Model on the transformed scale | Typical situation |
|---|---|
| log(y) against x | y grows by a roughly constant percentage per unit of x; fan-shaped residuals |
| y against log(x) | y keeps growing but with diminishing returns |
| log(y) against log(x) | power-law relation; both variables right-skewed |
| −1/y against x | an upward bend in negatively correlated data |
When to switch to a non-parametric test Ch 11 →
| Situation | Reason |
|---|---|
| Ordinal data (Likert scales, rankings) | Numeric gaps are not meaningful, so a mean is not either |
| Small sample, clearly non-Normal | The CLT has not kicked in yet |
| Severe outliers | Ranks cap the influence of extreme values |
| Skewed or multi-modal data | t-test assumptions fail |
| Monotone but curved relations | Ranking straightens them (rank correlations) |
Parametric test and its non-parametric alternative Ch 11 →
| Situation | Parametric | Non-parametric |
|---|---|---|
| Two independent groups | Two-sample t | Wilcoxon rank-sum / Mann–Whitney |
| Paired data | Paired t | Wilcoxon signed-rank |
| Three or more independent groups | One-way ANOVA | Kruskal–Wallis |
| Association between two variables | Pearson r / slope test | Spearman ρ, Kendall τ |
Conditions for the non-parametric tests Ch 11 →
| Test | Needs |
|---|---|
| Mann–Whitney | Independence within and between groups; random sampling; same shape for a pure location reading |
| Kruskal–Wallis | Independence within and between all groups; random sampling |
| Signed-rank | Paired data; independent differences |
| Spearman / Kendall | Independent observations; at least ordinal data |