2.2 Discrete Random Variables

2.2.1 Objectives

By the end of this unit, students will be able to:

  • Use probability rules to compute the probability of different types of events.
  • Distinguish between marginal probability and conditional probability.
  • Apply the multiplication rule to compute probabilities when sampling with/without replacement from finite populations.
  • Define random variables.
  • Compute expectation and variance of discrete random variables.

2.2.2 Overview

A random variable (r.v.) is a numerical value that represents the outcome of a random process.
It translates uncertain outcomes—such as coin tosses, die rolls, or survey responses—into numerical values suitable for analysis.

We denote a random variable by a capital letter (e.g., X) and its observed values by lowercase letters (e.g., x).
Random variables are generally classified as:

Type Description Examples
Discrete random variable Takes on countable values (integers) from a finite or countably infinite set. Number of heads in three coin tosses (X = 0, 1, 2, 3)
Number of defective items in a batch
Continuous random variable Takes on infinitely many values in an interval on the real line. Temperature, weight, reaction time

Probability Distribution of a Discrete Random Variable

A probability distribution assigns probabilities to each possible value of X such that:

\[ 0 \leq P(X=x_i) \leq 1, \quad \text{and} \quad \sum_i P(X=x_i) = 1 \]

This distribution can be represented in a table or a probability histogram.

Image suggestion from PDF: Insert probability table and bar plot of discrete outcomes
(see Chapter 3 pp. 55–57, where probabilities of card-game winnings are tabulated).

Example:

X (Value) 1 5 10 0
P(X) 12/52 4/52 1/52 35/52

Expected Value (Mean)

The expected value or mean of a discrete random variable provides the long-run average outcome if the random experiment were repeated indefinitely.

\[ \mu = E(X) = \sum_i x_i P(X=x_i) \]

This is a weighted average where each value is multiplied by its probability.
In the card-game example (drawing from a deck of 52 cards):

\[ E(X) = 1\left(\frac{12}{52}\right) + 5\left(\frac{4}{52}\right) + 10\left(\frac{1}{52}\right) + 0\left(\frac{35}{52}\right) \approx 0.81 \]

Interpretation: On average, you expect to win about $0.81 per game in the long run.

Image suggestion from PDF: Add bar chart illustrating E(X) with expected value line (pg. 57).


Variance and Standard Deviation

While the mean measures central tendency, the variance and standard deviation quantify the spread of possible outcomes around the mean.

\[ Var(X) = \sum_i (x_i - \mu)^2 P(X=x_i) \] \[ SD(X) = \sqrt{Var(X)} \]

Using the same example,
\[ Var(X) = 3.4246 \quad \text{and} \quad SD(X) \approx 1.85 \]

This means the winnings typically fluctuate by about $1.85 from the expected mean.

Image suggestion from PDF: Insert table showing X, P(X), (X – E[X])², P(X)(X – E[X])² (pp. 58–61).


Key Insights

  • A discrete random variable connects random outcomes to numerical measures of probability.
  • The probability distribution provides the complete description of its behavior.
  • The expected value (E[X]) gives the average result over many repetitions.
  • The variance and standard deviation measure the variability in those results.

Together, these concepts form the foundation for probability models, sampling theory, and inferential statistics.


2.2.3 Knowledge Check

Exercise: Profit from crop yield under different weather conditions (X).

  1. Determine the missing probability in the following distribution.
Weather Profit ($) Probability
Dry 200,000 0.30
Light Rain 300,000 0.50
Storm 150,000 ?
  1. Find the expected profit from this crop, \(\mu\).
\(x_i\) \(P(x_i)\) \(x_i P(x_i)\)
200,000 0.30 \(200,000 \times 0.30\)
300,000 0.50 \(300,000 \times 0.50\)
150,000 ? \(150,000 \times ?\)
  1. Find the variance, \(\sigma^2\) and the standard deviation, \(\sigma\).
\(x_i\) \(P(x_i)\) \(\mu\) \((x_i - \mu)\) \((x_i - \mu)^2\) \((x_i - \mu)^2 P(x_i)\)
200,000 0.30
300,000 0.50
150,000 ?

The standard deviation is \(\sigma\) = ________________

  1. Interpret the value of the expected profit, \(\mu\).

Example/Exercise: 40% of all voters support Proposition A. If a random sample of 10 voters is polled. Find the following probabilities.

Formula for the probability of exactly \(x\) successes from \(n\) trials

\[ p(x) = \binom{n}{x} p^x q^{n-x} = \frac{n!}{(n-x)!x!} p^x q^{n-x}; \quad \text{where } x = 0, 1, 2, \ldots, n \]

and

\[ n! = n(n-1)(n-2) \cdots (3)(2)(1) \]

2.2.4 Solved Exercises

Exercise 1: 30% of all households subscribe to an online movie service. If a random sample of 12 households is chosen, find the following probabilities.

  1. What is the probability that exactly four of them subscribe to the service?

Using the binomial probability formula: \[ P(X = k) = \binom{n}{k} p^k (1-p)^{n-k} \] where \(n = 12\), \(k = 4\), and \(p = 0.3\).

\[ \begin{aligned} P(X=4)&=\frac{12!}{(12-4)!4!}(0.3)^4(0.7)^{8} \\ &=\frac{12!}{8!4!}(0.3)^4(0.7)^8 \\ &=(495)(0.0081)(0.0576) \\ &=0.230 \end{aligned} \]

  1. What is the probability that four or five of them subscribe to the service?

\[ \begin{aligned} P(X=4)+P(X=5)&=0.230+\frac{12!}{(12-5)!5!}(0.3)^5(0.7)^{7} \\ &=0.230+(792)(0.00243)(0.0824) \\ &=0.230+0.158 \\ &=0.388 \end{aligned} \]

  1. What is the probability that at least two of them subscribe to the service?

\[ \begin{aligned} P(X \ge 2) &= 1-[P(X=0)+P(X=1)] \\ &=1-\Big[\frac{12!}{0!12!}(0.3)^0(0.7)^{12}+\frac{12!}{1!11!}(0.3)^1(0.7)^{11}\Big] \\ &=1-[1(0.01384)+12(0.3)(0.01977)] \\ &=1-[0.01384+0.0712] \\ &=1-0.085 = 0.915 \end{aligned} \]


Exercise 2: A smartphone manufacturer claims that 92% of its devices last at least four years without repair. Suppose we contact 10 randomly selected purchasers four years after their purchase and ask: Did your phone require repair during the first 4 years?

  1. Find the probability that exactly 8 customers needed at least one repair during the first 4 years.

\[ \begin{aligned} P(X=8)&=\frac{10!}{(10-8)!8!}(0.08)^8(0.92)^{2} \\ &=\frac{10!}{2!8!}(0.08)^8(0.92)^2 \\ &=(45)(0.00000001678)(0.8464) \\ &=0.000000639 \end{aligned} \]

  1. Find the probability that at least 8 purchasers needed at least one repair during the first 4 years.

\[ \begin{aligned} P(X \ge 8)&=P(X=8)+P(X=9)+P(X=10) \\ &=0.000000639+\frac{10!}{(10-9)!9!}(0.08)^9(0.92)^1+\frac{10!}{(10-10)!10!}(0.08)^{10}(0.92)^0 \\ &=0.000000639+(10)(0.00000000134)(0.92)+(1)(0.0000000001074) \\ &=0.000000639+0.0000000123+0.0000000001 \\ &\approx 0.000000651 \end{aligned} \]


Exercise 3: Annual profit from a solar energy project (X) depends on weather conditions.

  1. Determine the missing probability in the following distribution.
Weather Profit ($) Probability
Sunny 250,000 0.40
Cloudy 200,000 0.35
Rainy 100,000 ?

Since total probability = 1,
\(P(\text{Rainy}) = 1 - (0.40 + 0.35) = 0.25\).

  1. Find the expected profit, \(\mu\).

\[ \begin{aligned} \mu &= \sum{x_i P(x_i)} \\ &= 250,000(0.4) + 200,000(0.35) + 100,000(0.25) \\ &= 100,000 + 70,000 + 25,000 \\ &= \$195,000 \end{aligned} \]

  1. Find the variance, \(\sigma^2\), and the standard deviation, \(\sigma\).

\[ \begin{aligned} \sigma^2 &= \sum(x_i-\mu)^2P(x_i) \\ &= (250,000-195,000)^2(0.4) + (200,000-195,000)^2(0.35) + (100,000-195,000)^2(0.25) \\ &= (55,000)^2(0.4) + (5,000)^2(0.35) + (-95,000)^2(0.25) \\ &= (3.025\times10^9)(0.4) + (2.5\times10^7)(0.35) + (9.025\times10^9)(0.25) \\ &= 1.21\times10^9 + 0.00875\times10^9 + 2.26\times10^9 \\ &= 3.48\times10^9 \end{aligned} \]

\[ \sigma = \sqrt{3.48\times10^9} = 59,000 \]

  1. Interpret the value of \(\mu\).

The expected profit represents the long-run average return if the same solar project were undertaken many times under similar weather patterns — approximately $195,000 per year.