AcademyProbability

Academy

Discrete Random Variables

Level 1 - Math II (Physics) topic page in Probability.

Principle

A random variable is a numerical function on outcomes. It turns each outcome in the sample space into a number, so probability questions can be asked about values such as a count, a sum, or a detector reading.

For a discrete random variable, the possible values form a finite or countable support, and probabilities are assigned value by value.

Notation

\(S\)
sample space of possible outcomes
\(s\)
one outcome in S
\(X:S\to\mathbb{R}\)
random variable that assigns a number X(s) to each outcome s
\(x\)
a possible numerical value of X
\(\{X=x\}\)
event consisting of all outcomes s with X(s)=x
\(D_X\)
discrete support: the possible values of X
\(p_X(x)=P(X=x)\)
probability mass function, or PMF
\(p_{X,Y}(x,y)=P(X=x,Y=y)\)
joint distribution of X and Y
\(p_X(x)=\sum_y p_{X,Y}(x,y)\)
marginal distribution of X from a joint table

Method

Step 1: Define the outcome rule

Start with outcomes \(s\in S\), then write the numerical rule \(X(s)\). The event \(X=x\) is not one outcome; it is the set of outcomes that produce the value \(x\).

Value event
\[\{X=x\}=\{s\in S:X(s)=x\}\]
PMF value
\[p_X(x)=P(X=x)\]
Total probability
\[\sum_{x\in D_X}p_X(x)=1\]

Step 2: Build or read a probability table

A probability table lists each supported value and its probability. For two discrete random variables, a joint table lists probabilities for ordered pairs \((x,y)\).

Joint table entries
\[p_{X,Y}(x,y)=P(X=x,Y=y)\]
Marginal over Y
\[p_X(x)=\sum_{y\in D_Y}p_{X,Y}(x,y)\]
Marginal over X
\[p_Y(y)=\sum_{x\in D_X}p_{X,Y}(x,y)\]

Step 3: Add probabilities for requested values

For an interval, sum the PMF over the supported values inside the interval.

Interval event
\[\{a\le X\le b\}=\bigcup_{x\in D_X,\ a\le x\le b}\{X=x\}\]
Disjoint value events
\[P(a\le X\le b)=\sum_{x\in D_X,\ a\le x\le b}p_X(x)\]

Rules

PMF
\[p_X(x)=P(X=x)\]
Discrete total
\[\sum_{x\in D_X}p_X(x)=1\]
Interval probability
\[P(a\le X\le b)=\sum_{x\in D_X,\ a\le x\le b}p_X(x)\]
Marginal distribution
\[p_X(x)=\sum_{y\in D_Y}p_{X,Y}(x,y)\]
Discrete independence
\[p_{X,Y}(x,y)=p_X(x)p_Y(y)\]

Examples

Question
Two fair coins are tossed. Let \(X\) be the number of heads. Find the PMF.
Answer
The outcomes are
\[HH,HT,TH,TT\]
The values are
\[X=2,1,1,0\]
so
\[p_X(0)=\frac{1}{4},\quad p_X(1)=\frac{1}{2},\quad p_X(2)=\frac{1}{4}.\]

Checks

  • \(X=x\) is an event: it collects all outcomes that give the value \(x\).
  • \(X\) is not the outcome itself; it is a function from outcomes to numbers.
  • Every probability in a table must be non-negative.
  • The probabilities in a complete table must sum to \(1\).
  • Independence of discrete random variables must hold for every supported pair \((x,y)\), not just one pair.