SYS-501 Probability and statistics
Probability you can
change and watch.
The problems from my probability and statistics notebooks, turned into live models: café arrivals, pooled blood tests, shaft tolerances, motorcycle reliability, a dart game, highway accidents and a test of gasoline prices. Change a parameter and every probability, chart and conclusion recomputes.
- Poisson · Binomial · Normal · Weibull
- Monte Carlo
- t, χ² and F tests
Tesla battery survey
Full-charge range of 1,417 owner-reported vehicles, from notebook 01
Notebook 02
Probability distributions in practice
Four applied problems, each a different distribution. The defaults are the notebook's numbers; the results match its outputs.
P(Y = y) for the chosen period. The darker bars are the ones counted in P(Y ≥ m).
With many people and a small p, the binomial is close to a Poisson with λ = np. The chart compares the two.
Survival curves S(x): the chance of riding x thousand miles without a failure. A shape k above 1 means wear-out, so a used motorcycle is less reliable than a new one; the exponential has no memory.
Notebook 03
Monte Carlo simulation
When the answer is hard to derive, simulate it. Throw darts at random, drop accidents on a highway, and watch the estimate settle. Each run is seeded, so it can be repeated.
The dart game
A 12 in square board, rings of radius 2, 4 and 6 in scoring 25, 15 and 5
The running estimate of the expected score as throws accumulate, against the exact value.
Accidents on a 10-mile highway
One uniform location, two normal ones: how often are all three at least the minimum distance apart?
The estimate from ten seeds. When they agree to within 5 %, the simulation has converged, as the notebook checks.
Airline accidents
A Poisson rate of accidents per month
Notebook 04
Estimation and hypothesis testing
Are the gas prices of two cities different? How precisely do we know a battery's remaining capacity? How many measurements does an astronomer need? Edit the data and the answers follow.
Gas prices in two cities
Welch's t-test for the means and an F-test for the variances
Confidence intervals
For a mean (t) and a variance (χ²); defaults are the Tesla battery capacity sample
How many measurements?
The sample size that puts the mean within a margin of error
n = (z σ / E)², rounded up. The notebook's astronomer, σ = 2 light-years and ±0.5, needs 62 measurements for 95 % and 107 for 99 %.
The notebooks
Four notebooks, one course
Graduate coursework in probability and statistics, worked in Python. The datasets are not included in the repository; the README lists the files each notebook needs.
Tesla battery range
Histograms, scatter and box plots of a crowd-sourced survey of Tesla owners.
Probability distributions in practice
Café arrivals, pooled blood testing, shaft tolerances and motorcycle reliability.
Monte Carlo simulation and correlation
Airline accidents, battery capacity against mileage, a dart game and highway accidents.
Estimation and hypothesis testing
Confidence intervals, sample-size planning and a comparison of gasoline prices.
Shared as a portfolio of applied analysis. If you are taking a similar course, please follow your institution's academic-integrity policy. Assignment prompts and third-party datasets remain the property of their original authors.