Skip to content
Statistics LabMAST20005 · 2020

MAST20005 Statistics · University of Melbourne · Semester 2, 2020

Second-year statistics, rebuilt as a lab you can play with.

Three assignments of estimators, confidence intervals, hypothesis tests and regression — originally R notebooks and handwritten derivations — ported to TypeScript and turned into interactive explainers. Every number R printed in the 2020 submission is reproduced exactly.

34 of 34 printed R outputs reproduced character for character — see the ledger.

New here? Take the guided tour: three captioned walkthroughs and a screenshot of every feature.

1113151719missmissmissμ = 15
Figure 0.Fifty 95% t intervals, each from a fresh sample of ten. 47 catch the true mean and 3 miss — the kind of picture Chapter 3 lets you redraw.

The brief, paraphrased

What the coursework asked

Each assignment mixed pen-and-paper derivations with short R analyses. The summaries below are written in my own words; the original specifications stay with the university.

A1Due 4 September 2020

Estimation

  • Summarise thirty plant heights, fit an exponential model by maximum likelihood and judge it with QQ plots.
  • Derive the lognormal MLEs, a standard error and a chi-squared interval for the variance parameter.
  • Compare method-of-moments and maximum-likelihood estimators of a uniform endpoint by mean squared error.
  • Simulate in R whether the sample midrange or the sample mean is the better estimator of a normal mean.

Ch. 1 EstimatorsCh. 2 Fitting

A2Due 25 September 2020

Intervals, regression and testing

  • Test whether support for bicycle lanes differs between two councils.
  • Build t, pooled-t and F intervals for walking times and size an experiment.
  • Fit and diagnose a simple linear regression of coffee-shop sales on customers.
  • Decide which statistics are pivots, then find error rates and power for a one-observation test.

Ch. 3 IntervalsCh. 5 RegressionCh. 4 Tests

A3Due 25 October 2020

Nonparametric, Bayesian and likelihood methods

  • Run sign and Wilcoxon rank-sum tests on Victoria’s daily COVID-19 cases in September 2020.
  • Estimate an exponential quantile and its asymptotic standard error.
  • Derive a gamma posterior, sufficient statistics for the normal, and a likelihood-ratio test for a rate.

Ch. 4 TestsCh. 2 FittingCh. 1 Estimators

Contents

Five chapters and three appendices

  1. 1Estimators, bias and varianceSimulate the sampling distribution of competing estimators: the midrange against the sample mean, and the method of moments against maximum likelihood for Unif(0, θ). Ends with a Bayesian posterior.A1 Q3A1 Q4A3 Q3
  2. 2Fitting a distributionMaximum likelihood for exponential and lognormal models, QQ plots built from Type 6 sample quantiles, a chi-squared interval for a variance parameter and the standard error of a sample quantile.A1 Q1A1 Q2A3 Q2
  3. 3Confidence intervalsWatch 95% intervals miss about one time in twenty, size an experiment, compare two means and two variances, and test two proportions.A2 Q1A2 Q2A2 Q4
  4. 4Hypothesis tests, size and powerTrade Type I against Type II error by dragging a critical value, trace a power curve for a likelihood-ratio test, and run sign and Wilcoxon tests on Victoria's September 2020 case counts.A2 Q5A3 Q1A3 Q5
  5. 5Simple linear regressionFit a least-squares line, read R's summary table, build confidence and prediction intervals, and inspect the four diagnostic plots R draws for a fitted model.A2 Q3
  6. AAppendix: the parity ledgerHow the TypeScript port was checked against R, including a port of R’s random number generator, with every 2020 value beside its recomputation.42 values
  7. BAppendix: simulation studiesFive Monte Carlo studies of coverage, size and power for methods from the coursework, with a fixed design in code, Wilson intervals, Monte Carlo standard errors and an R replay of every count.245,000 replications
  8. CAppendix: checking the assumptionsFormal checks of every assumption the 2020 methods rely on, run on the original inputs, plus interactive versions for any data: normality, constant variance, independence, outliers and trend.12 checks
  9. §Methods and decision recordsData provenance, evaluation design, assumptions and limitations, the model and data card, the AI use statement and eight decision records.8 records

About this project

From R notebooks to a statistics lab

These were my individual assignments for MAST20005 Statistics at the University of Melbourne in Semester 2, 2020, a second-year subject on estimation, intervals, testing and regression. The questions were set by the subject’s teaching team; the answers, code and derivations are mine.

The rebuild keeps the original methods — including their quirks — and ports them faithfully. Where the assignment data came from the university, the labs start from simulated samples of the same shape and show the original results alongside. The Victorian case counts are public figures.

Academic integrity: the original submission is preserved in the repository for reference only. Please don’t reuse it in your own coursework.

Source repository is private for now

How parity was checked
Subject
MAST20005 Statistics
Institution
University of Melbourne
When
Semester 2, 2020
Work
Individual — Sunchuangyu (Rin) Huang
Original and revived technology stacks
Aspect2020 original2026 revival
LanguageR in RStudioTypeScript (strict)
DocumentsR Markdown notebooks, handwritten scansNext.js 16 App Router, React 19, KaTeX
Randomnessset.seed + rnorm / runifPort of R’s Mersenne-Twister (uniforms bit-identical)
Graphicsbase R plot()Hand-built SVG charts, Tailwind CSS v4
CheckingReading the outputVitest parity suite against R 4.6, CI on every push

Credits: assignment questions by the MAST20005 teaching team (paraphrased here). Typefaces: Source Serif 4 and IBM Plex. Mathematics typeset with KaTeX.