How Probability Works -- Basic Rules, Formulas, and Common Problems Solved

Learn how probability works with clear rules, formulas, and worked examples covering dice, cards, coins, and the birthday problem.

Probability is a measure of how likely an event is to occur, expressed as a number between 0 (impossible) and 1 (certain), or equivalently as a percentage between 0% and 100%. Understanding probability is essential for making informed decisions under uncertainty, from evaluating medical test results to assessing financial risk.

Quick Answer

Basic formula: P(A) = Favorable outcomes / Total possible outcomes

A fair die has 6 faces. The probability of rolling a 4 is 1/6 = 16.7%. The probability of rolling an even number (2, 4, or 6) is 3/6 = 50%. Use the probability calculator to compute probabilities for common scenarios.

The Five Core Rules

Every probability problem uses one or more of these rules.

Rule 1: Complement

P(not A) = 1 - P(A)

The probability that something does not happen equals one minus the probability that it does. This rule is particularly useful when "at least one" appears in a problem.

Example: The probability of rain tomorrow is 0.3. The probability of no rain is 1 - 0.3 = 0.7 (70%).

Rule 2: Addition (Mutually Exclusive Events)

P(A or B) = P(A) + P(B)

When two events cannot happen simultaneously, add their probabilities directly.

Example: Rolling a standard die, P(1 or 6) = 1/6 + 1/6 = 2/6 = 1/3 (33.3%).

Rule 3: Addition (Non-Mutually Exclusive Events)

P(A or B) = P(A) + P(B) - P(A and B)

When events can overlap, subtract the double-counted intersection.

Example: In a standard 52-card deck, what is the probability of drawing a heart or a king?

P(heart) = 13/52. P(king) = 4/52. P(king of hearts) = 1/52.

P(heart or king) = 13/52 + 4/52 - 1/52 = 16/52 = 4/13 (30.8%)

Rule 4: Multiplication (Independent Events)

P(A and B) = P(A) x P(B)

When one event does not affect the other, multiply their probabilities.

Example: Flipping two fair coins. P(both heads) = 1/2 x 1/2 = 1/4 (25%).

Rule 5: Multiplication (Dependent Events)

P(A and B) = P(A) x P(B|A)

When the first event changes the conditions for the second, use conditional probability.

Example: Drawing two aces from a deck without replacement.

P(first ace) = 4/52. After removing one ace, P(second ace) = 3/51.

P(both aces) = 4/52 x 3/51 = 12/2652 = 1/221 (0.45%)

Worked Example 1: Rolling a Die

A standard six-sided die has faces numbered 1 through 6, each equally likely.

Event Favorable outcomes Probability
Rolling a 6 1 1/6 = 16.7%
Rolling an even number 3 (2, 4, 6) 3/6 = 50.0%
Rolling greater than 4 2 (5, 6) 2/6 = 33.3%
NOT rolling a 6 5 (1, 2, 3, 4, 5) 5/6 = 83.3%

Two dice: What is the probability of rolling a sum of 7 with two dice?

There are 6 x 6 = 36 total outcomes. The pairs summing to 7 are: (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) -- six favorable outcomes.

P(sum = 7) = 6/36 = 1/6 (16.7%)

A sum of 7 is the most probable sum with two dice. Try the dice roller to simulate thousands of rolls.

Worked Example 2: Drawing Cards

A standard deck has 52 cards: 4 suits x 13 ranks.

P(ace) = 4/52 = 1/13 = 7.69%

P(ace then king, without replacement):

P = (4/52) x (4/51) = 16/2652 = 0.60%

P(ace then king, with replacement):

P = (4/52) x (4/52) = 16/2704 = 0.59%

The difference is small with one draw removed from 52, but it grows with more draws or smaller decks. With replacement, events are independent; without replacement, they are dependent.

Worked Example 3: Coin Flips

A fair coin has P(heads) = P(tails) = 0.5.

P(3 heads in a row):

P = (1/2)^3 = 1/8 = 12.5%

P(at least one head in 3 flips):

Using the complement rule: P(at least one head) = 1 - P(no heads) = 1 - P(3 tails) = 1 - (1/2)^3 = 1 - 0.125 = 87.5%

P(at least one head in 10 flips):

P = 1 - (1/2)^10 = 1 - 1/1024 = 99.90%

The complement rule makes "at least one" problems much simpler than counting every possible case. Simulate this with the coin flip tool.

Worked Example 4: The Birthday Problem

Question: How many people do you need in a room for a greater than 50% chance that at least two share a birthday?

Answer: Just 23 people. This result surprises most people because they intuitively compare one person against the group rather than considering all possible pairs.

The math: With 23 people, there are C(23, 2) = 253 distinct pairs. Calculate the probability that no two people share a birthday (ignoring leap years, assuming 365 equally likely birthdays):

P(no match) = (365/365) x (364/365) x (363/365) x ... x (343/365)

P(no match) = 365! / (342! x 365^23) = 0.4927

P(at least one match) = 1 - 0.4927 = 0.5073 (50.7%)

People in room P(shared birthday)
10 11.7%
23 50.7%
30 70.6%
50 97.0%
70 99.9%

By 50 people, a shared birthday is almost certain. This has practical implications for hash collisions in computer science and duplicate detection systems.

Common Probability Mistakes

The Gambler's Fallacy

The mistaken belief that past random outcomes influence future ones. After flipping 10 heads in a row, many people feel tails is "due." But a fair coin has no memory -- the next flip is still 50/50. Each flip is an independent event.

This fallacy is documented in casino behavior: roulette players often bet against long streaks, even though each spin is independent of all previous spins.

Ignoring Base Rates

A medical test is 99% accurate. You test positive. What is the probability you have the disease?

It depends on how common the disease is. If 1 in 10,000 people have the disease:

  • Out of 10,000 people: 1 truly has the disease (tests positive, 99% chance) and 9,999 do not (but about 100 test positive as false positives at a 1% false positive rate).
  • Total positives: roughly 101. True positives: 1.
  • P(disease | positive test) = 1/101 = less than 1%

This is Bayes' theorem in action. Ignoring the base rate leads to dramatic overestimates of risk.

Confusing P(A|B) with P(B|A)

P(positive test | disease) is not the same as P(disease | positive test). The test accurately detects the disease (99%), but most positive tests are false positives when the disease is rare. This confusion, called the prosecutor's fallacy, has caused real miscarriages of justice.

Key Probability Distributions

Beyond basic counting, many real-world scenarios follow standard probability distributions:

  • Binomial: The number of successes in n independent yes/no trials. Example: the number of heads in 10 coin flips.
  • Normal (Gaussian): The bell curve. Describes heights, test scores, measurement errors. About 68% of values fall within one standard deviation of the mean.
  • Poisson: The number of events in a fixed interval. Example: the number of emails received per hour.

The probability distribution visualizer lets you explore these distributions interactively.

Combinations and Permutations

Counting outcomes correctly is the foundation of probability.

Permutations (order matters): P(n, k) = n! / (n - k)!

Example: How many ways can 3 people finish a race out of 8 runners? P(8, 3) = 8! / 5! = 8 x 7 x 6 = 336

Combinations (order does not matter): C(n, k) = n! / (k! x (n - k)!)

Example: How many ways can you choose 3 people from a group of 8? C(8, 3) = 336 / 6 = 56

Use the combination calculator and permutation calculator for larger numbers.

Frequently Asked Questions

What does a probability of 0.5 mean?

A probability of 0.5 (or 50%) means the event is equally likely to happen or not happen. A fair coin has a 0.5 probability of landing heads on any single flip.

How do I calculate the probability of multiple events?

For independent events happening together (AND), multiply their probabilities: P(A and B) = P(A) x P(B). For either event happening (OR), add them and subtract the overlap: P(A or B) = P(A) + P(B) - P(A and B).

What is the gambler's fallacy?

The gambler's fallacy is the mistaken belief that past random outcomes affect future ones. After flipping 10 heads in a row with a fair coin, the probability of heads on the next flip is still 50%. The coin has no memory of previous flips.

How does the birthday problem work?

The birthday problem asks how many people are needed for a 50% chance that two share a birthday. The answer is just 23. With 23 people there are 253 possible pairs, and the probability that all birthdays differ is about 49.3%, so P(at least one match) = 50.7%.

What is the difference between independent and dependent events?

Independent events do not affect each other's probabilities. Rolling a die twice is independent. Dependent events change the conditions: drawing two cards without replacement is dependent because removing the first card changes the deck.

What is conditional probability?

Conditional probability is the probability of event A given that event B has already occurred, written P(A|B). It equals P(A and B) / P(B). For example, P(king | face card) = 4/12 = 1/3, because there are 12 face cards and 4 of them are kings.

Can probability be greater than 1?

No. Probability is always between 0 and 1 inclusive. If a calculation gives a value greater than 1, there is an error -- typically from adding probabilities of overlapping events without subtracting the intersection.

What is the probability of rolling a 6 on a standard die?

The probability is 1/6 = approximately 0.1667 or 16.67%. A standard die has six equally likely faces. Over many rolls, a 6 will appear about once every six rolls on average.

How do permutations differ from combinations in probability?

Permutations count ordered arrangements (a 3-digit PIN where 123 differs from 321). Combinations count unordered selections (choosing 3 team members where order does not matter). Use P(n,k) = n!/(n-k)! for permutations and C(n,k) = n!/(k!(n-k)!) for combinations.

What is Bayes' theorem?

Bayes' theorem updates the probability of a hypothesis based on new evidence: P(A|B) = P(B|A) x P(A) / P(B). It is essential in medical testing (adjusting for base rates), spam filtering, and machine learning. It corrects the common error of confusing P(A|B) with P(B|A).

Related Tools