Lecture 7

Discrete Random Variables (Part 1)


Grace Tompkins

Last modified — 02 Oct 2026

Learning Outcomes

By the end of this lecture, students are anticipated to be able to:

  • Identify discrete distributions

  • Use the Bernoulli and binomial distributions to solve for probabilities

1 Discrete Random Variables

Discrete Random Variables

We say that a random variable \(X\) is discrete if there exists a countable set \(K = \{x_1,x_2,\dots\}\) such that

\[\mathbb{P}(X \in K) = 1.\]

  • In particular, this means that \(\{x : P(X=x)>0\}\) is countable:

I can count the \(x\) that have positive probability.

  • For discrete RVs, we call the set \(\{x : P(X=x) > 0\}\) the support of \(X\).

Examples of Experiments Described by Discrete Random Variables

  • Toss a fair coin 3 times, count the total number of Heads.

  • Roll a 6-sided die until you see 6, count the number of rolls.

  • Count the number of people that arrive at the bus stop in some amount of time.

  • Will it be rainy (\(-6\)), cloudy (2), or sunny (\(+10\)) on campus today?

Probability Mass Function (PMF)

  • For discrete random variables, we can be explicit about the probability associated with each value in it’s support

For a discrete random variable, its probability (mass) function is the function \(p_X : {\mathbb{R}}\rightarrow [0,1]\) defined by \[p_X(x) = \mathbb{P}(X = x).\]

It is occasionally written \(f_X(x) = \mathbb{P}(X = x).\)

  • Each of the examples of discrete random variables has a PMF. Once we write it down, we know everything there is to know.

A Rainy Day

Suppose it rains 30% of the time, is cloudy but not raining 30% of the time, and sunny 40% of the time.

Your happiness is given by the random variable \(Z\) with \(Z=-6, 2,\) and 10 respectively.

  1. What is the support of \(Z\)?

  2. What is the PMF of \(Z\)?

A Rainy Day

Fair Coins

Toss a fair coin 3 times. Let \(X\) be the number of heads.

  1. What is the support of \(X\)?
  2. What is the \(p_X(x)\)?

Finding Probabilities of Events

The PMF can be used to find the probabilities of events.

We have that for some event \(A\) and a RV \(X\),

\[\mathbb{P}(X \in A) = \sum_{x \in A} p_X(x).\]

Recall: it rains 30% of the time, is cloudy but not raining 30% of the time, and sunny 40% of the time. Your happiness is given by the random variable \(Z\) with \(Z=-6, 2,\) and 10 respectively.

  • Let \(A\) be the event that you are happier than 0. Find \(\mathbb{P}(Z \in A)\).

Another PMF

For a fixed number \(\theta \in [0, 1]\), define a discrete random variable \(X\) with PMF given by:

\[ p_X\left( x;\ \theta\right) =\begin{cases} \left( 1-\theta\right) ^{2} & x=0, \\ 2\theta\left( 1-\theta\right) & x=1, \\ \theta^{2} & x=2, \\ 0 & \mbox{else.} \end{cases} \]

  • Different values of \(\theta\) will give different PMFs.

\[ p_X\left( x;\ \theta = 0.1\right) =\begin{cases} 0.81 & x=0, \\ 0.18 & x=1, \\ 0.01 & x=2 \\ 0 & \mbox{else.} \end{cases} \]

By including a parameter \(\theta\), we are able to express many distributions (a family of distributions) with a single functional form.

2 Discrete families

Bernoulli

An experiment with 2 outcomes (success/failure).

Suppose the probability of success is \(\theta \in (0,1)\). A RV \(X\) with PMF given by

\[p_X(x; \theta) = \theta^x(1-\theta)^{1-x}I_{\{0,1\}}(x),\]

is said to have the \({\mathrm{Bern}}(\theta)\) distribution.

  • If \(\theta = 0.5\), then we have our favourite fair-coin friend.

  • But we can let \(\theta\) be numbers other than 0.5.

Bernoulli

Binomial

Used to determine the number of “successes” (\(x\)) in a sequence of \(n\) independent Bernoulli trials, each with the same probability of success (\(\theta\)).

Suppose the probability of success is \(\theta \in (0,1)\). A RV \(X\) with PMF given by

\[p_X(x; n, \theta) = \binom{n}{x} \theta^x (1-\theta)^{n-x}I_{\{0,1,\dots,n\}}(x),\]

is said to have the \({\mathrm{Binom}}(n, \theta)\) distribution.

Binomial

Using the Binomial

\[p_X(x; n, \theta) = \binom{n}{x} \theta^x (1-\theta)^{n-x}I_{\{0,1,\dots,n\}}(x)\]

  1. Suppose Midterm 1 has 5 True/False questions. What is the probability that you get at least 4 correct answers by random guessing?
  2. Suppose Midterm 1 has 2 multiple choice questions with 5 options. What is the probability that you get both correct by random guessing?

Using the Binomial

Checkpoint 2

You may have:

  • HANDWRITTEN Cheat Sheet

  • Non-graphing calculator

  • Writing materials

Phones and laptops put away, please! You can have 15 minutes.