π FIT2086: Modelling for Data Analysis
Map of Content
Index for FIT2086 Modelling for Data Analysis β the statistics spine of the DS degree. Much of Week 0β1 is revision shared dual-unit with FIT1058_MOC (probability) and FIT1043_MOC (descriptive statistics, R) rather than duplicated.
π Assessment Map
- Assignment 1 (10%, due W5) Β· Assignment 2 (20%, due W8) Β· Assignment 3 (20%, due W11) β carry the whole in-semester half; all involve implementing models in R (LO5).
- Final exam (50%)
- LO map β LO1 EDA/descriptive (W1β2) Β· LO2 inferential models (W3β5) Β· LO3 predictive models (W6β9, W11) Β· LO4 sampling/simulation/testing (W3, W5, W10) Β· LO5 implement in R (W6β11) Β· LO6 interpret results (W4β11).
- LO thread so far β frame data via probability models; manipulate random variables (pmf/pdf/cdf, joint/marginal/conditional/iid); summarise them by expectations; name the parametric families β then fit them by maximum likelihood (W3), judge the fit by bias/variance/MSE, and bound the estimate by a confidence interval (W4). A1 (due W5) sits directly on W3β4 estimation. W6 turns the estimation machinery on a mean that varies with predictors (linear regression) and adds the second-order question β which predictors β answered by a penalised likelihood. A2 (due W8) sits on W6β7 supervised learning.
π§° Toolkit Cheatsheets
- R Toolkit (Cheatsheet) β dual-unit (FIT1043 + FIT2086); FIT2086 adds the simulation / distribution (
d/p/q/r) block plus theqnorm/qtcritical-value rows
π Knowledge Index
Week 0 β Self-Study / Revision
- Measures of Centrality β Parent Framework: Statistical Modelling and Inference (dual-unit β statistic framing)
- Measures of Spread and Boxplots β Parent Framework: Statistical Modelling and Inference (dual-unit β variance , percentile )
- Association Between Variables β Parent Framework: Statistical Modelling and Inference (dual-unit β Pearson , correlation β causation)
- Mathematics for Modelling (Log, Exp, Calculus) β Parent Framework: Statistical Modelling and Inference (log/exp/derivative/partial β the MLE toolkit)
- R Basics (Syntax, Types, Control Flow), R Vectors, R Data Frames and IO, R Visualisation (base graphics) + the cheatsheet.
Week 1 β Modelling, Probability & Random Variables
- Statistical Modelling and Inference β Parent Framework: FIT2086_MOC (hub: population/sample/model/inference)
- Random Variables and Probability Distributions (FIT2086) β Parent Framework: Statistical Modelling and Inference (exam-heavy: pmf/pdf/cdf/quantile/mode; jointβmarginalβconditional; iid)
- R Simulation and Random Sampling β Parent Framework: R for Data Science (
set.seed,sample,d/p/q/r) - (Cross-links to the FIT1058 probability cluster: Random Variable, Conditional Probability, Bayesβ Theorem, Expectation, Variance and Standard Deviation, Binomial Distribution, Poisson Distribution, Uniform Distribution β the maths lives there, deepened here for modelling.)
Week 2 β Expectations & Probability Distributions
- Expectations and Covariance (FIT2086) β Parent Framework: Random Variables and Probability Distributions (FIT2086) (exam-heavy: , linearity, , cov/corr, WLLN, non-existence)
- Taylor Approximation of Expectations β Parent Framework: Expectations and Covariance (FIT2086) (derivation drill β 2nd order for , 1st order for )
- Parametric Probability Distributions β Parent Framework: Statistical Modelling and Inference (hub: , + the distribution zoo tables)
- Gaussian Distribution β Parent Framework: Parametric Probability Distributions (self-similarity, -rules, additivity)
- Binomial Distribution β /, additivity in ; Poisson Distribution β rate , additivity + thinning , the four appropriateness conditions; Uniform Distribution β the continuous with .
Studio 1 (run in W2 β R foundations, heart.csv / Mushroom.csv / wine.csv)
- Categorical Summaries and Cross-Tabulation in R β Parent Framework: R for Data Science (
factor/table/prop.table/pieβ the catβcat toolkit) - R Basics (Syntax, Types, Control Flow) β user-defined functions,
listreturns,stop,cat,ls/rm/source; R Data Frames and IO β logical referencing, add/drop columns,stringsAsFactors; Association Between Variables β thecorscreening loop overwine.csv.
Week 3 β Parameter Estimation, Maximum Likelihood & Estimator Quality
- Maximum Likelihood Estimation β Parent Framework: Statistical Modelling and Inference (exam-heavy derivation drill β likelihood β NLL β ; Gaussian, Poisson, Exponential, power families; plug-in distribution)
- Sampling Distribution of an Estimator β Parent Framework: Statistical Modelling and Inference ( is an RV; ; strength-of-assumptions ladder)
- Estimator Quality (Bias, Variance, MSE) β Parent Framework: Sampling Distribution of an Estimator (exam-heavy: , , , efficiency, vs , consistency)
- (Reading: Ross Ch. 6 Β§6.1, 6.2, 6.4, 6.5 and Ch. 7 Β§7.1, 7.2, 7.7)
Studio 2 (run in W3 β drills the W2 distributions; no new notes, merged into the existing four)
- Gaussian Distribution β -table lookup with linear interpolation ( worked three ways); is why the -rules are scale-free
- Binomial Distribution β term-by-term pmf interpretation; a named sequence has no ; fair-coin tails by hand
- Poisson Distribution β additivity run backwards (/week β /day); βat least oneβ
- Uniform Distribution β cdf derivation, by integration, out-of-support probabilities are zero
- Parametric Probability Distributions β the family selection drill (15 described variables β verdict + reason)
- R Simulation and Random Sampling β running-mean accumulator + the WLLN convergence plot; why converges faster than
Week 4 β Central Limit Theorem & Confidence Intervals
- Central Limit Theorem β Parent Framework: Sampling Distribution of an Estimator (exam-heavy: β ; normal approximation to /; asymptotic normality of averages)
- Confidence Intervals β Parent Framework: Statistical Modelling and Inference (exam-heavy: coverage vs the wrong β probabilityβ reading; the four cases / / difference / CLT-approximate)
- Student-t Distribution β Parent Framework: Parametric Probability Distributions (, heavier tails, always)
- (Reading: Ross Ch. 6 Β§6.3 and Ch. 7 Β§7.3, 7.4, 7.5)
Studio 3 (run in W4 β drills the W3 estimation material; train.csv / test.csv)
- Plug-in Prediction and Held-Out Evaluation β Parent Framework: Maximum Likelihood Estimation (fit on train β
pnormpredictions β empirical proportions β out-of-sample NLL; vs head-to-head) - Monte Carlo Estimator Comparison β Parent Framework: Estimator Quality (Bias, Variance, MSE) (simulation loop for //MSE; RelMSE; mean vs median under contamination)
- Maximum Likelihood Estimation β the Bernoulli derivation ; MLβs boundary overconfidence at
- Estimator Quality (Bias, Variance, MSE) β efficiency vs robustness: RelMSE is scale-free, moves with and the contamination fraction
Week 5 β Hypothesis Testing
- Hypothesis Testing β Parent Framework: Statistical Modelling and Inference (exam-heavy hub: NeymanβPearson, -value semantics + evidence grading, one vs two sided, , why the null can never be proved)
- Tests for Normal Means (z-test and t-test) β Parent Framework: Hypothesis Testing (exam-heavy hand skill: the 5-case selection matrix + 8 worked examples; pooled/Welch flagged optional)
- Tests for Bernoulli Populations β Parent Framework: Hypothesis Testing (CLT-based proportion -test; null-supplied , pooled , exact
binom.test/prop.test) - Confidence Intervals β merged: proportion intervals, small- pooled/Welch difference intervals, and the intervalβtest pairing from the W5 summary tables
- (Reading: Lecture 5 Notes)
Studio 4 (run in W5 β drills the W4 CLT/CI material; train.csv / test.csv / SP500.csv)
- Confidence Intervals in R (calcCI) β Parent Framework: Confidence Intervals (A1 hand-and-R skill:
calcCIanatomy β heights train/test check β SP500 pre/post-Lehman difference β the reporting statement) - Confidence Interval Coverage Simulation β Parent Framework: Confidence Intervals (generate β build interval β tally containment; exact / vs the undercovering plug-in; Poisson coverage grid)
- Confidence Intervals β at , the degenerate interval , the plug-in proportion interval + the coin toss
- Student-t Distribution β critical-value table extended to β visibly by
- Estimator Quality (Bias, Variance, MSE) β the Bernoulli drill: , , consistency, and the CLT limit
Week 6 β Linear Regression & Model Selection
- Linear Regression (FIT2086) β Parent Framework: Statistical Modelling and Inference (exam-heavy hub: supervised setup, simpleβmultiple, least squares, //, prediction)
- Least Squares as Maximum Likelihood β Parent Framework: Linear Regression (FIT2086) (derivation drill: β ; vs )
- Predictor Transformations (Indicators, Polynomials, Interactions) β Parent Framework: Linear Regression (FIT2086) ( indicators, /polynomial, β linear in , not in )
- Model Selection and Information Criteria (AIC, BIC) β Parent Framework: Linear Regression (FIT2086) (exam-heavy: + ; ; AIC vs BIC ; all-subsets vs stepwise)
- Multiple Regression and Stepwise Selection in R β Parent Framework: R for Data Science (LO5 hand skill:
lmβsummaryβstep(β¦, k = log(n))) - Bias-Variance Tradeoff (Underfitting vs Overfitting) β merged: under/overfitting restated as omitting important vs including spurious predictors; generalisation; polynomial degree predictor-set choice
- (Reading: Ross Ch. 9)
Studio 5 (run in W6 β drills the W5 hypothesis-testing material; bpdata.csv / SP500.csv)
- Hypothesis Testing in R (t.test, binom.test, prop.test) β Parent Framework: Hypothesis Testing (exam + A2 hand skill:
mu/alternative/conf.level/var.equal;rv$p.value;binom.testvsprop.test) - Tests for Normal Means (z-test and t-test) β merged: the
bpdatatwo-sided () vs one-sided () pair, and the three routes to one difference on S&P (approximate / Welch / pooled ) - Tests for Bernoulli Populations β merged: the βguess the coinβ drill (, vs exact ), the two-sample pooled ( vs exact ), and the
binom.testsensitivity sweep - Hypothesis Testing β merged: ; the leukemia-trial true/false drill at ; the rejection threshold scales with the consequences of a wrong call
- Confidence Intervals β merged: a one-sided alternative returns a bound , not a range; the width sweep on
bpdata
π Coming later in the unit (from the unit outline β no notes yet)
- W7 next: supervised learning for categorical targets (classification).
- Multivariate Gaussian, Dirichlet Β· random sampling, simulation & the bootstrap Β· exploratory vs confirmatory analysis Β· logistic regression Β· Bayesian classification & inverse probability Β· cross-validation & model-performance estimation.
π§ Suggested Reading Order
(read leftβright Β· bold = assessment-critical)
- W0 β revision: Measures of Centrality β Measures of Spread and Boxplots β Association Between Variables β Mathematics for Modelling (Log, Exp, Calculus) (needed for every MLE derivation)
- W1 β modelling & probability: Statistical Modelling and Inference (the hub) β Random Variables and Probability Distributions (FIT2086) (sum/product rules, iid, pdf/CDF/quantile) β R Simulation and Random Sampling (simulate it in R)
- W2 β expectations & distributions: Expectations and Covariance (FIT2086) (every summary is an ) β Taylor Approximation of Expectations (derivation drill) β Parametric Probability Distributions (the zoo tables) β Gaussian Distribution β Binomial Distribution β Poisson Distribution β Uniform Distribution
- W3 β estimation: Maximum Likelihood Estimation (the derivation drill) β Sampling Distribution of an Estimator ( as an RV) β Estimator Quality (Bias, Variance, MSE) (compare estimators)
- W4 β CLT & intervals: Central Limit Theorem (shape for free) β Student-t Distribution (unknown ) β Confidence Intervals (A1 hand skill) β Plug-in Prediction and Held-Out Evaluation (Studio 3, in R) β Monte Carlo Estimator Comparison (Studio 3, in R)
- W5 β testing: Hypothesis Testing (the logic + -value) β Tests for Normal Means (z-test and t-test) (exam hand skill) β Tests for Bernoulli Populations (proportions) β Confidence Intervals in R (calcCI) (Studio 4, A1 skill) β Confidence Interval Coverage Simulation (Studio 4, in R)
- W6 β regression & selection: Linear Regression (FIT2086) (the hub) β Least Squares as Maximum Likelihood (derivation drill) β Predictor Transformations (Indicators, Polynomials, Interactions) (build the columns) β Bias-Variance Tradeoff (Underfitting vs Overfitting) (why prune) β Model Selection and Information Criteria (AIC, BIC) (exam hand skill) β Multiple Regression and Stepwise Selection in R (LO5, in R) β Hypothesis Testing in R (t.test, binom.test, prop.test) (Studio 5, in R)
π― Learning Outcomes (key skills per week)
- W0 β
- classify data (nominal/ordinal/discrete/continuous)
- compute + interpret centrality (, median, mode) and spread (range, , , percentiles/IQR, boxplots)
- read Pearson correlation and know independence
- apply the log/exp identities and differentiate (power/log/exp, product, chain, partial) toward log-likelihoods
- W1 β
- separate population/sample/model Β· sampling/inference/model-checking Β· three sources of randomness
- state a pmf (, ); apply inclusionβexclusion
- joint marginal (sum rule) conditional (product rule); test independence; write the iid product
- continuous: is not a probability, , split piecewise integrals
- derive cdf pdf, survival , quantile , mode
- in R:
set.seed,sample, thed/p/q/rfamily
- W2 β
- compute , , from a pmf
- apply linearity and ; know products need independence
- read population / and why independence
- state the WLLN; test whether exists at all
- derive and
- select a family by support: Β· Β· Β· Β· , with each mean/variance
- (Studio 1) subset a data frame by condition; write an R function returning a
list;factor+table+prop.table; screen predictors withcor
- W3 β
- separate the three inference tasks: point / interval / hypothesis testing
- derive an MLE cold: β β β
- quote , , ,
- use the plug-in distribution for probability statements
- derive and say what naming the family buys
- compute , , ; rank by efficiency; test consistency
- (Studio 2) read a -table by interpolation; justify a family choice from a data description; code an running mean and read a convergence plot
- W4 β
- state the CLT for sums and derive from it
- approximate by and by
- recognise an estimator as an average βΉ asymptotically normal
- derive the interval by inverting
- select among the four CI cases: known Β· unknown Β· difference of means Β· CLT-approximate
- state coverage correctly (procedure, not the one interval) and read a difference CI containing zero
- (Studio 3) derive the Bernoulli MLE and explain MLβs boundary overconfidence
- (Studio 3) fit on train, predict with
pnorm, check against empirical proportions, rank models by held-out NLL - (Studio 3) code a simulation study returning bias/variance/MSE, and read RelMSE for efficiency vs robustness
- W5 β
- set up vs and identify one-sided vs two-sided from the wording
- define a -value as and grade it ( / )
- select the test: known Β· unknown small- Β· large- approximate Β· two-sample difference
- compute / by hand and bracket with tabulated criticals
- test a proportion via the CLT, pooling for two Bernoulli samples
- explain why a large never proves , and why -thresholding is deprecated
- (Studio 4) state how CI width scales with and ( data to halve the width); read at any
- (Studio 4) write
calcCIcold and report an interval as a sentence about the population - (Studio 4) build a difference-of-means CI for two groups and read it against zero
- (Studio 4) derive , , MSE, consistency and the CLT limit for the Bernoulli
- (Studio 4) simulate coverage and explain why plug-in intervals undercover at small
- W6 β
- separate classification (categorical target) from regression (numerical target)
- write ; read each as a per-unit change
- fit by least squares; state , , and the requirement
- compute and say why it can never select a model
- derive βΉ LS ML; quote vs
- build indicators, polynomial terms, and interaction columns
- rank predictors by , test , score models by
- contrast AIC (, overfits) with BIC (, underfits); is significant
- search all-subsets vs forward/backward stepwise; run
step(β¦, k = log(n))in R - (Studio 5) run
t.testwith the rightmu,alternative,conf.levelandvar.equal - (Studio 5) explain why weakens the evidence, and read a of correctly
- (Studio 5) judge a large effect with a borderline β demand a larger trial, not a verdict
- (Studio 5) compare approximate , Welch and pooled on one difference, and say which interval is overconfident
- (Studio 5) test one and two proportions by hand, then check against
binom.test/prop.test