
Not 20% and not 100%: the chance of rain on at least one of the 5 days is 67.2%. Each day is 80% dry, so all 5 days stay dry with probability 0.8 × 0.8 × 0.8 × 0.8 × 0.8 = 0.328, and 1 − 0.328 = 0.672. The rule is P(at least one) = 1 − (1 − p)^n.
In this lecture:
On the Statistics page, under Get it, download the Windows .zip or the Linux .tar.gz. Extract it and run the app; on Windows, if SmartScreen appears, click More info, then Run anyway. Then search 'mean', type five test scores 88, 92, 75, 95, 80 and press Compute: the class average is 86.
In this lecture:
Open a terminal (PowerShell on Windows, Ctrl+Alt+T on Linux), check python --version (3.10 or newer), run pip install statistics-ai999x, then pip install jupyterlab and jupyter lab, or skip installing and use Google Colab with %pip install statistics-ai999x. Then ask in plain English: the test scores 88, 92, 75, 95 and 80 have a mean of 86 and a median of 88.
In this lecture:
Seven salaries of 32, 35, 38, 40, 41, 45 and 1000 thousand a year add up to 1231, so the mean is 1231 / 7 = 175.857 thousand, yet 6 of the 7 people earn less than a third of it. The median, the middle value of the sorted list, is 40 thousand. Delete the 1000 and the mean falls to 38.5 while the median only moves from 40 to 39, so use the median for money and house prices.
In this lecture:
Take Bus A. Both buses average exactly 5 minutes, but Bus A's waits (3, 4, 5, 5, 6, 7) have a sample standard deviation of 1.41 minutes, while Bus B's (1, 2, 5, 5, 8, 9) wobble by 3.16 minutes. The range tells the same story: 4 minutes for Bus A, 8 for Bus B.
In this lecture:
The 80 in history. Math (mean 70, standard deviation 10) gives 85 a z-score of 1.5, history (mean 60, standard deviation 8) gives 80 a z-score of 2.5. On a bell curve, 6.68% of the math class scores above 85, but only 0.62% of the history class scores above 80, so the lower score is the rarer one.
In this lecture:
Yes. For the delivery times 10, 12, 12, 13, 12, 11, 14, 13, 15 and 102 minutes, Q1 is 12, Q3 is 13.75 and the IQR is 1.75, so the 1.5 IQR fences are 9.375 and 16.375 minutes. Only 102 lies outside them, so it is the only outlier, and the typical delivery (the median) is 12.5 minutes, not the 21.4-minute average.
In this lecture:
Your real grade is 79.5, not 82.3. With 72 on exams (weight 50), 85 on homework (weight 30) and 90 on the project (weight 20), the weighted mean is (72 x 50 + 85 x 30 + 90 x 20) / 100 = 7950 / 100 = 79.5, while the plain average of the three scores is 82.33. The heavy exam weight pulls the grade toward the exam score.
In this lecture:
Only 8.3%. Out of 1000 people, 10 are sick and the test finds 9 of them, but it also flags 99 of the 990 healthy people. So 108 people test positive and only 9 of them are sick: 9 / 108 = 0.0833.
In this lecture:
Only about 7.8%. Guessing a 10-question quiz with 4 choices per question is a binomial with n = 10 and p = 0.25, and the chance of at least 5 right is 0.0781. A guesser expects n x p = 2.5 right answers, and 5.6% of guessers score zero.
In this lecture:
About 1.8%. When sign-ups arrive at random at an average of 4 an hour, the Poisson rule gives the chance of 0 in one hour as e to the minus 4 = 0.0183, so about 1 hour in 55 is silent with nothing broken. The chance of at least 2 sign-ups is 0.908, or 90.8%.
In this lecture:
About 1.6%. If adult men average 175 cm with a standard deviation (spread) of 7 cm, then 190 cm is z = 2.14 spreads above the mean, and the bell curve's tail above it holds 0.0161 of all men: about 1 man in 62. For IQ scores (mean 100, spread 15), 2.3% score above 130, and the top 10% starts at 119.2.
In this lecture:
No. You pay 5; 88% of players win nothing (-5), 10% win 20 (+15) and 2% win 50 (+45). The expected value is -5 x 0.88 + 15 x 0.10 + 45 x 0.02 = -4.4 + 1.5 + 0.9 = -2, so every game costs you 2 on average and 100 games cost about 200.
In this lecture:
A coffee machine pours 250 ml on average with a spread (standard deviation) of 10 ml. One cup comes in under 245 ml 30.9% of the time (z = -0.5). The average of 25 cups has a spread of only 10 / square root of 25 = 2 ml, the standard error, so 245 is z = -2.5 for it and the chance drops to 0.62%.
In this lecture:
520 of 1000 people saying yes is 52%, but the margin of error is 1.96 x square root of (0.52 x 0.48 / 1000) = 3.1 points. The 95% confidence interval runs from 48.9% to 55.1%, which crosses 50%, so the race is too close to call. For a 3-point margin you need 1068 people, whatever the size of the country.
In this lecture:
Green gets 45 clicks from 100 visitors and grey 30 from 100. A two-proportion z-test pools the rate (75 of 200 = 37.5%), gives z = 2.19 and a two-tailed p-value of 0.028, under the usual 0.05 line: luck alone would make a gap this big only about 3 times in 100, so green probably wins. The same 45% vs 30% with only 20 visitors each gives p = 0.327: not enough evidence.
In this lecture:
Six students score 67 on average before a study app and 71.5 after. A paired t-test keeps only each student's change (+6, +4, -1, +6, +6, +6): the mean change is +4.5 points with a standard deviation of 2.81, so t = 3.92 with 5 degrees of freedom and p = 0.011, under 0.05: the app probably helped. Ignoring the pairs (Welch's t-test on the two columns) gives p = 0.284, because the gaps between students hide the gain.
In this lecture:
Six friends study 1 to 6 hours and score 52, 58, 61, 70, 74 and 79. The Pearson correlation coefficient measures how tightly the dots follow a straight line on a scale from -1 to +1: here r = 0.994, a very strong positive link (r squared = 0.987). One bad day (70 becomes 40) drops r to 0.605, the Spearman rank correlation is exactly 1 because the order never breaks, and a strong correlation is still not proof of cause.
In this lecture:
An ice cream stand sold 120, 150, 185, 210 and 245 cones on days of 18, 21, 24, 27 and 30 degrees. The least squares line through those days is y = -66 + 10.33 x: 10.33 more cones for every extra degree. At 33 degrees it predicts 275 cones, but predicting far outside the data, like 399 cones at 45 degrees, is risky.
In this lecture:
A coffee cart sold 310, 285, 342, 298, 120, 330, 280, 315, 290 and 335 cups in 10 days. The 1.5 IQR rule flags 120 (a rainy, half-closed day) as an outlier; the 9 normal days average 309.4 cups, with a 95% interval of 292.0 to 326.9. Temperature and sales correlate at r = 0.914, and the least squares line predicts 320.7, so prepare about 321 cups for a 26 degree day.
In this lecture:
This course contains the use of artificial intelligence.
The forecast says 20% chance of rain every day of your 5-day trip. What is the chance you get wet at least once? Most people guess 20%. The real answer is 67.2%. In this free beginner course you will learn to answer questions like that yourself, with statistics you can see, and with a few lines of Python in Jupyter.
Statistics with Python for Beginners teaches the ideas behind data, probability and real decisions from scratch. Every lecture starts with an everyday question and a real number: why the average salary can lie, which of two buses is more reliable, whether a positive medical test really means you are sick (often it does not: in our example the chance is only 8.3%), how a poll of 1068 people can be accurate to 3 points, and whether button A or button B wins an A/B test. You see each idea drawn and animated, you watch a desktop app solve it live, and then you solve it in a Jupyter notebook.
All the tools are free. You will use the free AI999X Statistics engine: a desktop app for Windows and Linux with 112 calculations, live charts and a question box, and the same engine as a Python package (pip install statistics-ai999x). You can even ask it questions in plain English inside Jupyter, and it shows the formula and every step of the answer. Every number in the course is computed by the engine, so what you see on screen is exactly what you get on your own computer.
What you will learn
What you build
The course ends with a small real-world data analysis project in Jupyter. A coffee cart has 10 days of sales: you describe the data, find and remove an outlier, compute a confidence interval for a normal day, measure the link with the weather and predict how many cups to prepare tomorrow. It ties together everything from the course in one notebook you can reuse for your own data.
Who this course is for
How the course works
There are 20 short lectures of about 4 minutes in 5 sections: Start Here, Describe Your Data, Chance and Probability, From Samples to Decisions, and Relationships, Predictions and Final Project. Lectures 2 and 3 show every install step on screen: the free AI999X Statistics engine as a desktop app, then Python, the package and Jupyter, or Google Colab with nothing to install. The Jupyter notebook of every lecture is included as a downloadable resource.
Frequently asked questions
If you have ever looked at an average, a poll or a test result and wondered whether to trust it, enroll now and start with lecture 1: the rain forecast.