Data Science and Data Scientist

Module 6 of 43

Module 6: Probability Basics

5 min read852 words
What you'll learn
Express probability as a numberUnderstand distributions in plain termsGrasp what "expected value" meansSee why probability matters for data science

"Probability is the math of uncertainty — a way to reason clearly about things that haven't happened yet."

Learning Objectives

By the end of this module, you will be able to:

  • Express probability as a number
  • Understand distributions in plain terms
  • Grasp what "expected value" means
  • See why probability matters for data science

1. Probability Is Just a Number

Probability measures how likely something is, on a scale from 0 (never) to 1 (certain) — often shown as a percentage.

  • A fair coin landing heads: 0.5 (50%)
  • Rolling a 6 on a die: about 0.17 (1 in 6)

Key idea: Probability lets us make smart decisions without certainty. A weather app saying "70% chance of rain" isn't wrong if it stays dry — it's expressing honest uncertainty, and over many such days it's right about 70% of the time.

Explain like I'm new: A probability is just a fraction of the possibilities that count as a "yes." A die has six equally likely faces; one of them is a 6; so the chance is 1 out of 6, or about 0.17. Count the winning outcomes, divide by all the outcomes, and you have a probability.

2. Distributions

A distribution shows how likely each possible value is. The famous normal distribution (the "bell curve") appears everywhere — heights, test scores, measurement errors — with most values near the average and fewer at the extremes.

Simple example: Most adults are near average height, with very tall and very short people rarer. Plot everyone's height and you get that classic bell shape.

Common mistake: The "gambler's fallacy" — believing that after five heads in a row, tails is "due." A fair coin has no memory; each flip is still 50/50 regardless of history. Confusing what happened before with what comes next is one of the most common ways people misread probability.

Not every distribution is a bell, though, and that matters. Household income is skewed — a long tail of very high earners pulls the average up while most people sit lower. Dice rolls are uniform — every face equally likely, a flat shape. Recognizing the shape of your data tells you which summaries (Module 5) to trust and warns you when the tidy "average" might be hiding the real story.

3. Expected Value

Expected value is the average outcome if you repeated something many times. It's how you compare choices under uncertainty.

  • A game: 50% chance to win $10, 50% to win nothing → expected value = $5 per play.

The trick is to multiply each outcome by its probability and add them up: (0.5 × $10) + (0.5 × $0) = $5. So if that game cost $4 to play, you'd expect to profit over the long run; at $6 it's a losing bet. Expected value doesn't predict any single play — you'll win $10 or nothing — but it tells you what happens on average across many plays, which is exactly how insurers, casinos, and careful decision-makers think. Notice how it neatly combines both ingredients of a decision: how good each outcome is, and how likely it is. A big prize with a tiny chance and a small prize with a near-certain chance can end up with the very same expected value.

Real-world use case: An online store decides whether to offer free returns. Each return costs money, but the probability that free returns win extra sales — times the profit per sale — can outweigh that cost. That's an expected-value calculation driving a real business choice.

4. Why It Matters for Data Science

Probability underpins nearly everything ahead: it's how models express confidence, how we judge whether a pattern is real or luck, and how machine learning makes predictions (Module 28's classifier outputs are probabilities!). Almost every honest data claim is really a probability in disguise — "likely," "rarely," "about a 1-in-5 chance" — and putting a number on that likelihood is what turns vague hunches into decisions you can defend.

Data scientist tip: When a result looks surprising, ask "could this have happened by chance?" Probability is your tool for telling a real signal from random noise — the difference between a discovery and a fluke.

Try this: Flip a coin 10 times and count the heads. It probably won't be exactly 5 — maybe 3 or 7. Now imagine 1,000 flips: the share of heads will hug 50% far more closely. That pull toward the true probability over many trials is the heartbeat of statistics.

Key Takeaway: Probability expresses likelihood from 0 to 1, letting us reason under uncertainty. Distributions (like the bell-shaped normal) show how likely each value is; expected value is the long-run average outcome. Probability is the foundation for judging whether patterns are real and for how machine-learning models express confidence.

Further Learning

Adapted from Microsoft's Data Science for Beginners (MIT License). Sketchnote by Nitya Narasimhan.