mindstair

Home / Courses / Introductory Statistics / Unit 4

Introductory Statistics Unit 4: Random variables & distributions

A random variable assigns a number to each outcome of a chance process. Its distribution tells you the possible values and how likely each one is.

Covers: Discrete & continuous random variables, expected value, binomial distribution

Study guide

A random variable assigns a number to each outcome of a random process. Discrete random variables take countable values (number of heads) and are described by a probability distribution listing each value and its probability, with probabilities adding to 1. Continuous random variables take any value in an interval (time, height), and probabilities are areas under a density curve, so P(X = exact value) = 0.

The expected value (mean) of a discrete random variable is E(X) = Σ x·P(x), the long-run average. Its variance is Σ (x − μ)²·P(x), and the standard deviation is the square root. For linear transformations Y = a + bX, the mean becomes a + bμ and the standard deviation becomes |b|σ. For sums or differences of independent random variables, means add or subtract, but variances always add: Var(X ± Y) = Var(X) + Var(Y).

A binomial setting has four conditions (BINS): Binary outcomes (success or failure), Independent trials, a fixed Number of trials n, and the Same probability of success p each trial. Then P(X = k) = C(n, k)pᵏ(1 − p)ⁿ⁻ᵏ, with mean np and standard deviation √(np(1 − p)). Use technology (binompdf/binomcdf) for cumulative probabilities like P(X ≤ 3).

A geometric random variable counts trials until the first success, with P(X = k) = (1 − p)ᵏ⁻¹p and mean 1/p.

A geometric random variable has standard deviation √(1 − p)/p, and P(X > k) = (1 − p)ᵏ, because the first k trials must all be failures. If an observed outcome would be very unlikely, with a probability below about 5%, when an assumed probability is true, that is convincing evidence against the assumption. A likely outcome gives no such evidence.

If X and Y are independent and normal, X + Y and X − Y are also normal. After finding their mean and standard deviation, compute probabilities with z-scores. The standard deviation of a random variable describes how far outcomes typically are from the mean, over many repetitions.

Key ideas

Formulas and rules

E(X) = Σ x·P(x)
Binomial: P(X = k) = C(n, k)·pᵏ·(1 − p)ⁿ⁻ᵏ
Binomial mean np, SD √(np(1 − p))
Var(X ± Y) = Var(X) + Var(Y) (independent)

Common mistakes

Words to know

Expected value of a discrete random variable
E(X) = Σ x·P(x)
Binomial conditions (BINS)
Binary outcomes, Independent trials, fixed Number of trials, Same success probability.
Binomial probability formula
P(X = k) = C(n, k)·pᵏ·(1 − p)ⁿ⁻ᵏ
Mean and SD of a binomial
Mean = np, SD = √(np(1 − p))
Variance of a difference
Var(X − Y) = Var(X) + Var(Y) for independent X, Y.
Linear transformation of a random variable
For Y = a + bX: mean becomes a + b·mean, SD becomes |b|·SD.
Random variable
A numerical outcome of a random process.
Discrete random variable
Takes countable values, each with a probability.
Continuous random variable
Takes any value in an interval; probabilities are areas under a density curve.
Standard deviation of a random variable
√Σ (x − μ)²P(x)
Mean of a sum or difference
μ(X ± Y) = μX ± μY
Geometric random variable
Counts trials until the first success; mean 1/p.
Binomial random variable
Counts successes in n independent trials with the same p.

Sample practice questions

37 more questions like these, from level 1 to 5, are in the practice set.

Question 1 (level 1)

X = 0, 1, 2 with probabilities 0.2, 0.5, 0.3. Find E(X).

  1. 1
  2. 0.9
  3. 1.5
  4. 1.1
Show the answer and steps

Answer: D) 1.1

  1. E(X) = Σ x·P(x).
  2. 0(0.2) + 1(0.5) + 2(0.3) = 1.1.
Question 2 (level 2)

Binomial with n = 10, p = 0.3. Mean?

  1. 2.1
  2. 0.3
  3. 7
  4. 3
Show the answer and steps

Answer: D) 3

  1. Binomial mean = np.
  2. 10 × 0.3 = 3.
Question 3 (level 3)

Same binomial. Standard deviation?

  1. 0.46
  2. ≈ 1.45
  3. 3
  4. 2.1
Show the answer and steps

Answer: B) ≈ 1.45

  1. SD = √(np(1 − p)).
  2. √(10 × 0.3 × 0.7) = √2.1 ≈ 1.45.