15.3 Discrete Random Variables, Probability Distributions, Expectation, and Variance

Key Takeaways

  • A discrete random variable X is defined by its distribution table P(X = x_i) = p_i, satisfying p_i ≥ 0 and ∑ p_i = 1.
  • Hypergeometric H(N, M, n) models sampling without replacement; Binomial B(n, p) models sampling with replacement.
  • Mathematical Expectation E(X) = ∑ x_i p_i represents the long-term mean. Properties: E(aX+b) = aE(X)+b, E(X+Y) = E(X)+E(Y).
  • Variance D(X) = E(X^2) - [E(X)]^2 measures dispersion. Properties: D(aX+b) = a^2 D(X); for independent X,Y, D(X+Y) = D(X)+D(Y).
Last updated: July 2026

15.3 Discrete Random Variables, Probability Distributions, Expectation, and Variance

1. Discrete Random Variables and Distribution Tables

A random variable $X$ is a real-valued function defined on a sample space $\Omega$, assigning a real number $X(\omega)$ to each elementary outcome $\omega \in \Omega$. A random variable is discrete if its set of possible values {$x_1, x_2, \dots, x_n, \dots$} is finite or countably infinite.

1.1 Probability Distribution Table (Distribution Series)

The probability distribution of a discrete random variable $X$ taking values $x_1, x_2, \dots, x_n$ is represented by the table:

$X$$x_1$$x_2$$\dots$$x_n$
$P$$p_1$$p_2$$\dots$$p_n$

where $p_i = P(X = x_i)$.

1.2 Essential Axiomatic Properties

  1. Non-negativity: $p_i \ge 0$ for all $i = 1, 2, \dots, n$.
  2. Normalization: $\sum_{i=1}^n p_i = p_1 + p_2 + \dots + p_n = 1$.

2. Common Discrete Probability Distributions

2.1 Two-Point (Bernoulli) Distribution $B(1, p)$

A random variable $X$ has a 0-1 (Two-point) distribution if it takes only two values, 1 ("Success") and 0 ("Failure"), with probabilities $P(X = 1) = p$ and $P(X = 0) = 1 - p = q$.

2.2 Binomial Distribution $B(n, p)$

When $X$ represents the number of successes in $n$ independent Bernoulli trials with success probability $p$: P(X=k)=Cnkpk(1p)nk,k=0,1,2,,nP(X = k) = C_n^k p^k (1-p)^{n-k}, \quad k = 0, 1, 2, \dots, n

  • Sampling Mechanism: Sampling with replacement from a population containing two types of items.

2.3 Hypergeometric Distribution $H(N, M, n)$

Consider a finite population of $N$ items containing $M$ items of Type I (e.g., defective goods) and $N - M$ items of Type II. If $n$ items are drawn randomly without replacement, the number $X$ of Type I items drawn follows a Hypergeometric distribution, denoted $X \sim H(N, M, n)$: P(X=k)=CMkCNMnkCNn,k=max(0,n(NM)),,min(n,M)P(X = k) = \frac{C_M^k C_{N-M}^{n-k}}{C_N^n}, \quad k = \max(0, n - (N-M)), \dots, \min(n, M)

Key Comparison: Binomial vs. Hypergeometric

  • Hypergeometric: Sampling without replacement from a finite population ($N$). The probability of success changes with each draw.
  • Binomial: Sampling with replacement (or sampling without replacement when population $N \to \infty$ or $N$ is very large relative to sample size $n$, e.g., $n/N < 0.05$).

3. Mathematical Expectation (Mean) of Discrete Random Variables

3.1 Definition

The mathematical expectation (or expected value, mean) of a discrete random variable $X$ with distribution $P(X = x_i) = p_i$ is defined as: E(X)=μ=i=1nxipi=x1p1+x2p2++xnpnE(X) = \mu = \sum_{i=1}^n x_i p_i = x_1 p_1 + x_2 p_2 + \dots + x_n p_n Interpretation: $E(X)$ represents the weighted average outcome or center of mass of the distribution across infinite independent repetitions of the experiment.

3.2 Properties of Expectation

  1. Constant: $E(c) = c$ for any constant $c$.
  2. Linear Transformation: $E(aX + b) = a E(X) + b$ for any constants $a, b$.
  3. Additive Property: For any two random variables $X$ and $Y$, $E(X + Y) = E(X) + E(Y)$ (regardless of independence).
  4. Multiplicative Property: If $X$ and $Y$ are independent, $E(XY) = E(X) E(Y)$.

3.3 Expectations of Standard Distributions

  • Two-point Distribution $B(1, p)$: $E(X) = 1 \cdot p + 0 \cdot (1-p) = p$.
  • Binomial Distribution $B(n, p)$: Expressing $X = \sum_{i=1}^n X_i$ where $X_i \sim B(1, p)$ are independent: E(X)=E(i=1nXi)=i=1nE(Xi)=npE(X) = E\left(\sum_{i=1}^n X_i\right) = \sum_{i=1}^n E(X_i) = n p
  • Hypergeometric Distribution $H(N, M, n)$: E(X)=n×MNE(X) = n \times \frac{M}{N}

4. Variance and Standard Deviation

4.1 Definition

The variance of $X$, denoted by $D(X)$ or $Var(X)$, measures the dispersion or spread of the random variable around its mean $E(X)$: D(X)=E[(XE(X))2]=i=1n(xiE(X))2piD(X) = E\left[ (X - E(X))^2 \right] = \sum_{i=1}^n (x_i - E(X))^2 p_i

Computational Formula (frequently used in calculations): D(X)=E(X2)[E(X)]2=(i=1nxi2pi)[E(X)]2D(X) = E(X^2) - [E(X)]^2 = \left( \sum_{i=1}^n x_i^2 p_i \right) - [E(X)]^2

The standard deviation is $\sigma(X) = \sqrt{D(X)}$.

4.2 Properties of Variance

  1. Non-negativity: $D(X) \ge 0$. $D(X) = 0$ if and only if $X$ is constant with probability 1.
  2. Linear Transformation: $D(aX + b) = a^2 D(X)$ (note that constant shift $b$ does not affect variance).
  3. Additive Property for Independent Variables: If $X$ and $Y$ are independent: D(X+Y)=D(X)+D(Y),D(XY)=D(X)+D(Y)D(X + Y) = D(X) + D(Y), \quad D(X - Y) = D(X) + D(Y)

4.3 Variances of Standard Distributions

  • Two-point Distribution $B(1, p)$: $D(X) = p(1-p) = pq$.
  • Binomial Distribution $B(n, p)$: $D(X) = n p (1-p) = npq$.
  • Hypergeometric Distribution $H(N, M, n)$: D(X)=nMN(1MN)NnN1D(X) = n \frac{M}{N} \left(1 - \frac{M}{N}\right) \frac{N-n}{N-1} (Notice the finite population correction factor $\frac{N-n}{N-1}$ compared to the Binomial variance).

5. Worked Gaokao Exam Examples

Example 1: Hypergeometric vs Binomial Comparison in Batch Inspection

Problem: A batch of 10 electronic components contains 3 defective items and 7 non-defective items.

  1. If 3 components are selected at random without replacement, let $X$ be the number of defective items drawn. Write the probability distribution table of $X$, and calculate $E(X)$ and $D(X)$.
  2. If 3 components are selected at random with replacement, let $Y$ be the number of defective items drawn. Calculate $E(Y)$ and $D(Y)$.

Detailed Solution:

  1. Without Replacement ($X \sim H(10, 3, 3)$): Possible values of $X \in {0, 1, 2, 3}$. Total ways to choose 3 from 10: $C_{10}^3 = \frac{10 \times 9 \times 8}{3 \times 2 \times 1} = 120$.

    • $P(X = 0) = \frac{C_3^0 C_7^3}{120} = \frac{1 \times 35}{120} = \frac{35}{120} = \frac{7}{24}$
    • $P(X = 1) = \frac{C_3^1 C_7^2}{120} = \frac{3 \times 21}{120} = \frac{63}{120} = \frac{21}{40}$
    • $P(X = 2) = \frac{C_3^2 C_7^1}{120} = \frac{3 \times 7}{120} = \frac{21}{120} = \frac{7}{40}$
    • $P(X = 3) = \frac{C_3^3 C_7^0}{120} = \frac{1 \times 1}{120} = \frac{1}{120}$

    Check sum: $\frac{35 + 63 + 21 + 1}{120} = \frac{120}{120} = 1$.

    Expectation $E(X)$: E(X)=0(35120)+1(63120)+2(21120)+3(1120)=0+63+42+3120=108120=910=0.9E(X) = 0 \left(\frac{35}{120}\right) + 1 \left(\frac{63}{120}\right) + 2 \left(\frac{21}{120}\right) + 3 \left(\frac{1}{120}\right) = \frac{0 + 63 + 42 + 3}{120} = \frac{108}{120} = \frac{9}{10} = 0.9 Formula verification: $n \frac{M}{N} = 3 \times \frac{3}{10} = 0.9$.

    Variance $D(X)$: $E(X^2) = 0^2 \left(\frac{35}{120}\right) + 1^2 \left(\frac{63}{120}\right) + 2^2 \left(\frac{21}{120}\right) + 3^2 \left(\frac{1}{120}\right) = \frac{63 + 84 + 9}{120} = \frac{156}{120} = 1.3$. D(X)=E(X2)[E(X)]2=1.3(0.9)2=1.30.81=0.49D(X) = E(X^2) - [E(X)]^2 = 1.3 - (0.9)^2 = 1.3 - 0.81 = 0.49

  2. With Replacement ($Y \sim B(3, 0.3)$): $p = \frac{3}{10} = 0.3$, $n = 3$.

    • $E(Y) = np = 3 \times 0.3 = 0.9$.
    • $D(Y) = np(1-p) = 3 \times 0.3 \times 0.7 = 0.63$.

    Insight: Expectation is identical ($0.9$), but sampling without replacement reduces variance ($0.49 < 0.63$) due to the finite population factor $\frac{10-3}{10-1} = \frac{7}{9} \approx 0.7778$, since $0.63 \times \frac{7}{9} = 0.49$.

Loading diagram...
Workflow for Solving Discrete Random Variable Problems
Test Your Knowledge

A discrete random variable X has probability distribution P(X = -1) = 0.2, P(X = 0) = 0.5, and P(X = 2) = 0.3. What is the mathematical expectation E(X)?

A
B
C
D
Test Your Knowledge

A box contains 8 items, 2 of which are defective. If 3 items are chosen at random without replacement, what is the expected number of defective items selected?

A
B
C
D
Test Your Knowledge

If X ~ B(10, 0.4), what are the expectation E(2X + 3) and variance D(2X + 3) respectively?

A
B
C
D