← Back to course

Math — Mechina

Probability

Summary

A probability is a number between 00 and 11. When all outcomes are equally likely — count: favourable cases over all cases (combinatorics helps here). In stages — a tree: multiply along a branch, add between branches.

P(A)=∣A∣∣Ω∣,P(Aˉ)=1−P(A),P(A∪B)=P(A)+P(B)−P(A∩B),P(A∣B)=P(A∩B)P(B),P(X=k)=(nk)pk(1−p)n−kP(A)=\frac{|A|}{|\Omega|},\qquad P(\bar A)=1-P(A),\qquad P(A\cup B)=P(A)+P(B)-P(A\cap B),\qquad P(A|B)=\frac{P(A\cap B)}{P(B)},\qquad P(X=k)=\binom nk p^k(1-p)^{n-k}

Symbols in the formulas

Ω\Omega
The sample space — all possible outcomes
Aˉ\bar A
The complementary event: AA did not happen
A∩BA\cap B
Both AA and BB
A∪BA\cup B
AA or BB (or both)
P(A∣B)P(A|B)
The probability of AA given that BB happened
n, k, pn,\ k,\ p
In Bernoulli’s formula: the number of trials, the number of successes, the success probability in one trial

Where it comes from: in Bernoulli’s formula each particular order of kk successes and n−kn-k failures has probability pk(1−p)n−kp^k(1-p)^{n-k}, and there are (nk)\binom nk such orders. When adding events subtract the intersection, because it was counted twice.

  • “At least one” — almost always through the complement: 1−P(none)1-P(\text{none}).
  • Independent events: P(A∩B)=P(A)P(B)P(A\cap B)=P(A)P(B).
  • Without replacement the denominator shrinks at each stage: 38⋅27\frac38\cdot\frac27.
  • Expected value: E=∑xipiE=\sum x_ip_i — the long-run average.

Question types

1

Probability trees and conditional probability

An experiment in stages: choose an urn and then a ball, shoot until a hit, a test with mistakes.

Worked example

An urn is chosen at random: urn A has 22 white out of 55, urn B 33 white out of 44. What is the probability of a white ball, and if it is white — what is the chance it came from urn A?

Solution

IdeaA tree: first stage the urn, second the colour. Multiply along a branch, add branches.
  1. Branch A–white: 12⋅25=0.2\frac12\cdot\frac25=0.2.
  2. Branch B–white: 12⋅34=0.375\frac12\cdot\frac34=0.375.
  3. Add: P(white)=0.575P(\text{white})=0.575.
  4. Conditional: P(A∣white)=0.20.575P(A|\text{white})=\frac{0.2}{0.575}.
  5. Compute: ≈0.348\approx0.348.
CheckUrn A is “less white”, so less than a half ✓.
Common mistakeAnswering 25\frac25 — forgetting to divide by P(white)P(\text{white}).
2

Repeated trials (Bernoulli)

The same experiment nn times with the same success probability; the question is about the number of successes.

Worked example

The probability of a hit is 0.20.2, 55 shots. What is the probability of at least one hit?

Solution

Idea“At least one” — through the complement “no hit”.
  1. No hit: 0.850.8^5.
  2. Compute: 0.85=0.327680.8^5=0.32768.
  3. The complement: 1−0.327681-0.32768.
  4. Compute: ≈0.672\approx0.672.
CheckThe expected number of hits is 5⋅0.2=15\cdot0.2=1, so “at least one” is likelier than a half ✓.
Common mistake5⋅0.2=15\cdot0.2=1 — “sure to hit”.

Variants of this type · 1

2.1Exactly kk successes

Worked example

A coin 44 times: exactly 22 heads?

Solution

Idea(42)⋅0.54\binom42\cdot0.5^4.
  1. 616=0.375\frac{6}{16}=0.375.
CheckThe most likely of all kk ✓.
Common mistake0.250.25 — without (42)\binom42.

Practice · 20

Test yourself with problems and full solutions.

Go to practice