FIT2086 Unit Cheatsheet

Context: FIT2086_MOC · the paper-exam half (50%) of W1–W11 in one re-read, in the order the W12 revision lecture runs · R syntax lives in R Toolkit (Cheatsheet) · links for depth only. Scope: hand-worked exam material only — R implementation (A1–A3) lives in the R Toolkit. Read order: ⛔ = precondition / trap where marks die · 📄 = printed on the formula sheet (recognise, don’t memorise) · 🧮 Blueprint = derivation to reproduce · ⚙️ Procedure = hand computation to run · Priority: §1–§6 are L1–L9 (revised in W12 and examined in the sample paper) · §7–§8 are lower signal.

Quick Revision

  • 🎯 Objective: name the model ➔ write the formula with its precondition ➔ compute ➔ close with a sentence about the population, in the question’s units.
  • ⚡ Key Constraint: marks sit in the stated assumption (iid, known , independence, sidedness) and the closing interpretation — a bare number earns part marks only.

0️⃣ Exam Anatomy (Studio 12 sample paper)

SectionExamined actCribDrill in
Short answer2–3 sentence definitionrecipe belowfolded answers below
MLElikelihood ➔ NLL ➔ (sample: )§2️⃣Maximum Likelihood Estimation Practice 1
Random variables/ of sums and products of independent RVs§1️⃣Expectations and Covariance (FIT2086)
CI and -valuesknown- interval -test by table summary sentence§3️⃣Tests for Normal Means (z-test and t-test)
RegressionLS objective, indicators, read , predict, §4️⃣Linear Regression (FIT2086)
Classificationconditional from a joint table, odds, predictor verdict§5️⃣Classification and Conditional Class Probabilities
Logistic regressionread on log-odds, class at , non-linearity fix§5️⃣Logistic Regression
Bias & varianceprove unbiased, , consistent§2️⃣Estimator Quality (Bias, Variance, MSE)
Machine learningread an R tree print-out · tree vs linear · kNN vote off a scatter · is the boundary linear?§6️⃣tree print-out Practice 1, k-Nearest Neighbours
📄 Supplied on the formula sheetRecall cold
· marginal and conditional formulasevery pmf/pdf, family mean and variance
, , chain ruleMLE results,
known- CI and -test (one mean, a difference)regression and logistic formulas,
tableIC penalties, every ML algorithm
  • Scope signal ➔ the W12 lecture and the sample paper both cover L1–L9 only · ⛔ neither excludes W10–11 — the paper is “roughly commensurate”, not a syllabus.
  • Table lookup ➔ rows step by ⟹ take the nearest (, ), double it for a two-sided .
  • Short-answer recipe ➔ sentence 1 says what it is; sentences 2–3 give one or two properties — shows you can identify it and know something about it.

1️⃣ Modelling, Description & Random Variables (W1–2)

  • The modelling pipeline ➔ population (what we want) → sampling → sample → inference (fit a model with unknown parameters , particular → general) → model checking (goodness-of-fit) · a model is never correct, only more or less useful.
  • Three sources of randomness ➔ measurement error · unmeasured factors · random sampling (which items entered the sample) · ⛔ “random” models sampling variability, not an unpredictable reality.
  • Descriptive vs inferential ➔ a statistic is any function and describes only the sample · inference generalises to the population and needs a model · a good statistic often becomes an estimator ( for ).
Centre / spreadFormulaRobust to outliers?
Mean❌
Median✅
Range❌
Variance / SD · (data’s units)❌
IQR✅
  • Skew from mean − median ➔ mean median ⟹ right tail · ⟹ left tail · ⟹ symmetric · boxplot five-number summary · outliers beyond or below .
  • Association by type pair ➔ cont × cont: scatter Pearson · cat × cat: side-by-side bars / contingency table · cat × num: side-by-side boxplots · ⛔ sees linear association only ( gives ), and correlation causation.
  • Sum rule 📄 ➔ · conditional 📄 · ⛔ divide by the marginal of the conditioning variable.
  • CDF / survival ➔ · · continuous: .
  • Median ➔ continuous: solve · discrete: smallest with and .
  • iid likelihood ➔ · ⛔ the product needs independence — say so in line one of any MLE.
  • Shared maths ➔ Random Variable · Conditional Probability · Bayes’ Theorem · Expectation · Variance and Standard Deviation (FIT1058 cluster).
  • Expectation ➔ (integral if continuous) · ⟺ .
IdentityHolds
always
· always
⛔ independent only
⛔ independent only
— variances add for a difference⛔ independent only
independent ⟹ one way only: independent
  • Taylor ➔ · ➔ Taylor Approximation of Expectations.

  • Parametric family ➔ generates every probability from parameters; , , cdf and quantiles are all functions of · ⛔ state the parameterisation ( vs ) before quoting a mean ➔ Random Variables and Probability Distributions (FIT2086).

  • Pick the family by the support ➔ Bernoulli · successes in trials binomial · unbounded counts in an interval Poisson · equally likely outcomes uniform · Gaussian · ⛔ the reason is always support / number of outcomes, never “looks bell-shaped”.

  • Variance–mean fingerprint ➔ Poisson · binomial , capped, maximal at · Gaussian leaves , free.

FamilySupportML estimate
Gaussian ·
Binomial —
Poisson
Uniform —
—
——
  • Additivity ⛔ independent ➔ · Gaussians add means and variances · standardise .
  • WLLN ➔ as · ⛔ only if exists.

2️⃣ Estimation (W3)

🧮 Blueprint — MLE

① — state iid ② using , , ③ ④ solve for . Calculus not on the sheet: · product rule · partial freezes every other parameter (one equation per parameter) · ⛔ · ⛔ — the inner derivative is the usual omission · log is monotone ⟹ same maximiser, easier sum.

  • Sampling distribution ➔ is a function of RVs, so it is an RV — its distribution is how varies over repeated samples · uses: CIs, tests, comparing estimators.
  • Assumption strength ➔ iid with mean , variance gives , but no shape · iid gives — the shape is what licenses probability statements · ⛔ is smaller than .
  • Plug-in ➔ probability statements use ➔ Plug-in Prediction and Held-Out Evaluation.
  • Quality ➔ bias · variance · · more efficient smaller MSE (smaller variance among unbiased).

🧮 Blueprint — is unbiased and consistent

① (linearity) ⟹ unbiased ② ⛔ independence ③ ⟹ consistent ( and ).

🧮 Blueprint — shrinkage estimator , (Studio 8)

① ⟹ ② ⛔ square the multiplier ③ ④ beats iff — only near the target ⑤ as ⟹ still consistent. It is ridge: — plays · ⛔ “biased ⟹ worse” is false: bias is a cost traded for variance.

3️⃣ CLT, Intervals & Tests (W4–5)

  • CLT ➔ ⟹ · ⛔ finite and large — any family ➔ Central Limit Theorem.
  • CI meaning ➔ over repeated samples · ⛔ the procedure covers — never “this interval has a chance”.
SituationInterval⛔ Precondition
one mean, known 📄 known
one mean, unknown, — wider, always ➔ Student-t Distributionnormal population
one mean, unknown, the form with plugged inany population, by the CLT
difference of means 📄approximate, improves with · contains ⟹ no clear difference
proportion ➔ Tests for Bernoulli PopulationsCLT

⚙️ Procedure — -test by table ➔ Hypothesis Testing

① state vs — sidedness from the wording ② 📄 ③ 📄: two-sided · ⟹ · ⟹ ④ grade ⑤ one sentence about the population, in the question’s units.

  • Grading ➔ weak/none · – moderate · strong · report “1 in by chance” · only if the question fixes : reject iff .
  • Never proves ⛔ ➔ large data not incompatible with · small large effect borderline ⟹ get more data.
  • CI ⟷ test ➔ inside the CI ⟺ two-sided , on the same standard error.

4️⃣ Regression & Complexity Control (W6, W8)

  • Model ➔ · change in per unit , holding the others constant · at all-zero predictors.
  • Least squares ➔ minimise , · ⛔ · Gaussian errors ⟹ LS ML ➔ Least Squares as Maximum Likelihood.
  • ➔ TSS RSS of the mean model · ⟺ · unit-free · reads “predictors explain of the variation in ” · ⛔ rises with every predictor ⟹ never use it to select.
  • Building columns ➔ categories ⟹ indicators, omitted level reference · polynomial · interaction · all still linear in ➔ Predictor Transformations (Indicators, Polynomials, Interactions).
DiagnosisTraining errorHeld-out errorCause
Underfithighhighimportant predictors omitted ⟹ bias
Overfitlowhigh — the gapspurious predictors learn noise ⟹ variance
  • Decomposition ➔ ( irreducible for a new ).
Complexity controlRule (NLL scale )Behaviour
Bonferronithreshold tests at expect false positives
AICoverfits
KIC—
BICunderfits
RIC—
Ridgeshrinks, never zeros
Lassozeros coefficients
  • Forward stepwise ➔ empty model ➔ add the predictor cutting the IC most ➔ stop when none improves · backward starts full · ⛔ unstable: a small data change gives a big model change.
  • Penalty settings ➔ ⟹ more shrinkage, less flexible · intercept unpenalised (the baseline) · ⛔ standardise predictors first.

⚙️ Procedure — choose (or any tuning value) by -fold CV

① grid of candidate values ② per value: fit on folds, predict the held-out fold, accumulate the error ③ repeat times and average ④ pick the smallest error ⑤ refit on all the data.

5️⃣ Classification & Logistic Regression (W7)

  • Direct approach ➔ off a joint table · ⛔ joint cells ⟹ curse of dimensionality.
  • Odds from a joint table ➔ — the marginal cancels.

⚙️ Procedure — logistic prediction

① (the log-odds) ② odds ③ ④ predict iff iff .

  • Reading ➔ change in log-odds per unit ⟺ odds multiplied by .
  • Fit ➔ ML, NLL · convex, no closed form.
  • Boundary is linear ⛔ ➔ a line/hyperplane ⟹ curved class structure needs transformed predictors or a tree/forest (§6️⃣).
MetricFormulaReads
Classification accuracyfraction correctcompare with the class-frequency baseline
Sensitivityactual s caught
Specificityactual s caught
AUCfraction of positive–negative pairs ranked correctly (ties ) perfect · random
Log-losspunishes confident errors

6️⃣ Trees & Nearest Neighbours (W9)

  • Machine Learning, the statistician’s view ➔ algorithmic, flexible, usually non-linear, few assumptions · the fitted “model” is often uninterpretable ⟹ the focus is prediction.
  • Tree ➔ binary splits ⟹ disjoint leaves, each with its own model (Bernoulli or Normal mean) · complexity .
  • Learning ➔ leaf NLL · grow greedily ➔ prune back ➔ CV over ➔ Decision Tree Learning (Likelihood Splits, Pruning, CV).

⚙️ Procedure — read an R tree print-out

① columns node), split, n, deviance, yval; * marks a leaf ② predict: follow the child conditions from the root to a leaf, read its yval ③ max-leaf question: find the largest yval*, then read its path back to the root.

  • kNN ➔ standardise ➔ Euclidean distance ➔ nearest ➔ vote / average / kernel-weighted average · , distance and kernel chosen by LOO CV.
ModelShape it can learnComplexity knobWeakness
Linear / logisticlinear in ; hyperplane boundarypredictors (IC, stepwise) or curvature only via transformed columns
Treenon-linear relationships and interactions natively leaves, by CVlow bias but high variance
Random Forestas a tree, averaged over bootstrap samples with random candidate variables per split—stable, but loses interpretability
kNN— (check the scatter: is the boundary linear?), distance, kernel by LOO CV⛔ needs standardised predictors

7️⃣ Simulation & Resampling (W10)

  • Monte Carlo ➔ · resolution ➔ Monte Carlo Simulation (Empirical Probabilities) · LCG ➔ Pseudo-Random Number Generators.
  • Comparing estimators by simulation ➔ loop: generate from a chosen → estimate → store · bias , variance of the stored values, , ( ⟹ first wins).
  • Mean vs median ➔ both unbiased on normal data; the mean is more efficient on clean data ( at ) · a few contaminated points flip it to the median · the flip is driven by the contamination fraction .
  • Bootstrap ➔ resample rows with replacement, refit, times · percentiles ⟹ CI · the exact version enumerates ➔ Bootstrap.
  • Permutation test ➔ shuffle against fixed ⟹ null of no association · ➔ Permutation Tests.

8️⃣ Unsupervised Learning (W11)

  • Supervised vs unsupervised ➔ “is the data labelled?” · supervised models — classification, regression · unsupervised finds structure, often via the joint — clustering, association, imputation · clustering “intrinsic classification”: discover and characterise each cluster.
  • Multivariate normal ➔ moves the cloud · stretches along axis · off-diagonal tilts it (positive ⟹ up-right) · ⛔ is a variance, not an SD · structures: spherical ( parameter) · diagonal () · full/elliptical ().
  • k-means ➔ assign to the nearest centroid ➔ re-centre ➔ stop when nothing moves · minimises · local minima ⟹ k-means++ seeding.
  • Mixtures ➔ · · EM soft k-means · by IC.
  • Imputation ➔ univariate vs multivariate-normal vs kNN on co-observed columns ➔ Missing Data Imputation and Recommender Systems.