PracticeVideosBlogFlashcards

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 XX is a real-valued function defined on a sample space Ω\Omega, assigning a real number X(ω)X(\omega) to each elementary outcome ω∈Ω\omega \in \Omega. A random variable is discrete if its set of possible values {x1,x2,…,xn,…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 XX taking values x1,x2,…,xnx_1, x_2, \dots, x_n is represented by the table:

XXx1x_1x2x_2…\dotsxnx_n
PPp1p_1p2p_2…\dotspnp_n

where pi=P(X=xi)p_i = P(X = x_i).

1.2 Essential Axiomatic Properties

  1. Non-negativity: pi≥0p_i \ge 0 for all i=1,2,…,ni = 1, 2, \dots, n.
  2. Normalization: ∑i=1npi=p1+p2+⋯+pn=1\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)B(1, p)

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

2.2 Binomial Distribution B(n,p)B(n, p)

When XX represents the number of successes in nn independent Bernoulli trials with success probability pp:

P(X=k)=Cnkpk(1−p)n−k,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)H(N, M, n)

Consider a finite population of NN items containing MM items of Type I (e.g., defective goods) and N−MN - M items of Type II. If nn items are drawn randomly without replacement, the number XX of Type I items drawn follows a Hypergeometric distribution, denoted X∼H(N,M,n)X \sim H(N, M, n):

P(X=k)=CMkCN−Mn−kCNn,k=max⁡(0,n−(N−M)),…,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 (NN). The probability of success changes with each draw.
  • Binomial: Sampling with replacement (or sampling without replacement when population N→∞N \to \infty or NN is very large relative to sample size nn, e.g., n/N<0.05n/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 XX with distribution P(X=xi)=piP(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)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)=cE(c) = c for any constant cc.
  2. Linear Transformation: E(aX+b)=aE(X)+bE(aX + b) = a E(X) + b for any constants a,ba, b.
  3. Additive Property: For any two random variables XX and YY, E(X+Y)=E(X)+E(Y)E(X + Y) = E(X) + E(Y) (regardless of independence).
  4. Multiplicative Property: If XX and YY are independent, E(XY)=E(X)E(Y)E(XY) = E(X) E(Y).

3.3 Expectations of Standard Distributions

  • Two-point Distribution B(1,p)B(1, p): E(X)=1⋅p+0⋅(1−p)=pE(X) = 1 \cdot p + 0 \cdot (1-p) = p.
  • Binomial Distribution B(n,p)B(n, p): Expressing X=∑i=1nXiX = \sum_{i=1}^n X_i where Xi∼B(1,p)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)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 XX, denoted by D(X)D(X) or Var(X)Var(X), measures the dispersion or spread of the random variable around its mean E(X)E(X):

D(X)=E[(X−E(X))2]=∑i=1n(xi−E(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 σ(X)=D(X)\sigma(X) = \sqrt{D(X)}.

4.2 Properties of Variance

  1. Non-negativity: D(X)≥0D(X) \ge 0. D(X)=0D(X) = 0 if and only if XX is constant with probability 1.
  2. Linear Transformation: D(aX+b)=a2D(X)D(aX + b) = a^2 D(X) (note that constant shift bb does not affect variance).
  3. Additive Property for Independent Variables: If XX and YY are independent: D(X+Y)=D(X)+D(Y),D(X−Y)=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)B(1, p): D(X)=p(1−p)=pqD(X) = p(1-p) = pq.
  • Binomial Distribution B(n,p)B(n, p): D(X)=np(1−p)=npqD(X) = n p (1-p) = npq.
  • Hypergeometric Distribution H(N,M,n)H(N, M, n): D(X)=nMN(1−MN)N−nN−1D(X) = n \frac{M}{N} \left(1 - \frac{M}{N}\right) \frac{N-n}{N-1} (Notice the finite population correction factor N−nN−1\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 XX be the number of defective items drawn. Write the probability distribution table of XX, and calculate E(X)E(X) and D(X)D(X).
  2. If 3 components are selected at random with replacement, let YY be the number of defective items drawn. Calculate E(Y)E(Y) and D(Y)D(Y).

Detailed Solution:

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

    • P(X=0)=C30C73120=1×35120=35120=724P(X = 0) = \frac{C_3^0 C_7^3}{120} = \frac{1 \times 35}{120} = \frac{35}{120} = \frac{7}{24}
    • P(X=1)=C31C72120=3×21120=63120=2140P(X = 1) = \frac{C_3^1 C_7^2}{120} = \frac{3 \times 21}{120} = \frac{63}{120} = \frac{21}{40}
    • P(X=2)=C32C71120=3×7120=21120=740P(X = 2) = \frac{C_3^2 C_7^1}{120} = \frac{3 \times 7}{120} = \frac{21}{120} = \frac{7}{40}
    • P(X=3)=C33C70120=1×1120=1120P(X = 3) = \frac{C_3^3 C_7^0}{120} = \frac{1 \times 1}{120} = \frac{1}{120}

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

    Expectation E(X)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: nMN=3×310=0.9n \frac{M}{N} = 3 \times \frac{3}{10} = 0.9.

    Variance D(X)D(X): E(X2)=02(35120)+12(63120)+22(21120)+32(1120)=63+84+9120=156120=1.3E(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.3−0.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∼B(3,0.3)Y \sim B(3, 0.3)): p=310=0.3p = \frac{3}{10} = 0.3, n=3n = 3.

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

    Insight: Expectation is identical (0.90.9), but sampling without replacement reduces variance (0.49<0.630.49 < 0.63) due to the finite population factor 10−310−1=79≈0.7778\frac{10-3}{10-1} = \frac{7}{9} \approx 0.7778, since 0.63×79=0.490.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

0.4

B

0.5

C

0.6

D

0.8

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

1/4

B

3/8

C

1/2

D

3/4

Test Your Knowledge

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

A

E=11, D=7.8

B

E=11, D=9.6

C

E=7, D=9.6

D

E=11, D=4.8

Sections you finish are checked off in the contents.