Skip to content
simstat.com Statistics by simulation

Statistics

Many statistics courses introduce ideas such as the sampling distribution, the standard error and the confidence interval through algebra. The algebra is correct, but it hides the process it describes. This section takes the opposite route: it shows each concept by simulating it, then connects the simulation back to the formula you will meet in a textbook.

Start with the sampling distribution: watch hundreds of sample means pile up into a histogram in the sampling distribution simulator, and see its width shrink as the sample size grows. That width, the standard error, is what a confidence interval is built from; the guide to it shows how to calculate it for a mean, a proportion and a difference, and with the bootstrap when there is no formula. Our guide to how to interpret confidence intervals generates a thousand of them and counts how many contain the true value, and the table of z-scores for confidence intervals explains where 1.96 and its neighbours come from.

A confidence interval tells you how precisely something is estimated; an effect size tells you how large it is. The guide covers Cohen's d, Hedges' g, correlations, η² and odds ratios, and what "small", "medium" and "large" do and do not mean.

The calculators do the arithmetic and show their working: the confidence interval calculator for means and proportions, the normal CDF calculator for areas under the normal curve and its inverse, and the effect size calculator for standardized mean differences with their confidence intervals. They are meant to support understanding, not replace it: each one explains what its output means and when the method is not appropriate.

Describing data comes before any of that. Our guide to how to find IQR works out the quartiles by hand for odd and even samples and explains why calculators disagree, and upper and lower fences turns the IQR into Tukey's outlier rule, with advice on what to do with a flagged value. The IQR calculator does both, with a box plot. To group data into a frequency table, read how to find class width and how to find class boundaries, then build the table in the frequency distribution calculator.

For two variables, how to calculate the correlation coefficient computes Pearson's r step by step and shows, with Anscombe's quartet, why you should always plot the data; correlation vs causation explains confounding, reverse causation, chance and selection with real studies. The correlation coefficient calculator gives r, Spearman's ρ and a scatter plot for your own data.

Tests end in a p-value. The p-value calculator turns a z, t, chi-square or F statistic into a p-value for a two-tailed, left-tailed or right-tailed test, with the shaded curve and the TI-84 keystrokes. If your course uses printed tables, the t table, the z table (negative and positive z) and the chi-square table are computed by the same code, explain how to read them with worked examples, and print as clean one-page sheets.

Topics planned for this section include type I and type II errors, statistical power and regression.

Tools for statistics

Articles