Probability & Statistics Lab
Distributions, tests and models for pasted data on one page. It covers normal, binomial and Poisson probabilities, descriptive statistics and outliers, regression and correlation, confidence intervals, t-tests, chi-square, one-way ANOVA and a Monte Carlo estimate of π. Each test gives its statistic, degrees of freedom and p-value.
How to Use
- Pick a mode from the five rows: Distributions, Describe, Relationships, Inference or Simulation.
- For a distribution, set its parameters (normal: mean, sd and x; binomial: n, p and k; Poisson: λ and k). Results update as you type.
- For the data modes, paste one value per line or CSV/TSV columns: x and y (or two groups) for regression and the two-sample t-test, one column per group for ANOVA, a table of counts for chi-square (table). A header row is detected, and each mode starts with sample data you can replace.
- Read the statistic, degrees of freedom, p-value and “Reject H₀ at 0.05”. The chart shows the curve, histogram, scatter with its fitted line, or the Monte Carlo convergence.
- For Monte Carlo, change the number of trials (up to 2,000,000) to draw a fresh sample and watch the estimate of π settle.
Chart
Worked Example
The normal curve at 1.96. With the defaults (mean 0, sd 1, x = 1.96), P(X ≤ 1.96) = 0.975002 and P(X ≥ 1.96) = 0.024998, so 95.0% of a normal distribution lies within ±1.96 standard deviations of the mean. The 95th percentile, the one-sided cut-off, is 1.644854.
Two groups, then three. Group A (23, 25, 21, 24, 22) has mean 23 and group B (28, 30, 27, 29, 31) has mean 29; both variances are 2.5. Welch’s t = −6 ÷ √(2.5/5 + 2.5/5) = −6 with df = 8, p = 0.000323. Adding group C (31, 33, 29, 35, 32) and running ANOVA: the between-groups mean square is 105 and the within-groups one 3.333, so F = 31.5 with 2 and 12 df, p = 0.0000168.
The common mistake: trusting |z| > 3 to find outliers. The outlier sample is 20 to 28 plus a 90. The 90 drags the mean up to 29.64 and the standard deviation from 2.37 to 20.15, so its own z-score is only 2.996 and the z rule reports no outliers. The IQR fences don’t move much: Q1 = 22.5 and Q3 = 25.5 give fences of 18 and 30, and the 90 is flagged.
Show Work
Formulas
Where the Tests Came From
Abraham de Moivre found the normal curve in 1733 as an approximation to the binomial distribution for many coin tosses. Karl Pearson published the chi-square test in 1900, and in 1908 William Sealy Gosset, a chemist at the Guinness brewery in Dublin, published the t-distribution in Biometrika under the pen name “Student”, because brewing trials gave him only a handful of samples at a time.
Ronald Fisher set out the analysis of variance in Statistical Methods for Research Workers (1925), and George Snedecor named the F distribution after him in 1934. Bernard Welch published his version of the two-sample t-test in 1947. The Monte Carlo method came from Stanislaw Ulam and John von Neumann at Los Alamos in the late 1940s; Nicholas Metropolis and Ulam described it in print in 1949.
About This Tool
This lab puts fourteen methods side by side so you can paste a data set once and move from describing it to testing it: distributions, descriptive statistics, IQR and z-score outliers, regression, a correlation matrix, a t-based confidence interval, one- and two-sample t-tests, chi-square for fit and for tables, one-way ANOVA and Monte Carlo. The focused calculators each do one of these jobs with more options and the working shown: the Statistics Calculator offers both quartile conventions and step-by-step variance, the P-Value Calculator turns a test statistic you already have into a p-value, and the Z-Score Calculator shades areas under the bell curve. Use the lab when you have raw data and several questions about it.
Everything runs in your browser; nothing is uploaded.
Related tools: Statistics Calculator, P-Value Calculator, Normal Distribution Calculator, and Percentile Calculator.
Frequently Asked Questions
Which test should I use?
A sample mean against a known value: the one-sample t-test. Two group means: the two-sample t-test. Three or more group means: one-way ANOVA, not a string of t-tests. If three comparisons were independent, each at 0.05, the chance of at least one false alarm would be 1 − 0.95³ = 14.3%. Counts against expected counts: chi-square (fit). Two categorical variables in a table: chi-square (table).
Where do the p-values come from?
From the distribution functions themselves: the error function for the normal, the regularised incomplete gamma function for chi-square, and the regularised incomplete beta function for t and F. Nothing is read from a table, so a chi-square of 3.841 with 1 df gives p = 0.050014, just above the 5% cut-off, and the t critical value for 9 df at 95% comes out as 2.262157.
Why are the quartiles different from my calculator’s?
The lab interpolates between sorted values, as Excel’s QUARTILE.INC does. For the sample data (20 to 28 plus a 90) that gives Q1 = 22.5 and Q3 = 25.5. A TI-84 takes the median of each half instead and gives 22 and 26. Neither is wrong; the Statistics Calculator lets you switch between the two.
Why does the two-sample t-test use Welch’s version?
Welch’s test does not assume the two groups have the same variance, so it is safe when they don’t. When they do, it agrees with the classic pooled test: the sample groups both have a variance of 2.5, and Welch gives df = 8, the same as 5 + 5 − 2. When one group is much more spread out, the df (shown as a decimal) fall and the p-value rises.
How accurate is the Monte Carlo estimate of π?
The standard error is 4 × √(p(1 − p) ÷ N) with p = π/4, so at the default 10,000 trials a typical estimate is off by about 0.016, and at 1,000,000 trials by about 0.0016. Getting one more correct digit takes 100 times as many trials, which is why Monte Carlo is used when no exact formula is at hand, not as a way to compute π.
How do I use the Probability & Statistics Lab?
Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Do I need to install or sign up for anything?
Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.
Is my information private?
Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.
Common Use Cases
A/B tests
30 of 40 visitors converting against 20 of 60: chi-square (table) gives χ² = 16.67, p = 0.0000446.
Comparing treatments
Three groups of five readings: one-way ANOVA gives F and its p-value in one step.
Defect counts
At an average of 3 defects per batch, Poisson gives P(2 or fewer) = 0.42319.
Coursework
Check answers: P(Z ≤ 1.96) = 0.975002, and t for 9 df at 95% is 2.262157.
Outlier screening
IQR fences of 18 and 30 flag the 90 in the sample data before you average it.
Calibration lines
Fit y on x with R², the slope’s standard error and its p-value; the sample gives R² = 0.998647.
Last updated: