Wiki
Intro10 min read

Probability spaces: outcomes, events, and counting

A sample space, a family of events, and a rule for assigning probabilities — then every conditional quantity is just subset arithmetic.

Roll two dice and there are thirty-six ordered outcomes, all equally likely. Ask "what is the chance the total is at least nine?" and you have crossed from arithmetic into probability. The whole subject starts here: name the possible outcomes, collect the ones you care about into an event, and count.

Probability is counting when symmetry decides

When every outcome is equally likely, the probability of an event is just the number of outcomes inside it divided by the total. No formula is needed — the formula is a shortcut for the counting. That is why combinatorics and probability are taught together.

Paint outcomes into event A and event B below. Every probability — union, intersection, conditional, independence — updates from the cell counts.

Two dice, 36 outcomes — paint event A and event B, read the probabilities

P(A)
0.278
P(B)
0.167
P(A ∩ B)
0.111
P(A ∪ B)
0.333
P(A | B)
0.667
P(A)·P(B)
0.046
independence
dependent: intersection differs from the product

With 36 equally likely cells, every probability is just a cell count divided by 36 — no formula needed. Notice that conditioning on B shrinks the universe from 36 cells to the B cells, which is exactly P(A | B) = P(A ∩ B) / P(B). Try making A and B independent by hand, or make B a single cell so P(A | B) collapses to 0 or 1.

The formal setup

A probability space is a triple (Ω,F,P)(\Omega, \mathcal{F}, P):

  • Ω\Omega is the sample space — the set of all possible outcomes. For two dice, ∣Ω∣=36|\Omega| = 36.
  • F\mathcal{F} is a collection of events, each a subset of Ω\Omega, closed under complement and countable union.
  • PP is a function from events to [0,1][0, 1] satisfying three axioms: P(Ω)=1P(\Omega) = 1; P(A)≥0P(A) \ge 0 for every event; and for disjoint events A1,A2,…A_1, A_2, \dots, P(⋃iAi)=∑iP(Ai)P(\bigcup_i A_i) = \sum_i P(A_i).

Everything else is derived. For instance, P(Ac)=1−P(A)P(A^c) = 1 - P(A) follows from AA and AcA^c being disjoint and covering Ω\Omega. The addition rule

P(A∪B)=P(A)+P(B)−P(A∩B)P(A \cup B) = P(A) + P(B) - P(A \cap B)

corrects for the double-counting of the overlap — set it side by side with the widget's readouts.

Conditional probability and independence

Conditioning on BB means restricting attention to the outcomes in BB and re-normalizing:

P(A∣B)=P(A∩B)P(B),P(B)>0.P(A \mid B) = \frac{P(A \cap B)}{P(B)}, \qquad P(B) > 0.

In the widget, P(A∣B)P(A \mid B) is the fraction of B-cells that are also A-cells. Two events are independent when conditioning changes nothing:

P(A∩B)=P(A) P(B)  ⟺  P(A∣B)=P(A).P(A \cap B) = P(A)\,P(B) \iff P(A \mid B) = P(A).

Independence is a statement about the probability measure, not about the sets: mutually exclusive events with positive probability are strongly dependent, because knowing one occurred rules the other out.

Disjoint is not independent

Disjoint (mutually exclusive) means A∩B=∅A \cap B = \emptyset, so P(A∩B)=0P(A \cap B) = 0 and, if both have positive probability, they are dependent. Independence means the opposite: P(A∩B)P(A \cap B) equals the product. Conflating the two is one of the most common errors on exams and in code.

Illustrative vs real

The widget uses two fair dice so the outcomes are visually countable. Real sample spaces are uncountable (all possible sensor readings, all possible sentences), where you cannot list outcomes and instead specify the measure through densities. The set algebra and conditioning rules carry over unchanged; only the counting gets replaced by integration.

Check yourself

Eduspheria wiki · Mathematics for AI, Probability

0 / 5 answered

  1. 1Two fair dice are rolled. What is P(sum is at least 10)? Give the exact decimal.
    Numeric answer
  2. 2A and B are mutually exclusive with P(A) = 0.3 and P(B) = 0.4. What is P(A ∪ B)?
    Multiple choice
  3. 3What is the name of P(A ∩ B) / P(B)?
    Short answer
  4. 4If A and B are independent, then P(A | B) = P(A).
    True / false
  5. 5P(A) = 0.5, P(B) = 0.4 and P(A ∩ B) = 0.2. What is P(A | B)?
    Numeric answer

From the exam paper

Modeled on NITJ AI-501, End-Sem December 2024

0 / 5 answered

  1. 1A fair coin is tossed three times. What is the probability that at least one head appears? Give the exact decimal.
    Numeric answer
  2. 2Two cards are drawn without replacement from a standard 52-card deck. What is the probability that both are diamonds? Give four decimals.
    Numeric answer
  3. 3Two cards are drawn from a 52-card deck. What is the probability that both are diamonds or both are kings? Give four decimals.
    Numeric answer
  4. 4Because no pair of cards can be both two diamonds and two kings, what single term describes these two events?
    Short answer
  5. 5The probability of at least one head in three tosses can be found as one minus the probability of three tails.
    True / false

Where next: random variables — turning outcomes into numbers so we can compute with them.