2026-08-07-Preview · Probability Theory Ch4 Random Variables(随机变量)

Ref: Lecture slides Ch4 · Ross Ch4 Random Variables

Key Concepts

TermDefinition
Random variable(随机变量)A real-valued function defined on the sample space
pmf(概率质量函数); for a discrete r.v.
CDF(累积分布函数)
Expectation(期望);
Variance(方差);
Bernoulli / Binomial(伯努利 / 二项); ,
Poisson(泊松); ; approximates Binomial when large, small
Geometric / Negative Binomial(几何 / 负二项); , ; neg. bin. ,

Per-Subsection: Definition & Examples

4.1 Random Variables(随机变量)

Definition

A random variable is a real-valued function on the sample space: we are interested in a function of the outcome (e.g. the sum of two dice, the number of heads) rather than the outcome itself.

Example: exam until you pass(考试直到通过)— pass with proba each independent trial; = number of exams needed.

  • ;
  • — probabilities sum to 1, a valid distribution.

4.2 Discrete Random Variables(离散随机变量)

Definition

is discrete if it takes at most countably many values. Its pmf is , with and . Its CDF is .

Example: .

  • CDF is a step function: , , , ;
  • If , then (normalization), , .

4.3 Expected Value(期望)

Definition

— the weighted average of the possible values, weighted by probability.

Example: asking someone out(要不要表白)— happiness if accepted (proba 0.1), if rejected.

  • → expected happiness is positive, ask them out;
  • fair die: .

4.4 Expectation of a Function(函数的期望)

Definition

If , then .

Corollary: .

Example: uniform on , :

  • — compute via pmf of , not by guessing the pmf of .

4.5 Variance(方差)

Definition

; ; .

Example: fair die — , , so

4.6 Bernoulli & Binomial(伯努利与二项分布)

Definition

Bernoulli: (success) w.p. , w.p. ; , .

Binomial: counts successes in independent trials:

Example: friend claims to taste Pepsi vs Coke(盲测)— 5 trials, 4 correct. If guessing randomly, :

  • ;
  • Not convincing evidence — 18.75% chance of getting 4+ right by luck(统计显著性直觉).

4.7 Poisson(泊松分布)

Definition

(); .

Poisson ≈ Binomial when is large and small with — “rare events in many trials”.

Example: 50 misprints in a 250-page book(书中的错字)— per page.

  • ;
  • .

4.8 Geometric & Negative Binomial(几何与负二项分布)

Definition

Geometric: number of trials until first success, ; memoryless property ; , .

Negative binomial: trials until -th success, ; , .

Example: collecting pictures(集齐球星卡)— where :

  • ;
  • : ; : — collecting takes much longer than intuition suggests.