Discrete Random Variable: Takes on a countable number of distinct values. Each outcome has a specific probability.
Probability Distribution: Lists all possible values of X and their corresponding probabilities.
- List all possible outcomes
- Assign probabilities to each outcome
- Verify probabilities sum to 1
- Calculate desired probabilities
Rolling a die: {1, 2, 3, 4, 5, 6}
X can take values: 1, 2, 3, 4, 5, 6
Since die is fair, each outcome has probability 1/6
P(X = 1) = P(X = 2) = ... = P(X = 6) = 1/6
P(X ≤ 3) = P(X = 1) + P(X = 2) + P(X = 3)
= 1/6 + 1/6 + 1/6 = 3/6 = 1/2
1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 = 6/6 = 1 ✓
The probability distribution is uniform with P(X = x) = 1/6 for x ∈ {1,2,3,4,5,6}
P(X ≤ 3) = 1/2
• Discrete RV Properties: Sum of all probabilities equals 1
• Addition Rule: P(A ∪ B) = P(A) + P(B) for mutually exclusive events
• Uniform Distribution: All outcomes equally likely
Expected Value E[X]: The weighted average of all possible values of X, weighted by their probabilities.
E[X] = Σ [x × P(X = x)]
Sample space: {TT, HT, TH, HH} (4 total outcomes)
TT → 0 heads, HT → 1 head, TH → 1 head, HH → 2 heads
P(X = 0) = 1/4 (only TT)
P(X = 1) = 2/4 = 1/2 (HT, TH)
P(X = 2) = 1/4 (only HH)
E[X] = 0×P(X=0) + 1×P(X=1) + 2×P(X=2)
= 0×(1/4) + 1×(1/2) + 2×(1/4)
= 0 + 1/2 + 1/2 = 1
Probability distribution: P(X=0)=1/4, P(X=1)=1/2, P(X=2)=1/4
Expected value: E[X] = 1
• Counting Principle: Total outcomes = 2^n for n coin tosses
• Expected Value Formula: E[X] = Σ [x × P(X = x)]
• Probability Calculation: Favorable outcomes / Total outcomes
Net Winnings: Amount won minus cost to play
Fair Game: Expected value of net winnings equals zero
Roll 6: Win $5, Net = $5 - $2 = $3
Roll 4 or 5: Win $1, Net = $1 - $2 = -$1
Roll 1, 2, or 3: Win $0, Net = $0 - $2 = -$2
P(X = 3) = P(rolling 6) = 1/6
P(X = -1) = P(rolling 4 or 5) = 2/6 = 1/3
P(X = -2) = P(rolling 1, 2, or 3) = 3/6 = 1/2
E[X] = 3×(1/6) + (-1)×(1/3) + (-2)×(1/2)
= 1/2 - 1/3 - 1 = 3/6 - 2/6 - 6/6 = -5/6
Since E[X] = -5/6 ≠ 0, the game is not fair.
You expect to lose $5/6 ≈ $0.83 per game on average.
Probability distribution: P(X=3)=1/6, P(X=-1)=1/3, P(X=-2)=1/2
Expected value: E[X] = -$5/6, so the game is unfair.
• Net Winnings: Gross winnings minus cost to play
• Fair Game Condition: E[X] = 0
• Expected Value Interpretation: Long-run average outcome
Random Variable (RV): A variable whose value depends on the outcome of a random phenomenon.
Discrete RV: Takes on a finite or countably infinite number of values.
Continuous RV: Takes on values in an interval of real numbers.
Probability Distribution: Shows all possible values and their probabilities.
• Expected Value: E[X] = Σ [x × P(X = x)]
• Linear Transformation: E[aX + b] = aE[X] + b
• Variance: Var(X) = E[X²] - (E[X])²
• Standard Deviation: σ = √Var(X)
Valid Probability Distribution: Must satisfy: 1) All probabilities ≥ 0, 2) Sum of all probabilities = 1
All probabilities ≥ 0: ✓ (0.2, 0.3, 0.4, 0.1 are all positive)
Sum = 0.2 + 0.3 + 0.4 + 0.1 = 1.0 ✓
P(X ≥ 2) = P(X = 2) + P(X = 3) + P(X = 4)
= 0.3 + 0.4 + 0.1 = 0.8
E[X] = 1×P(X=1) + 2×P(X=2) + 3×P(X=3) + 4×P(X=4)
= 1×0.2 + 2×0.3 + 3×0.4 + 4×0.1
= 0.2 + 0.6 + 1.2 + 0.4 = 2.4
If this experiment were repeated many times, the average value would be 2.4
This is a valid probability distribution since all probabilities are non-negative and sum to 1.
P(X ≥ 2) = 0.8 and E[X] = 2.4
• Validation Check: All P(X=x) ≥ 0 and Σ P(X=x) = 1
• Complement Rule: P(X ≥ a) = 1 - P(X < a)
• Expected Value Formula: Weighted average of outcomes
Variance: Measures spread of distribution, Var(X) = E[X²] - (E[X])²
Linear Transformation: If Y = aX + b, then E[Y] = aE[X] + b and Var(Y) = a²Var(X)
Y = 2X - 3, so a = 2 and b = -3
Given: E[X] = 4, Var(X) = 9
Using the rule E[aX + b] = aE[X] + b
E[Y] = E[2X - 3] = 2E[X] - 3 = 2(4) - 3 = 8 - 3 = 5
Using the rule Var(aX + b) = a²Var(X)
Var(Y) = Var(2X - 3) = 2²Var(X) = 4 × 9 = 36
SD(Y) = √Var(Y) = √36 = 6
For verification: E[Y²] = E[(2X-3)²] = E[4X² - 12X + 9]
= 4E[X²] - 12E[X] + 9
Since Var(X) = E[X²] - (E[X])², we have E[X²] = Var(X) + (E[X])² = 9 + 16 = 25
So E[Y²] = 4(25) - 12(4) + 9 = 100 - 48 + 9 = 61
Var(Y) = E[Y²] - (E[Y])² = 61 - 25 = 36 ✓
For Y = 2X - 3: E[Y] = 5 and Var(Y) = 36
The expected value is transformed linearly while variance is scaled by the square of the coefficient.
• Linear Transformation of Expectation: E[aX + b] = aE[X] + b
• Linear Transformation of Variance: Var(aX + b) = a²Var(X)
• Constant Addition: Doesn't affect variance, only shifts mean
Random Variable: A function that assigns a numerical value to each outcome in a sample space.
Discrete RV: Takes on isolated, countable values (like number of heads).
Continuous RV: Takes on values in a continuous range (like height, weight).
Probability Mass Function (PMF): Function giving probability for each value of discrete RV.
Cumulative Distribution Function (CDF): F(x) = P(X ≤ x).
- Identify the RV: Determine what quantity is being measured.
- Classify the RV: Is it discrete or continuous?
- Determine possible values: What values can X take?
- Find probabilities: Calculate P(X = x) for each possible x.
- Verify distribution: Check that probabilities sum to 1.
- Calculate measures: Find expected value, variance, etc.
• Expected Value: E[X] = Σ [x × P(X = x)]
• Variance: Var(X) = E[X²] - (E[X])²
• Linear Transformation: E[aX + b] = aE[X] + b
• Variance Transformation: Var(aX + b) = a²Var(X)
• Standard Deviation: SD(X) = √Var(X)
Questions & Answers
Question: I'm confused about the difference between discrete and continuous random variables. Can you explain with examples?
Answer: Great question! The key difference lies in the number of possible values:
- Discrete RV: Takes on a countable number of distinct values. Think of counting things.
- Continuous RV: Takes on values in an interval of real numbers. Think of measuring things.
Examples of Discrete RVs:
- Number of heads in 10 coin flips (values: 0, 1, 2, ..., 10)
- Number of students in a class (values: 1, 2, 3, ...)
- Sum of two dice rolls (values: 2, 3, 4, ..., 12)
Examples of Continuous RVs:
- Height of a randomly selected person (can be any value in range)
- Time taken to run a race (can be 10.5 seconds, 10.51 seconds, etc.)
- Temperature measurement (continuous scale)
The distinction is important because discrete and continuous RVs require different mathematical approaches for probability calculations.
Question: What does the expected value actually represent? Is it the value I'll get if I do the experiment once?
Answer: This is a common misconception! The expected value is NOT the value you'll get from a single trial.
Expected value represents: The long-run average value if you repeat the experiment many times.
Example: In rolling a fair die, E[X] = 3.5. But you'll never actually roll a 3.5! However, if you roll the die many times and average the results, you'll approach 3.5.
Think of it as: A theoretical average, not a prediction for a single outcome.
Practical interpretation: If you play a game many times, your average winnings per game will approach the expected value.
The expected value is a measure of the "center" of the probability distribution, similar to the mean in descriptive statistics.
Question: Why do we use variance instead of just looking at the range of possible values to measure spread?
Answer: Variance provides more comprehensive information than just the range:
- Range only considers extremes: It only looks at minimum and maximum values, ignoring everything in between.
- Variance considers all values: It weights each possible value by its probability and measures how far each value is from the mean.
- Probabilistic weighting: Variance accounts for how likely each value is to occur.
Example: Consider two RVs with same range [0,10] but different distributions:
- RV A: P(X=0)=0.5, P(X=10)=0.5 (variance = 25)
- RV B: P(X=5)=1 (variance = 0)
Both have range 10, but RV A has much more variability than RV B. Variance captures this difference.
Variance also has nice mathematical properties that make it useful for further analysis and statistical inference.