Solved Exercises on Discrete Random Variables

Master discrete random variables: probability distributions, expected value, variance, and applications through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Probability Distribution Verification
Exercise 1
A discrete random variable X has the probability distribution: P(X=1)=0.2, P(X=2)=0.3, P(X=3)=0.25, P(X=4)=0.15, P(X=5)=0.1. Verify this is a valid probability distribution and find P(X≥3).
Definition:

Valid Probability Distribution: A discrete probability distribution must satisfy two conditions: (1) Each probability is between 0 and 1, inclusive, and (2) The sum of all probabilities equals 1.

Verification method:
  1. Check that each probability is non-negative
  2. Check that each probability is ≤ 1
  3. Verify that the sum of all probabilities equals 1
  4. Calculate the required probability
Individual probs
0.2, 0.3, 0.25, 0.15, 0.1
Sum check
0.2+0.3+0.25+0.15+0.1=1
P(X≥3)
P(X=3)+P(X=4)+P(X=5)
Result
0.5
Step 1: Verify each probability is between 0 and 1

All probabilities: 0.2, 0.3, 0.25, 0.15, 0.1 are between 0 and 1 ✓

Step 2: Verify the sum equals 1

0.2 + 0.3 + 0.25 + 0.15 + 0.1 = 1.0 ✓

Step 3: Calculate P(X ≥ 3)

P(X ≥ 3) = P(X = 3) + P(X = 4) + P(X = 5) = 0.25 + 0.15 + 0.1 = 0.5

Valid distribution, P(X ≥ 3) = 0.5
Final answer:

This is a valid probability distribution. P(X ≥ 3) = 0.5.

Applied rules:

• Probability axioms: 0 ≤ P(X = x) ≤ 1 for all x

• Total probability: ΣP(X = x) = 1

• Cumulative probability: P(X ≥ a) = ΣP(X = x) for x ≥ a

2 Expected Value and Variance
Exercise 2
For the distribution in Exercise 1, find the expected value E[X] and variance Var(X).
Definition:

Expected Value: E[X] = Σx·P(X = x), the weighted average of all possible values. Variance: Var(X) = E[X²] - (E[X])², measures the spread of the distribution.

E[X]
Σx·P(X=x)
E[X²]
Σx²·P(X=x)
Var(X)
E[X²]-(E[X])²
Results
2.6, 0.84
Step 1: Calculate E[X]

E[X] = (1)(0.2) + (2)(0.3) + (3)(0.25) + (4)(0.15) + (5)(0.1) = 0.2 + 0.6 + 0.75 + 0.6 + 0.5 = 2.65

Step 2: Calculate E[X²]

E[X²] = (1²)(0.2) + (2²)(0.3) + (3²)(0.25) + (4²)(0.15) + (5²)(0.1) = (1)(0.2) + (4)(0.3) + (9)(0.25) + (16)(0.15) + (25)(0.1) = 0.2 + 1.2 + 2.25 + 2.4 + 2.5 = 8.55

Step 3: Calculate variance

Var(X) = E[X²] - (E[X])² = 8.55 - (2.65)² = 8.55 - 7.0225 = 1.5275

E[X] = 2.65, Var(X) = 1.5275
Final answer:

E[X] = 2.65 and Var(X) = 1.5275.

Applied rules:

• Expected value: E[X] = Σx·P(X = x)

• Variance formula: Var(X) = E[X²] - (E[X])²

• Computational efficiency: Using the alternative variance formula

3 Binomial Distribution Application
Exercise 3
A multiple-choice test has 10 questions, each with 4 options. A student guesses randomly on all questions. Let X be the number of correct answers. Find P(X=3) and E[X].
Definition:

Binomial Distribution: X ~ B(n,p) where n is the number of trials and p is the probability of success on each trial. P(X=k) = C(n,k)p^k(1-p)^(n-k).

Parameters
n=10, p=1/4
P(X=3)
C(10,3)(1/4)³(3/4)⁷
E[X]
n×p=10×(1/4)
Results
0.2503, 2.5
Step 1: Identify the distribution

Each question is an independent trial with probability p = 1/4 of success (guessing correctly). X ~ B(10, 1/4).

Step 2: Calculate P(X = 3)

P(X = 3) = C(10,3)(1/4)³(3/4)⁷ = 120 × (1/64) × (2187/16384) ≈ 0.2503

Step 3: Calculate expected value

For binomial distribution: E[X] = np = 10 × (1/4) = 2.5

P(X = 3) ≈ 0.2503, E[X] = 2.5
Final answer:

P(X = 3) ≈ 0.2503 and E[X] = 2.5.

Applied rules:

• Binomial probability: P(X = k) = C(n,k)p^k(1-p)^(n-k)

• Binomial expectation: E[X] = np

• Independence assumption: Each trial is independent

Rules and methods, laws,...
\(E[X] = \sum x \cdot P(X = x)\)
Expected Value Formula
Expected Value
E[X] = Σx·P(X = x)
Weighted average
Variance
Var(X) = E[X²] - (E[X])²
Spread measure
Binomial
X ~ B(n,p), E[X] = np
Fixed trials, constant p
Geometric
X ~ Geo(p), E[X] = 1/p
First success trial
Key definitions:

Discrete Random Variable: A variable that can take on a finite or countably infinite number of distinct values.

Probability Mass Function (PMF): The function P(X = x) that gives the probability that the discrete random variable X takes on the value x.

Expected Value: The theoretical average value of the random variable, calculated as E[X] = Σx·P(X = x).

Variance: A measure of the spread of the distribution, calculated as Var(X) = E[(X - E[X])²] = E[X²] - (E[X])².

Standard Deviation: The square root of the variance, σ = √Var(X).

Complete methodology:
  1. Identify the distribution: Determine if uniform, binomial, geometric, etc.
  2. Verify probability distribution: Check that probabilities are valid
  3. Calculate required measures: Expected value, variance, specific probabilities
  4. Apply appropriate formulas: Use distribution-specific formulas when possible
  5. Interpret results: Understand practical meaning
  6. Verify calculations: Double-check arithmetic
Tip 1: Always verify that probabilities sum to 1 before calculating other measures.
Tip 2: Use the alternative variance formula: Var(X) = E[X²] - (E[X])² for computational efficiency.
Tip 3: Expected value represents the long-run average over many trials.
Tip 4: Variance measures how spread out the values are from the expected value.
Common errors: Forgetting to verify probability distribution, miscalculating expected value, using wrong variance formula.
Key insight: Expected value may not be a possible value of the random variable.
Essential formulas:

• Expected value: E[X] = Σx·P(X = x)

• Variance: Var(X) = E[X²] - (E[X])²

• Standard deviation: σ = √Var(X)

• Valid distribution: P(X = x) ≥ 0 and ΣP(X = x) = 1

• Binomial: X ~ B(n,p), E[X] = np, Var(X) = np(1-p)

• Geometric: X ~ Geo(p), E[X] = 1/p, Var(X) = (1-p)/p²

Solution: Exercises 4 to 5
4 Geometric Distribution
Exercise 4
A fair coin is flipped repeatedly until the first head appears. Let X be the number of flips required. Find P(X=4) and E[X].
Definition:

Geometric Distribution: Models the number of trials needed to get the first success in a sequence of independent Bernoulli trials. P(X=k) = (1-p)^(k-1)p for k=1,2,3,...

Parameter
p = 1/2
P(X=4)
(1/2)³×(1/2)
E[X]
1/p = 1/(1/2)
Results
1/16, 2
Step 1: Identify the distribution

Flipping until first head is a geometric distribution with success probability p = 1/2.

Step 2: Calculate P(X = 4)

Need 3 tails followed by 1 head: P(X = 4) = (1/2)³ × (1/2) = (1/8) × (1/2) = 1/16.

Step 3: Calculate expected value

For geometric distribution: E[X] = 1/p = 1/(1/2) = 2.

P(X = 4) = 1/16, E[X] = 2
Final answer:

P(X = 4) = 1/16 and E[X] = 2.

Applied rules:

• Geometric probability: P(X = k) = (1-p)^(k-1)p

• Geometric expectation: E[X] = 1/p

• Independent trials: Each flip is independent of previous flips

5 Hypergeometric Distribution
Exercise 5
A box contains 10 red balls and 5 blue balls. 4 balls are drawn without replacement. Let X be the number of red balls drawn. Find P(X=2).
Definition:

Hypergeometric Distribution: Models the number of successes in a sample drawn without replacement from a finite population. P(X=k) = [C(K,k)×C(N-K,n-k)]/C(N,n).

Population
N=15
Successes
K=10
Sample size
n=4
P(X=2)
[C(10,2)×C(5,2)]/C(15,4)
Step 1: Identify parameters

N = 15 (total balls), K = 10 (red balls), n = 4 (balls drawn), k = 2 (desired red balls).

Step 2: Apply hypergeometric formula

P(X = 2) = [C(10,2) × C(5,2)] / C(15,4) = [45 × 10] / 1365 = 450/1365 ≈ 0.3297

Step 3: Verify with combinations

Ways to choose 2 red from 10: C(10,2) = 45. Ways to choose 2 blue from 5: C(5,2) = 10. Total favorable outcomes: 45×10 = 450. Total possible outcomes: C(15,4) = 1365.

P(X = 2) ≈ 0.3297
Final answer:

P(X = 2) ≈ 0.3297.

Applied rules:

• Hypergeometric probability: P(X = k) = [C(K,k)×C(N-K,n-k)]/C(N,n)

• Without replacement: Sampling affects subsequent probabilities

• Finite population: Total population size is fixed

Comprehensive Summary: Discrete Random Variables
\(E[X] = \sum x \cdot P(X = x), \quad \text{Var}(X) = E[X^2] - (E[X])^2\)
Key Formulas
Key definitions:

Discrete Random Variable: A variable that can take on a finite or countably infinite number of distinct values.

Probability Mass Function (PMF): The function P(X = x) that gives the probability that the discrete random variable X takes on the value x.

Expected Value: The theoretical average value of the random variable, calculated as E[X] = Σx·P(X = x).

Variance: A measure of the spread of the distribution, calculated as Var(X) = E[(X - E[X])²] = E[X²] - (E[X])².

Standard Deviation: The square root of the variance, σ = √Var(X).

Valid Distribution: Must satisfy: (1) 0 ≤ P(X = x) ≤ 1 for all x, and (2) ΣP(X = x) = 1.

Complete methodology:
  1. Distribution identification: Determine the appropriate discrete distribution
  2. Parameter specification: Identify all necessary parameters
  3. Verification: Check that probabilities form a valid distribution
  4. Measure calculation: Compute expected value, variance, and other required measures
  5. Application: Solve specific probability questions
  6. Interpretation: Understand the practical meaning of results
Tip 1: Always verify that probabilities sum to 1 before proceeding with calculations.
Tip 2: Use the alternative variance formula: Var(X) = E[X²] - (E[X])² for computational efficiency.
Tip 3: Expected value represents the long-run average over many trials and may not be a possible value.
Tip 4: Variance measures how spread out the values are from the expected value.
Tip 5: For common distributions, memorize the formulas for expected value and variance.
Common errors: Forgetting to verify probability distribution, miscalculating expected value, using wrong variance formula, confusing discrete with continuous variables.
Memorization aid: "Discrete = Distinct values with probability masses".
Advanced insight: Discrete random variables form the foundation for many statistical models and hypothesis tests.
Essential formulas and properties:

• Expected value: E[X] = Σx·P(X = x)

• Variance: Var(X) = E[X²] - (E[X])²

• Standard deviation: σ = √Var(X)

• Valid distribution: P(X = x) ≥ 0 and ΣP(X = x) = 1

• Binomial: X ~ B(n,p), E[X] = np, Var(X) = np(1-p)

• Geometric: X ~ Geo(p), E[X] = 1/p, Var(X) = (1-p)/p²

• Hypergeometric: E[X] = nK/N, where N=population, K=successes, n=sample

Example progression (Simple to Complex):

• Simple: Uniform distribution (fair die)

• Intermediate: Given probability distribution table

• Advanced: Binomial distribution applications

• Complex: Geometric and hypergeometric distributions

Key takeaways for memorization:

• Discrete variables have distinct, separate values

• Probabilities must sum to 1

• Expected value is the long-run average

• Variance measures spread around the mean

• Use distribution-specific formulas when available

Questions & Answers

Question: What's the difference between binomial and geometric distributions?

Answer: Key differences:

  • Binomial: Fixed number of trials (n), counts number of successes
  • Geometric: Variable number of trials, counts trials until first success

Example: Binomial - Number of heads in 10 coin flips. Geometric - Number of flips until first head appears.

Question: Why do we need both E[X²] and (E[X])² in the variance formula?

Answer: The variance formula Var(X) = E[X²] - (E[X])² captures different aspects:

  • E[X²]: Average of squared values
  • (E[X])²: Square of the average value
  • The difference measures how much values deviate from the mean

This is equivalent to E[(X - E[X])²], which directly measures squared deviations from the mean.

Question: When should I use hypergeometric instead of binomial distribution?

Answer: Use hypergeometric when sampling WITHOUT replacement from a finite population:

  • Binomial: Sampling with replacement OR very large population (so removal doesn't matter)
  • Hypergeometric: Sampling without replacement from small/finite population

Example: Drawing cards from a deck (hypergeometric) vs. flipping coins (binomial). When population is large, both give similar results.