docs

Lesson 1: Random Variables

Introduction to random variables, discrete and continuous.

Lesson 1: Random Variables

Definition

A random variable is a function that assigns a real number to each outcome in the sample space of a random experiment.

Types of Random Variables

  1. Discrete Random Variables: Take on a countable number of distinct values (e.g., number of heads in 3 coin tosses).
  2. Continuous Random Variables: Take on an infinite number of possible values (e.g., height of a person).

Probability Mass Function (PMF)

For a discrete random variable XX, the PMF is defined as: P(X=x)=p(x)P(X = x) = p(x) where p(x)0p(x) \ge 0 and p(x)=1\sum p(x) = 1.

Expectation

The expectation (or mean) of a discrete random variable XX is: E[X]=xp(x)E[X] = \sum x \cdot p(x)