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)
| Section | Examined act | Crib | Drill in |
|---|---|---|---|
| Short answer | 2–3 sentence definition | recipe below | folded answers below |
| MLE | likelihood ➔ NLL ➔ (sample: ) | §2️⃣ | Maximum Likelihood Estimation Practice 1 |
| Random variables | / of sums and products of independent RVs | §1️⃣ | Expectations and Covariance (FIT2086) |
| CI and -values | known- interval -test by table summary sentence | §3️⃣ | Tests for Normal Means (z-test and t-test) |
| Regression | LS objective, indicators, read , predict, | §4️⃣ | Linear Regression (FIT2086) |
| Classification | conditional from a joint table, odds, predictor verdict | §5️⃣ | Classification and Conditional Class Probabilities |
| Logistic regression | read on log-odds, class at , non-linearity fix | §5️⃣ | Logistic Regression |
| Bias & variance | prove unbiased, , consistent | §2️⃣ | Estimator Quality (Bias, Variance, MSE) |
| Machine learning | read 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 sheet | Recall cold |
|---|---|
| · marginal and conditional formulas | every pmf/pdf, family mean and variance |
| , , chain rule | MLE results, |
| known- CI and -test (one mean, a difference) | regression and logistic formulas, |
| table | IC 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.
Model short answers (Studio 12)
- Bias / variance of an estimator ➔ bias is , the average amount the estimator under- or over-estimates; zero ⟹ unbiased. Variance is the average squared deviation of from its own mean — how much the estimate would move on a fresh sample.
- -value ➔ measures evidence against in a hypothesis test: the probability of a test statistic as or more extreme than the one observed, by chance alone, if were true.
- Accuracy / sensitivity / specificity ➔ percentage of individuals classified correctly · proportion of actual s classified as · proportion of actual s classified as .
- Decision tree ➔ a supervised learner that splits the data into disjoint leaves by binary questions on the attributes; each leaf holds its own simple model used to predict.
- Penalized regression ➔ estimates linear/logistic coefficients by minimising goodness-of-fit (e.g. RSS) plus a penalty on coefficient size; the penalty curbs overfitting.
- Random variable ➔ takes one value from a set with frequencies set by its distribution; many realisations give observed frequencies close to the theoretical ones.
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 ).
- 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) · ⟺ .
| Identity | Holds |
|---|---|
| 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.
- 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 ).
- ML variance is biased ➔ ⟹ divides by ➔ Estimator Quality (Bias, Variance, MSE).
🧮 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”.
| Situation | Interval | ⛔ Precondition |
|---|---|---|
| one mean, known 📄 | known | |
| one mean, unknown, | — wider, always ➔ Student-t Distribution | normal population |
| one mean, unknown, | the form with plugged in | any population, by the CLT |
| difference of means 📄 | approximate, improves with · contains ⟹ no clear difference | |
| proportion | ➔ Tests for Bernoulli Populations | CLT |
- Why , not plug-in ➔ coverage simulation: the known- interval covers at every ; plugging into is too narrow and undercovers at small ; the interval covers at every .
- Critical values ➔ · · ➔ Confidence Intervals, Tests for Normal Means (z-test and t-test).
⚙️ 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).
| Diagnosis | Training error | Held-out error | Cause |
|---|---|---|---|
| Underfit | high | high | important predictors omitted ⟹ bias |
| Overfit | low | high — the gap | spurious predictors learn noise ⟹ variance |
- Decomposition ➔ ( irreducible for a new ).
| Complexity control | Rule (NLL scale ) | Behaviour |
|---|---|---|
| Bonferroni | threshold | tests at expect false positives |
| AIC | overfits | |
| KIC | — | |
| BIC | underfits | |
| RIC | — | |
| Ridge | shrinks, never zeros | |
| Lasso | zeros 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️⃣).
| Metric | Formula | Reads |
|---|---|---|
| Classification accuracy | fraction correct | compare with the class-frequency baseline |
| Sensitivity | actual s caught | |
| Specificity | actual s caught | |
| AUC | fraction of positive–negative pairs ranked correctly (ties ) | perfect · random |
| Log-loss | punishes 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 itsyval③ max-leaf question: find the largestyval*, 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.
| Model | Shape it can learn | Complexity knob | Weakness |
|---|---|---|---|
| Linear / logistic | linear in ; hyperplane boundary | predictors (IC, stepwise) or | curvature only via transformed columns |
| Tree | non-linear relationships and interactions natively | leaves, by CV | low bias but high variance |
| Random Forest | as 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.