Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 37 ยท Probability Basics

The Probability Scale and the Basic Rule

Learn what probability means, how to place events on the 0 to 1 scale, and how to calculate the probability of an event with equally likely outcomes.

Statistics describes data you have; probability measures how likely something is before it happens. Will it rain tomorrow? Will a coin land heads? Probability puts a number on uncertainty, and it is the foundation for judging whether a pattern in data is meaningful or just luck.

Key words

  • An experiment (or trial) is an action with an uncertain result: tossing a coin, rolling a die, drawing a card.
  • An outcome is one possible result: "heads", "a 4", "the queen of spades".
  • An event is a collection of outcomes you care about: "an even number", "a red card".

The probability scale

Probability is a number from 0 to 1 (you may also write it as a fraction, decimal or percentage).

Value Meaning Example
0 Impossible Rolling a 7 on a standard six-sided die
0.5 (1/2, 50%) Even chance A fair coin landing heads
1 Certain A standard die showing a number from 1 to 6
flowchart LR
  A["0<br/>impossible"] --- B["0.25<br/>unlikely"] --- C["0.5<br/>even chance"] --- D["0.75<br/>likely"] --- E["1<br/>certain"]

The probability scale. No probability can be below 0 or above 1.

If you ever calculate a probability of 1.3 or โˆ’0.2, you have made an error.

The basic rule

When all outcomes are equally likely:

P(event) = (number of outcomes in the event) / (total number of possible outcomes)

P(A) is read "the probability of A".

Example: a fair six-sided die is rolled. What is the probability of an even number? The event "even" contains 3 outcomes (2, 4, 6) out of 6 possible, so P(even) = 3/6 = 1/2.

Python Probabilities for one die roll

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Fraction keeps exact fractions, which is better than decimals for probability homework: write 1/3, not 0.333, unless the question asks for a decimal.

Cards, spinners and bags

The same rule works for any equally likely set.

  • A standard deck has 52 cards: 4 suits (13 cards each), 12 face cards (jack, queen, king in each suit) and 4 aces. P(heart) = 13/52 = 1/4.
  • A bag has 3 red, 5 blue and 2 green counters. Drawing one at random: P(blue) = 5/10 = 1/2.
  • A spinner split into 8 equal sectors with 3 shaded: P(shaded) = 3/8.

"Equally likely" is essential. A spinner with sectors of different sizes, or a weighted die, breaks the rule. A common mistake is to say "either it rains or it doesn't, so the chance is 50%". Two outcomes are not necessarily equally likely.

Python Probabilities from a bag

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The probabilities of all the possible outcomes add to 1, because something must happen.

Words, fractions and percentages

Convert freely: 3/8 = 0.375 = 37.5%. In words: impossible, unlikely, even chance, likely, certain. "Unlikely" usually means below 0.5 and "likely" above 0.5, but words are vague, so the number is better.

Expected number of occurrences

If an event has probability p and you repeat the experiment n times, you expect about n ร— p occurrences. For 120 rolls of a die, expect about 120 ร— 1/6 = 20 sixes. It is an expectation, not a promise. Real results vary around it.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A fair die is rolled. What is P(a number less than 3)?

    The outcomes 1 and 2 qualify, so the probability is 2/6 = 1/3.
  2. 2. Which cannot be a probability?

    Probabilities lie between 0 and 1 inclusive, and 1.2 is above 1.
  3. 3. A bag has 4 red and 6 yellow counters. What is P(red)?

    There are 4 red out of 10 counters, so 4/10 = 2/5.
  4. 4. You roll a fair die 300 times. About how many threes do you expect?

    300 ร— 1/6 = 50.

Summary

  • Probability runs from 0 (impossible) to 1 (certain) and can be written as a fraction, decimal or percentage.
  • For equally likely outcomes, P(event) = favorable outcomes / total outcomes.
  • The probabilities of all outcomes add to 1.
  • The expected number of occurrences is n ร— p; actual results vary.

Next: Sample Spaces and Counting Outcomes