Appendix D: Companion Resources

The full text of Margin of Error is freely available online at stats.marginoferrormedia.com, where it is hosted alongside everything in this appendix. The companion site is the book itself: searchable, with figures rendered crisp on a screen, and updated whenever errata or new exercises are merged. The print and Kindle editions are produced from the same source.

Interactive Applications

A set of free, browser-based Shiny apps lets you explore the book’s ideas hands-on. They run in any modern browser, with no account or installation required. Each one is referenced from a “Try It Online” callout in the chapter that introduces the underlying idea. The complete list, organized by chapter and kept current as apps are added or relocated, lives at stats.marginoferrormedia.com/apps.html.

Chapter 1, Variable Type Explorer. Classify variables from a hospital dataset as nominal, ordinal, discrete, or continuous. Companion tabs show what happens when you apply the wrong summary statistic, and test whether you can spot variables that contain digits but are not numerical. stats.marginoferrormedia.com/apps.html#variable-type-explorer

Chapter 2, Sampling Explorer. Compare simple random, stratified, cluster, and systematic sampling side by side. Draw repeated samples and watch how tightly the estimates cluster across methods. The same app supports the sample-size and margin-of-error sliders used in Chapter 7. stats.marginoferrormedia.com/apps.html#sampling-explorer

Chapter 2, Total Survey Error Explorer. A clickable taxonomy of every survey error type, with definitions, practitioner examples, and notes on which errors larger samples actually fix. stats.marginoferrormedia.com/apps.html#total-survey-error-explorer

Chapters 3 and 4, Datasaurus Explorer. Twelve datasets with identical means, standard deviations, and correlations, yet wildly different shapes. The visual argument for why summaries alone are not enough. stats.marginoferrormedia.com/apps.html#datasaurus-explorer

Chapter 4, Correlation Game. See a scatter plot, estimate \(r\), then reveal the answer. Builds visual intuition for what different correlation strengths actually look like. stats.marginoferrormedia.com/apps.html#correlation-game

Chapter 5, Probability Rules Sandbox. Set \(P(A)\), \(P(B)\), and \(P(A \cap B)\) with sliders and watch every probability rule update live on a Venn diagram, a unit-square view, and a tree diagram. Force-toggles for independence and mutual exclusivity. stats.marginoferrormedia.com/apps.html#probability-rules-sandbox

Chapter 5, Base Rate Lab. The COVID-test base-rate problem made visceral. Drag the prevalence slider and watch the positive predictive value collapse even though the test never changes. stats.marginoferrormedia.com/apps.html#base-rate-lab

Chapter 5, Binomial Explorer. Set \(n\) and \(p\) with sliders and watch the binomial PMF and CDF update. Overlay the normal approximation and see when it succeeds and when it fails. stats.marginoferrormedia.com/apps.html#binomial-explorer

Chapter 6, Normal Curve Explorer. Set \(\mu\) and \(\sigma\), pick a region (less than \(a\), between \(a\) and \(b\), within \(\pm k\) standard deviations), and watch the shaded area and probability update live. stats.marginoferrormedia.com/apps.html#normal-curve-explorer

Chapter 6, Distribution Explorer. The Central Limit Theorem in action. Pick a skewed population, set the sample size, and watch the sampling distribution of the mean transform from skewed to normal as \(n\) grows. stats.marginoferrormedia.com/apps.html#distribution-explorer

Chapter 7, Confidence Interval Simulator. Generate hundreds of confidence intervals from random samples and watch the capture rate. Switch between 90%, 95%, and 99% confidence and see the miss rate change. stats.marginoferrormedia.com/apps.html#confidence-interval-simulator

Chapter 8, Hypothesis Testing Playground. Set \(\alpha\), sample size, and effect size, then watch Type I error, Type II error, and power respond. Run repeated experiments under a true null and see how often you reject. stats.marginoferrormedia.com/apps.html#hypothesis-testing-playground

Chapter 8, P-Hacking Simulator. A dataset with no real relationships and a menu of analysis choices. See how quickly you can reach \(p < 0.05\), and what that implies for published research. stats.marginoferrormedia.com/apps.html#phacking-simulator

Chapter 9, ANOVA Visualizer. Adjust group means and within-group variability with sliders and watch the F-statistic and effect size update in real time. Set all means equal to see what happens to \(F\). stats.marginoferrormedia.com/apps.html#anova-visualizer

Chapters 10 and 11, Regression Explorer. Add data points, fit the model, and check residuals. Drop in an outlier and watch the slope shift. Used in Chapter 10 for simple regression and again in Chapter 11 to add and remove predictors and see multicollinearity inflate the standard errors. stats.marginoferrormedia.com/apps.html#regression-explorer

Datasets

All twelve datasets used in the book are available for download as CSV files. The download portal is at stats.marginoferrormedia.com/datasets.html; see Appendix B for complete variable descriptions, sources, and notes on construction.

R Companion

The R Companion chapter in this book sketches what each walkthrough covers. The full executable walkthroughs (code blocks, pre-rendered figures, verified numbers) live at stats.marginoferrormedia.com/walkthroughs/. Each chapter ends with a “Try It in R” callout that links to its walkthrough.

Each walkthrough begins with source("_common.R") to load tidyverse and the book’s theme_moe(). Download _common.R from stats.marginoferrormedia.com/walkthroughs/_common.R, or replace the source() line with library(tidyverse). The analyses still run; only the figure styling changes.

Errata and Feedback

If you find an error, have a suggestion, or want to flag something that could be explained better, open an issue at github.com/patilv/margin-of-error-feedback or email the author at patilv@gmail.com.

Instructor Resources

In development. Resources will include a solutions manual covering all three exercise tiers across the chapters with exercises, sample 15-week and 8-week syllabi, and exam templates for midterm (Chapters 1 to 8) and final (Chapters 1 to 12). Contact patilv@gmail.com for the current state and access.