Skip to content

✏️ Exercises

Statistics & Probability

View the live site — ijk37.com

Exercises

Home  |  Notes  |  Quiz Hub  |  Projects  |  Resources

30 practice sets, one per notes file, each with 6–9 questions and a complete worked solution. Every set mixes:

  • By-hand computation — the formula written out, so you can follow it in an exam
  • Excel — worksheet functions and the Analysis ToolPak dialog
  • R — the function you would actually use, plus the assumption checks
  • Pythonscipy.stats, pandas, and statsmodels
  • Interpretation — what the number means, and what it does not mean

Tip

Attempt each question before reading the solution. The solutions are deliberately detailed — they show the arithmetic, the decision, the effect size, and the common traps — so they are worth reading even after you get the answer.


01 — Foundations of Data

File Focus
01-01-…-exe.md Population/sample, parameter/statistic, variable types, the four levels of measurement, declaring levels in software
01-02-…-exe.md Fixing a messy sheet, wide vs. long, quality checks, cleaning categories, banding, dummy coding, reshaping

02 — Frequency Distributions

File Focus
02-01-…-exe.md Categorical tables, Sturges' rule, class limits/boundaries/midpoints, grouped distributions, overlapping and empty classes
02-02-…-exe.md Choosing the graph, bar vs. histogram, stem-and-leaf, reading a boxplot, polygons and ogives, misleading axes

03 — Central Tendency

File Focus
03-01-…-exe.md The four measures, resistance to outliers, choosing a centre, Pearson skewness, bimodality, trimmed means, the averaging trap
03-02-…-exe.md GPA, combining group means, mean/SD/median/mode from a frequency table, geometric and harmonic means

04 — Variation & Position

File Focus
04-01-…-exe.md Both variance formulas, population vs. sample, CV, the empirical rule, Chebyshev, grouped SD, choosing a spread measure
04-02-…-exe.md Comparing across scales with z, percentiles by hand, five-number summary, IQR vs. z outlier rules, masking, standardizing

05 — Probability

File Focus
05-01-…-exe.md Sample spaces, classical and empirical probability, the complement shortcut, odds, the birthday problem, simulation, the gambler's fallacy
05-02-…-exe.md Addition and multiplication rules, with/without replacement, contingency tables, tree diagrams, independence vs. mutual exclusivity
05-03-…-exe.md Medical screening, base rates, multi-source Bayes, counting principle, permutations vs. combinations, lottery odds, Bayesian updating

06 — Discrete Distributions

File Focus
06-01-…-exe.md Validity checks, μ/σ²/σ of a distribution, carnival games, insurance pricing, rules for E and Var, simulation
06-02-…-exe.md Binomial conditions, full tables, Poisson and interval rescaling, geometric and hypergeometric, airline overbooking

07 — Continuous & Normal

File Focus
07-01-…-exe.md Why P(X = x) = 0, uniform probabilities, exponential waits, the Poisson–exponential link, memorylessness, density vs. probability
07-02-…-exe.md Standard normal areas, inverse normal, both directions, solving for a parameter, normal approximation with continuity correction, normality checks

08 — Sampling Theory

File Focus
08-01-…-exe.md Identifying designs, stratified vs. cluster, error vs. bias, diagnosing specific biases, experimental design, drawing samples in code
08-02-…-exe.md Standard error, one value vs. a mean, when the CLT applies, proportions, solving for n, simulating the CLT

09 — Confidence Intervals

File Focus
09-01-…-exe.md z- and t-intervals, choosing between them, correct interpretation, sample size, what changes the width, CI for a variance
09-02-…-exe.md Proportion intervals, three confidence levels, sample size, why polls use ~1,000, small-sample failures, two proportions, coverage simulation

10 — Hypothesis Testing

File Focus
10-01-…-exe.md Writing hypotheses, spotting bad ones, Type I/II errors in context, power, p-values from statistics, what a p-value is not, the five steps
10-02-…-exe.md One-, two-tailed z-tests for a mean and a proportion, the p₀ vs. trap, two proportions, choosing the tail honestly

11 — t-Tests

File Focus
11-01-…-exe.md Critical values, tests from summary stats and raw data, t vs. z, reading output, assumption checks, what to do when they fail
11-02-…-exe.md Independent vs. paired, pooled vs. Welch, raw-data tests, the F-test for variances, reading ToolPak output, power and sample size
11-03-…-exe.md Full paired test, the cost of ignoring pairing, subtraction direction, checking the differences, choosing a paired design, McNemar's test

12 — Chi-Square & ANOVA

File Focus
12-01-…-exe.md Uniform and specified distributions, reading cell contributions, small expected counts, fitting a Poisson, test for a variance, counts vs. percentages
12-02-…-exe.md Expected counts, full tests, homogeneity, small 2×2 tables and Fisher's exact test, building tables from raw data, effect size vs. sample size
12-03-…-exe.md Why not repeated t-tests, the ANOVA table by hand, Tukey HSD, reading ToolPak output, assumptions, unequal n, F = t²

13 — Correlation & Regression

File Focus
13-01-…-exe.md r by hand, testing ρ = 0, interpreting r and , Anscombe's quartet, outlier sensitivity, Pearson vs. Spearman, causation, correlation matrices
13-02-…-exe.md Fitting by hand, prediction and residuals, SST/SSR/SSE, reading LINEST, residual plots, CI vs. PI, log transformation
13-03-…-exe.md Testing the slope, three equivalent tests, reading full output, multiple regression, adjusted , multicollinearity, dummies and interactions

Study Sequence

For each topic:

  1.  Read the NOTES file            01-notes/NN-MM-topic.md
  2.  Attempt every exercise         02-exercises/NN-MM-topic-exe.md
  3.  Check the worked solution      — read it even when you were right
  4.  Reproduce the answer in EXCEL  — this is where most exams live
  5.  Reproduce it in R              — one line, with the assumption checks
  6.  Take the chapter QUIZ          03-quiz/
  7.  After each chapter block, build the matching PROJECT   04-projects/

Tool Cheat Sheet Across All Sets

Task Excel R Python
Descriptive stats Data Analysis ▸ Descriptive Statistics summary(), psych::describe() df.describe()
Frequency table FREQUENCY / PivotTable table(cut(x, breaks)) pd.cut().value_counts()
Normal probability NORM.DIST / NORM.INV pnorm / qnorm norm.cdf / norm.ppf
Binomial / Poisson BINOM.DIST / POISSON.DIST dbinom / dpois binom.pmf / poisson.pmf
Confidence interval CONFIDENCE.T t.test(x)$conf.int stats.t.interval
One-sample t T.TEST(x, const, 2, 1) t.test(x, mu =) ttest_1samp
Two-sample t Data Analysis ▸ t-Test t.test(x, y) ttest_ind
Paired t Data Analysis ▸ Paired t.test(x, y, paired = TRUE) ttest_rel
Chi-square CHISQ.TEST chisq.test() chi2_contingency
ANOVA Data Analysis ▸ Anova: Single Factor aov(y ~ g) f_oneway / anova_lm
Correlation CORREL cor.test(x, y) stats.pearsonr
Regression Data Analysis ▸ Regression lm(y ~ x) sm.OLS(y, X).fit()