DATA2002 Cheatsheet · Data Analytics: Learning from Data

University of Sydney · Cheatsheet for the final exam. Semester 2 formal examination period, from 16 November 2026 (the Exams Office publishes the exact date). Full DATA2002 study guide →

A4 landscape · side 1Print at 100% · colour optional
DATA2002
Data Analytics: Learning from Data
The University of Sydney · Semester 2, 2026
DATA2002 cheatsheet QR code – open the full DATA2002 study guide
Full guide + ask Sia
about DATA2002
SIDE 1 · RECALLCLOSED-BOOK MEMORY SHEET · definitions → formulas → decisionslearn · recite · check

1 · Exam map course data · sample cover

Final 60P1R 10P2 10FE 9P1P 5Git 5

Weights: Final Exam 60% · Group Project Report (Project 1) 10% · Individual Project Report (Project 2) 10% · Individual Feedback Exercise 9% · Group Project Presentation (Project 1) 5% · Individual GitHub Contribution (Project 1) 5% · Individual Early Feedback Task 1%.

Permitted materials — exact rule“Exam Conditions: This is a closed-book examination — no material permitted.” DATA2002 Semester 2 2026 exam sample paper, cover instructions (PDF_2026S2_DATA2x02_Exam_Sample_DW_V3)

Final: 2 hours, 60%. Released sample: no calculator; 30 equally weighted MCQs = ¾, one extended answer = ¼; key procedures follow the questions. Learn recognition, expressions, assumptions and interpretation.

ROUTE BEFORE CALCULATINGresponse?groups?paired?count → χ² / exactmeasure → t/ranklabel → classifynone → PCA/cluster
Four questions from the guide: response, groups, pairing/design, goal.

2 · Six-slot answer Ch 3

WriteCheck
1 level αchosen before data
2 H₀ / H₁population parameters
3 assumptionsdesign + distribution
4 statisticvalue + null law + df
5 p-valuecorrect tail
6 conclusionvariables + population

Reject when p ≤ α. Otherwise “insufficient evidence against H₀”, never “H₀ is true”.

Exam move Write slots 1–3 before arithmetic; finish with variables and population.
CONFOUNDER: BOTH ARROWSseverityprotocolrecoverypooling can reverse strata
Source redraw: a third variable must connect to both sides; compare strata before pooling.

4 · χ² counts Ch 3 · Ch 5

Goodness of fiteᵢ = n pᵢ₀
χ² = Σ (yᵢ−eᵢ)²/eᵢ
df = k−1−q, q = parameters estimated from these data
r × c tableeᵢⱼ = (row totalᵢ)(column totalⱼ)/n
χ² = ΣᵢΣⱼ (yᵢⱼ−eᵢⱼ)²/eᵢⱼ
df = (r−1)(c−1)

Upper tail only: χ² is non-negative distance. Check expected, not observed, counts. Every expected count ≥ 5; otherwise pool adjacent meaningful categories and recount df, or use exact/simulation.

Sampling sentenceName / conclusion
fixed n per grouphomogeneity: distributions match?
one sample, two labelsindependence: variables associated?

For a small 2×2 table, Fisher’s exact test enumerates tables with fixed margins; no approximation means no expected-count condition. Larger sparse tables: simulated null with margins fixed.

5 · Two-by-two reflexes Ch 4

Truth +Truth −
Test +a = TPb = FP
Test −c = FNd = TN
Condition on the named marginPrev=(a+c)/n · Accuracy=(a+d)/n
Sens=a/(a+c) · Spec=d/(b+d)
FNR=c/(a+c)=1−Sens · FPR=b/(b+d)=1−Spec
PPV=a/(a+b) · NPV=d/(c+d)

Sensitivity/specificity condition on truth and belong to the instrument. Predictive values condition on result and change with prevalence. For rare conditions, accuracy can flatter a useless classifier: compare with always predicting the majority class.

20,000 PEOPLE · PREV 2%400 condition +19,600 condition −TP 360 (90%)FP 980 (5%)PPV ≈ 26.9%
Source redraw: 90% sensitivity and 95% specificity can still yield low PPV at a 2% base rate.

6 · Risk versus odds Ch 4

Outcome +Outcome −
Exposedab
Unexposedcd
MEASUREMENT → WHICH t?one sampletwo pairedindependentx̄ vs μ₀dᵢ=yᵢ−xᵢWelch defaultnormality applies to values / differences
Source redraw: relationship between observations decides the denominator and df.

8 · Pairing, intervals, power Ch 6–7

Paired → one sample of differencesdᵢ=yᵢ−xᵢ; t=(d̄−Δ₀)/(s_d/√n), df=n−1
n = pairs, not measurements

Pairing removes between-unit variation. Ignoring it can enlarge the denominator and p-value. Normal quantile plot the differences, not the two columns. Large samples make normality less consequential; small samples make it real.

Test–interval identitytwo-sided reject μ₀ ⇔ |x̄−μ₀| > c·s/√n
CI = x̄ ± c·s/√n
power(μ)=Pμ(reject H₀)=1−β(μ)
MovePowerCost / meaning
|effect| ↑↑not controlled
n ↑↑time/money; only no statistical concession
spread ↓↑usually not controlled
α ↓↓Type I ↓, Type II ↑

Coverage belongs to the repeated procedure, not the realised interval. A 95% interval does not put a 95% probability on a fixed parameter. Sample-size answers always round up.

9 · Rank ladder Ch 8

ProcedureKeepsUse
tvaluesnormal model defensible
signed ranksign + magnitude rankpaired, symmetric shape
signdirection onlypaired; strongest immunity
rank sumpooled rankstwo independent groups
STEP-UP: TAKE LARGEST PASSlargest pass ⇒ all smaller ranks
Source redraw: do not test each ordered p-value independently.
Rank trap Discard zero differences before counting or ranking. Ties receive average ranks and force an approximation. Rank tests have no df: null laws are indexed by the usable sample size.

10 · Resample correctly Ch 9

QuestionPermutationBootstrap
Purposetest / p-valueestimate / interval
Actionshuffle labels under H₀sample with replacement
Sizepreserve group sizessame n as original
Assumptionexchangeabilitysample represents population

Any statistic may be permuted; using a t statistic does not invoke a t distribution. Paired design: permute signs, not labels. Enumerate all reallocations when feasible for an exact p-value; otherwise simulate and report repetitions.

Percentile bootstraprepeat: draw n values with replacement → compute statistic
95% endpoints = 2.5th and 97.5th percentiles

Report resamples, seed and interval method. Resampling estimates sampling variability; it cannot repair selection bias or manufacture information in a small sample.

SAME DATA · DIFFERENT QUESTIONPERMUTE labelsnull distribution → pRESAMPLE valuessampling spread → CI
Source redraw: shuffling answers a test; replacement resampling answers uncertainty.

12 · ANOVA machinery Ch 11–12

SS_total = SS_treatment + SS_residual
df: N−1 = (g−1)+(N−g)
MS = SS/df; F = MS_treatment/MS_residual
F ~ F(g−1, N−g) under H₀

One-way H₀: all group means equal; upper tail only. Rejecting says at least one differs, not which. Residual QQ plot checks normality; residuals vs fitted checks equal spread. Use the pooled residual variance for follow-ups.

Follow-upValid scope
Bonferronicontrasts fixed in advance
Tukeyall pairwise; exact if equal n
SS + df: TWO CHECKStreatmentresidualSS parts add · df parts addmean squares do not add
Source redraw: fill df first; sums of squares and df each reconcile to totals.

8b · Critical-value notation Ch 7

tν(γ) = lower-tail γ quantileReject when
H₁: μ<μ₀T≤tν(α)
H₁: μ>μ₀T≥−tν(α)
H₁: μ≠μ₀|T|≥−tν(α/2)

For small α the unit’s tν(α) is negative. Read the definition before choosing the sign.

13 · Second factor Ch 12

DesignStructureCan test interaction?
blockedone observation/cell; nuisance factorno: interaction becomes error
two-factor replicated>1 observation/cellyes: genuine within-cell residual
df A=a−1; df B=b−1; df A×B=(a−1)(b−1)
df residual=ab(r−1); df total=abr−1

Read interaction first. Significant A×B → main-effect averages can describe neither condition; report simple effects. Parallel interaction-plot lines mean no interaction. Replication means repetition within cells.

14 · Linear model Ch 13

Yᵢ=β₀+β₁xᵢ+εᵢ; fitted line minimises Σeᵢ²
s²=SSE/(n−p−1); t=bⱼ/SE(bⱼ)
R²=1−SSE/SST
AssumptionCheck / failure
linear meanresiduals vs fitted: curve
constant spreadresiduals vs fitted: funnel
normal errorsresidual QQ: curvature/tail point
independenceresiduals in collection order

Fit → inspect residuals → only then infer. Slope: change in mean response per unit x; in multiple regression add holding other variables constant. Intercept is interpretable only if x=0 is meaningful and near the observed range.

Mean-response CI answers “average at x₀”. Prediction interval answers “new case at x₀” and is always wider because it also carries irreducible individual scatter.

TWO QUESTIONS AT x₀outer = new caseinner = meanPI wider than mean CI
Source redraw: only uncertainty in the fitted mean shrinks away with more data.
Interval wording Mean at x₀ → confidence interval; new case at x₀ → prediction interval. More data shrink fitted-mean uncertainty, not residual scatter, so prediction width has a floor.

16 · Classification Ch 15

η=β₀+β₁x₁+⋯; odds=eη; p=eη/(1+eη)
log-odds neutral 0 → odds ratio neutral 1 → probability 0…1

Logistic coefficient inference uses z, no df. Thresholding probabilities is a separate decision. Printed confusion matrices put predictions in rows, truth in columns; transposition leaves accuracy unchanged but swaps sensitivity/specificity.

MethodHigh-value rule
Treelarger complexity constant demands more improvement → smaller tree
Forestmore trees, not deeper; sample predictors to decorrelate trees
k-nearest neighboursk=1 is perfect in-sample; standardise distances; choose k out-of-sample

Before praising accuracy, compute majority-class accuracy. Lowering the classification threshold trades specificity for sensitivity.

ONE EFFECT · THREE SCALESlog-odds βnull 0odds eᵝnull 1probability0…1
Source redraw: never compare an odds ratio with zero.

17 · PCA and clustering Ch 16

QuestionPCAClustering
Works oncolumnsrows
Objectvariance directionsdistance groups
Interpretloadings name; scores locatecut dendrogram / nearest centre
PC₁=a₁′x maximises variance subject to a₁′a₁=1
standardised data: Σ eigenvalues = p
maximum components = min(n−1,p)

Standardise by default: units otherwise dominate variance and distance. Keep components by stated cumulative threshold, elbow, or λ>1 convention; these may disagree. Hierarchical: no k first, deterministic. Partitioning: choose k first, fix seed, assigns new rows to centres.

IS THERE A TARGET?YES: predicthold data outNO: structureargue interpretation
Source redraw: unsupervised output is not a prediction score in disguise.
Classifier trap Accuracy on fitting data is one minus resubstitution error and is optimistic. For kNN, k=1 is a degenerate in-sample optimum; standardise first, or the predictor with the largest numerical scale controls distance.
https://www.asksia.ai/cheatsheet/usyd-data2002 · side 1/2
Shared by ________
Forward this to your tutorial groupv2 · 2026-10-24
Your exam is closed book: nothing printed goes in. Use this sheet to revise and self-test, not to carry.
Semester 2 formal examination period, from 16 November 2026 (the Exams Office publishes the exact date).
A4 landscape · side 2Cover answers · say the path aloud · then check
DATA2002
Self-test drills · answer paths · classic traps
Data Analytics: Learning from Data · The University of Sydney
DATA2002 cheatsheet QR code – open the full DATA2002 study guide
Full guide + ask Sia
about DATA2002
SIDE 2 · DRILLWORK THE PATH · route → expression → decision → sentenceanswers included

18 · Worked 1: base rate Ch 4 example

Prompt. Sensitivity 90%, specificity 95%, prevalence 2%, N=20,000. What fraction of positive results are correct?

  1. Condition+: 0.02×20,000=400; condition−=19,600.
  2. TP=0.90×400=360; FP=0.05×19,600=980.
  3. PPV=360/(360+980)=360/1,340≈26.9%.

Sentence. High sensitivity and specificity do not guarantee high predictive value when the condition is rare; false positives from the large healthy group dominate.

READ THE DENOMINATORsens = TP / truth+PPV = TP / test+360 / 400 = 90%360 / 1,340same TP · different denominator
Diagnostic labels grade the test result first: true/false, then positive/negative.

19 · Denominator speed drill Ch 4

WordingDenominatorMeasure
among condition+TP+FNsensitivity
among condition−FP+TNspecificity
among test+TP+FPPPV
among test−FN+TNNPV
risk in exposed / unexposedrow totalsRR
Cover-and-say Which word restricts the population? That word fixes the denominator.

20 · Study-design judgement cards Ch 2

If users choose a programme → observational; report association; name a confounder with both arrows. If access is randomised → causal comparison is licensed in expectation.

If millions reply from a biased frame → precision rises, accuracy does not. If rates reverse after pooling → compare subgroup mix and outcome rate: Simpson’s paradox needs both.

If a third variable differs only by exposure → imbalance, not yet a confounder. It must also relate to outcome and not be downstream of exposure.

Repair the claim Controlling for a measured confounder splits the sample but does not randomise it: unmeasured confounders remain, cells shrink and precision falls. Selection bias is a frame failure before contact; non-response bias occurs after invitation. More n fixes neither.

21 · Worked 2: retrospective Ch 4 example

Prompt. Recruit 200 cases and 200 controls; 30% of cases and 15% of controls report exposure. Can risk be said to double?

ExposedNot exposed
Cases60140
Controls30170
  1. Outcome totals were chosen: retrospective case–control design.
  2. Risks of outcome are design constants; RR unavailable.
  3. OR=(60×170)/(140×30)=10,200/4,200=2.43.
  4. Say odds of exposure were higher among cases; recall bias threatens the comparison. Do not say risk doubled.
WHICH MARGIN WAS FIXED?start at exposureRR + ORstart at outcomeOR onlydesign first · arithmetic second
Risk requires observed outcome proportions; an odds ratio survives fixed outcome totals.

22 · χ² repair drill Ch 3–5

Printed: χ²=11.34, df=5, p=.045. Expected probabilities used one parameter estimated from these data.

  1. Printout’s df=k−1=5 → k=6 categories.
  2. Correct df=6−1−1=4.
  3. Same χ² on smaller df has a smaller upper-tail p-value; rejection at 5% remains.

If expected counts include 3.1 and 4.2 in adjacent categories: pool before testing, recount k, then recompute df. Do not check observed counts.

If you seeDo
small expected in 2×2Fisher exact; perhaps continuity correction if borderline
small expected in larger tablepool meaningfully or simulate fixed margins
one sample cross-classifiedindependence
fixed group sample sizeshomogeneity

22b · Count-table self-checks Ch 3 · Ch 5

CheckpointMust equal / imply
GOF expected totalsΣeᵢ=n
GOF raw gapsΣ(yᵢ−eᵢ)=0
r×c expected rowstheir observed row totals

23 · Worked 3: interval logic Ch 7 example

Given: 95% CI for μ is 12.4 to 18.6.

  1. Two-sided H₀:μ=19 at α=.05 → 19 is outside → reject.
  2. H₀:μ=13 → 13 is inside → do not reject.
  3. No new calculation: the interval is exactly the set of values not rejected by the matching two-sided test.
  4. Wrong: “95% probability μ lies here.” Correct: repeated intervals built this way cover fixed μ about 95% of the time.
CI = VALUES NOT REJECTED12.413 ✓18.619 ✕
Source redraw: test and interval at the same level cannot disagree.

24 · t / rank judgement cards Ch 6–8

If the same 18 trainees use two interfaces → paired; form 18 differences; df=17. Treating 36 times as independent gives df=34 and keeps between-person variation, usually making p too large.

If 9 differences include one zero → sign and signed-rank n=8. With six positive non-zero differences, sign statistic=6; W₊+W₋=8×9/2=36.

If rank output disagrees with hand statistic → check convention: software may print W₊ rather than min(W₊,W₋), or subtract the minimum possible rank sum. The p-value can match.

If normality fails → do not shop across tests. Choose rank or permutation from the design and diagnostic before viewing p-values. For paired normality, inspect differences.

25 · Power directions Ch 7

ChangeαβPower
α .05 → .01↓↑↓
n risessame↓↑
spread risessame↑↓
true gap risessame↓↑

One-sided versus two-sided comes from the question before data. Choosing direction after seeing the sign silently inflates Type I error.

Power-plan trap A target power calculation relies on an assumed population spread from pilot or published data; if the true spread is larger, achieved power is lower. Round required n up. Retrospective power using the observed effect adds nothing.

26 · Worked 4: ANOVA table Ch 11 example

Given: 4 groups × 7 observations; SS_treat=96.0; SS_total=312.0.

SourceSSdfMS
Treatment964−1=332
Residual312−96=21628−4=249
Total31227—

F=32/9 on (3,24) df. Checks: 96+216=312 and 3+24=27. Mean squares do not add. A significant F says at least one mean differs; follow-up comparisons name where.

READ INTERACTION FIRSTparallel → maincross → simple
Source redraw: interaction changes what a main-effect average can mean.

27 · Multi-test drill Ch 10 example

Eight independent null tests at α=.05:

P(any false +)=1−.95⁸≈.337
Bonferroni threshold=.05/8=.00625
corrected FWER=1−.99375⁸ < .05

The strict inequality is the point: Bonferroni bounds FWER and is conservative. Do not claim it sets the realised rate exactly to .05.

Step-up trap: sort; find the largest rank meeting p₍ᵢ₎≤iα/m; take it and every smaller rank, even if an earlier point sits above its own threshold.

28 · Two-factor df drill Ch 12 example

3 levels × 4 levels × 2 replicates → N=24.

df A=2 · df B=3 · df A×B=6
df residual=24−12=12 · df total=23
check: 2+3+6+12=23

With one observation per cell, N=12 and model df consume all 11 total df: no residual variance, so no F ratios. More combinations do not substitute for repetition within cells.

FailureResponse
interaction significantreport factor effect within each level
blocked designblock row is housekeeping, not causal finding
rank-based blocked analysisrank within each block
Post-hoc route Match method to family: Bonferroni for fixed-in-advance contrasts; Tukey for all pairwise (exact at equal n); Scheffe for any contrast chosen after seeing means. Choosing whichever gives smallest p is data snooping.

29 · Worked 5: eigenvalues Ch 16 example

Six standardised variables: λ = 3.10, 1.42, 0.71, 0.44, 0.20, 0.13.

  1. Sum=6, because standardising gives total variance p=6.
  2. First two share=(3.10+1.42)/6=4.52/6=75.3%.
  3. Cumulative: 51.7%, 75.3%, 87.2%, 94.5% → 90% rule keeps 4.
  4. Elbow after the steep early drop could keep about 2; different conventions may honestly disagree.
EIGENVALUES · TOTAL = 63.101.42…
Source redraw: the highlighted first two explain 75.3%, not the 90% target.

30 · Classifier judgement card Ch 15 example

Reported: accuracy 94%; dataset 95% negative; sensitivity .02; specificity .99.

  1. Always-negative baseline accuracy=95%; model is worse than doing nothing.
  2. Specificity .99 confirms it nearly always says negative.
  3. Sensitivity .02 is decisive: it catches 2% of events.
  4. If misses cost more, lower threshold to trade specificity for sensitivity; report probabilities so users can choose.

Logistic output: coefficient β is log-odds; eᵝ is an odds ratio. Use z, no df. Carry full precision through η → odds → probability.

NO RESPONSE LEAKAGEtrain foldsselect + tunehold-outrepeat every fold → pool errors
Source redraw: selection once on all data leaves optimism untouched.

31b · Structure without a target Ch 16

Output clueInterpretation
one value per variable/componentloading; use signs and magnitudes to name direction
one value per observation/componentscore; locate or plot observations
all similar positive loadingsoverall size direction

32 · Method chooser all chapters

SeeAskRoute
one categorical countstated/fitted proportions?χ² GOF
two categorical variablesone sample or fixed groups?independence / homogeneity
small 2×2 expectedfixed margins?Fisher exact
one measurement groupnormal mean?one-sample t
two measurementsmatched one-to-one?paired t / Welch
non-normal pairedsymmetry defensible?signed rank / sign
non-normal independentrank or shuffle?rank sum / permutation
>2 meansone or two factors?ANOVA
numeric targetexplain or predict?linear model + validation
binary targetprobabilities or labels?logistic/tree/kNN
no targetcolumns or rows?PCA / clustering
ONE EXTENDED-ANSWER PIPELINEdesignmethodworkingsentenceassumptions → statistic + df → p / CIthen name variables, population, limitsnever stop at “reject”
Answer structure earns marks even when the final arithmetic is unfinished.

33 · Classic reversals high-frequency traps

Wrong reflexCorrect recall
large p proves H₀insufficient evidence against
check observed countscheck expected counts
ratio interval vs 0compare with 1
paired n = measurementsn = pairs
rank test has dfindexed by sample size
smaller α raises powersmaller α lowers power
F test names groupsonly “not all equal”
read main effects firstinteraction first
higher IC is betterlower is better
bigger tree constantsmaller tree
COVER → SAY → WRITE → CHECKrouteruleworkclaim
Retrieval practice: the check is useful only after an unaided attempt.
https://www.asksia.ai/cheatsheet/usyd-data2002 · side 2/2
Shared by ________
Forward this to your tutorial groupv2 · 2026-10-24
Your exam is closed book: nothing printed goes in. Use this sheet to revise and self-test, not to carry.
Semester 2 formal examination period, from 16 November 2026 (the Exams Office publishes the exact date).

Want one for YOUR exact syllabus?

Sia is your free desktop study agent. Drop your University of Sydney DATA2002 slides — Sia builds a sheet tailored to YOUR exam. Better than this library because it knows YOUR materials.

↓ Download Sia · Free