hanegreefs.com/ statistics II
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).
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).
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).
Quantitative response, two paired groups
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).
Quantitative response, three or more groups
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).

Tables from the chapters

Assessment at a glance Ch 01 →

PartWeightFormat
Intermediate test10%On a computer in R during the semester; no resit, the mark carries over to the second session
Exam90%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 →

ConfidenceTwo-sided z*Matching α (two-sided)One-sided z* for that α
90%1.6450.101.282
95%1.9600.051.645
98%2.3260.022.054
99%2.5760.012.326

Conditions for the Normal model of p̂ Ch 02 →

AssumptionConditionWhat to check
IndependenceRandomisationRandom sample, or random assignment in an experiment
Independence10% conditionSampling without replacement: n ≤ 10% of the population
Large enough sampleSuccess/failurenp ≥ 10 and nq ≥ 10 (use p when known, p̂ when building an interval)

Wrong vs right reading of a 95% CI Ch 02 →

ClaimVerdict
"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 →

ProportionMean
DataCategorical (success/failure)Quantitative
Parameter → statisticp → p̂μ → ȳ
SD of the statistic (known)√(pq/n)σ/√n
Standard error (estimated)√(p̂q̂/n)s/√n
Reference modelNormal (z)Student's t, df = n − 1

How Normal must the data look? (by n) Ch 03 →

Sample sizeWhat you need
n < 15Very nearly Normal: no outliers, no visible skew
15 – 40Unimodal and reasonably symmetric
40 – 100Fine unless extremely skewed; mention outliers
100 +Generally safe; still watch outliers

Choosing the alternative Ch 04 →

AlternativeFormUse when
Two-sidedp ≠ p₀A difference in either direction matters (the default)
Upper one-sidedp > p₀Only an increase matters, decided in advance
Lower one-sidedp < p₀Only a decrease matters, decided in advance

Interval vs test: which proportion goes in the formula? Ch 04 →

ProcedureUsesBecause
Confidence intervalp̂, q̂ → SEp is unknown, so estimate it
Hypothesis testp₀, q₀ → SDH₀ is assumed true, so p = p₀ is "known"

Computing the p-value from z Ch 04 →

Alternativep-valueTI-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 →

Alternativep-valueTI-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₀ trueH₀ false
Reject H₀Type I error (probability α)Correct: power = 1 − β
Fail to reject H₀CorrectType II error (probability β)

What raises power? Ch 05 →

ChangeEffect on power
Larger sample sizeUp (narrower sampling distribution)
Larger true effectUp (the two distributions separate)
Larger αUp, at the price of more Type I errors
Smaller σUp
One-sided instead of two-sidedUp, in the pre-chosen direction

Conditions for two-sample t procedures Ch 06 →

ConditionHow to check
Independence within groupsRandom sampling or random assignment in each group
Independence between groupsStudy design: the groups must be unrelated (not paired). No test can verify this
10% conditionEach sample ≤ 10% of its population (not needed for randomised experiments)
Nearly Normal in each groupA histogram per group; large groups (≈30+) make the test robust. One failing group violates the condition

Welch vs pooled vs paired Ch 06 →

WelchPooledPaired
SE√(s₁²/n₁ + s₂²/n₂)s_p√(1/n₁ + 1/n₂)s_d/√n
dftechnology (Satterthwaite)n₁ + n₂ − 2n − 1
Extra assumptionnoneσ₁² = σ₂²data genuinely paired
TI-844:2-SampTTest, Pooled: No4:2-SampTTest, Pooled: YesT-Test on L1 − L2
Rt.test(y ~ g)var.equal = TRUEpaired = TRUE

Where chi-square sits in the course Ch 07 →

ChapterVariablesGroups
10 / 121 binary categorical1
141 quantitative2
151–2 categorical, any number of categories1 or several

The three chi-square tests Ch 07 →

TestQuestionDataH₀df
Goodness-of-fitDoes one variable follow a stated distribution?1 variable, 1 sample, k cellsCounts follow the model proportionsk − 1
HomogeneityIs the distribution of a variable the same across groups?1 variable, r separate groupsSame distribution in every group(r − 1)(c − 1)
IndependenceAre two variables associated?2 variables, 1 sampleVariables are independent(r − 1)(c − 1)

Properties of r Ch 08 →

PropertyDetail
Range−1 ≤ r ≤ +1; the sign gives the direction
UnitsNone; rescaling x or y (kg to lb) does not change r
Symmetryr(x, y) = r(y, x)
OutliersA single extreme point can push r up or down sharply
ShapeMeasures only linear association; r = 0 does not mean "no relationship"

LINE: assumptions for regression inference Ch 09 →

AssumptionHow to check
LLinearity: the true relation is straightScatterplot; residual plot without curvature
IIndependent errorsData collection; residuals against time or order
NNearly Normal errorsHistogram or Normal probability plot of the residuals
EEqual spread at all xResiduals against fitted values: a band, not a fan

Interval for the mean vs prediction interval Ch 09 →

CI for the mean response μ_vPrediction interval for one new y_v
QuestionWhere 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²/nSE²(b₁)(x_v − x̄)² + s_e²/n + s_e²
WidthNarrowerAlways wider (adds individual scatter)
NormalityHelped by the CLT for large nNeeds Normal errors; the CLT does not rescue it

Outliers, leverage and influence Ch 10 →

TermMeaning (as defined in this course)Typical diagnostic
OutlierLarge residual: far from the line verticallyResidual plot
High-leverage pointExtreme x: far from x̄ horizontallyScatterplot
Influential pointRemoving it changes the line, mainly the slope b₁, noticeablyRefit with and without it

Durbin–Watson decision rules Ch 10 →

D close toMeaning
2No autocorrelation
Below 2Positive autocorrelation (neighbours move together)
Above 2Negative autocorrelation (neighbours alternate)

Common transformations Ch 10 →

Model on the transformed scaleTypical situation
log(y) against xy 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 xan upward bend in negatively correlated data

When to switch to a non-parametric test Ch 11 →

SituationReason
Ordinal data (Likert scales, rankings)Numeric gaps are not meaningful, so a mean is not either
Small sample, clearly non-NormalThe CLT has not kicked in yet
Severe outliersRanks cap the influence of extreme values
Skewed or multi-modal datat-test assumptions fail
Monotone but curved relationsRanking straightens them (rank correlations)

Parametric test and its non-parametric alternative Ch 11 →

SituationParametricNon-parametric
Two independent groupsTwo-sample tWilcoxon rank-sum / Mann–Whitney
Paired dataPaired tWilcoxon signed-rank
Three or more independent groupsOne-way ANOVAKruskal–Wallis
Association between two variablesPearson r / slope testSpearman ρ, Kendall τ

Conditions for the non-parametric tests Ch 11 →

TestNeeds
Mann–WhitneyIndependence within and between groups; random sampling; same shape for a pure location reading
Kruskal–WallisIndependence within and between all groups; random sampling
Signed-rankPaired data; independent differences
Spearman / KendallIndependent observations; at least ordinal data