Skip to main content

Introduction to Probability

Overview

This lecture introduces the fundamental concepts of probability theory and their applications in computer science.

Prerequisites Note

Prerequisites

This course builds on concepts from ECS 020: Discrete Mathematics for Computer Science. We'll be using set theory throughout the course—concepts like sets, subsets, unions (\cup), intersections (\cap), and complements. If these ideas feel unfamiliar, we encourage you to review your ECS 020 notes or the set theory sections in your discrete math textbook.

Topics

  • What is probability?
  • Sample spaces and events
  • Probability axioms (Kolmogorov axioms)
  • Basic probability calculations

Key Definitions

Def. (Experiment)

A procedure or process that yields observations or outcomes.

Def. (Sample Space)

The set of all possible outcomes of an experiment. Denoted by SS or Ω\Omega.

Def. (Event)

A subset of the sample space. An event ASA \subseteq S is a collection of possible outcomes.

Def. (Outcome)

A single result from an experiment. Each outcome is an element of the sample space.

Def. (Probability Measure)

A probability measure PP is a function that assigns a real number to each event in the sample space, satisfying the Kolmogorov Axioms:

  1. Non-negativity: P(A)0P(A) \geq 0 for all events AA
  2. Normalization: P(S)=1P(S) = 1 where SS is the sample space
  3. Additivity (Countable Additivity): For mutually exclusive events AA and BB (i.e., AB=A \cap B = \emptyset), we have P(AB)=P(A)+P(B)P(A \cup B) = P(A) + P(B)

More generally, for any countable collection of mutually exclusive events A1,A2,A_1, A_2, \ldots: P(i=1Ai)=i=1P(Ai)P\left(\bigcup_{i=1}^{\infty} A_i\right) = \sum_{i=1}^{\infty} P(A_i)

These axioms, formulated by Andrey Kolmogorov in 1933, form the foundation of modern probability theory.

Set Operations for Events

Def. (Union of Events)

The union of events AA and BB, denoted ABA \cup B, is the event that occurs when either AA or BB (or both) occur. In set notation: AB={sS:sA or sB}A \cup B = \{s \in S : s \in A \text{ or } s \in B\}.

Def. (Intersection of Events)

The intersection of events AA and BB, denoted ABA \cap B, is the event that occurs when both AA and BB occur. In set notation: AB={sS:sA and sB}A \cap B = \{s \in S : s \in A \text{ and } s \in B\}.

Def. (Complement of an Event)

The complement of event AA, denoted AcA^c or Aˉ\bar{A}, is the event that AA does not occur. In set notation: Ac={sS:sA}A^c = \{s \in S : s \notin A\}.

Property: P(Ac)=1P(A)P(A^c) = 1 - P(A)

Def. (Mutually Exclusive Events)

Events AA and BB are mutually exclusive (or disjoint) if they cannot both occur simultaneously. Formally: AB=A \cap B = \emptyset.

For mutually exclusive events: P(AB)=P(A)+P(B)P(A \cup B) = P(A) + P(B)

Applications in Computer Science

  • Algorithm analysis (average-case complexity)
  • Machine learning (probabilistic models)
  • Network protocols (packet delivery)
  • Cryptography (security guarantees)
  • Data science (statistical inference)

Lecture slides and additional materials will be posted on Canvas.