Independence and Discrete Random Variables & Expectations
Table of Contents
1. Independence
Two events are independent when knowing that one event has already occurred does not change the probability that the other event will occur.
Three ways to check for independence of 2 events
- Is P(A ∩ B) = P(A)*P(B) ? [in light of the multiplication rule, which says P(A∩B)= P(A)*P(B|A) ]
- Is P(B|A) = P(B) ?
- Is P(A|B) = P(A) ?
If you answer “yes” to any one of these three questions then events A and B are independent.
2. Discrete Random Variables & Expected Value
X = Random Variable
Discrete x’s
X has values that are outcomes of an experiment
E(x) = “Expected value of x”
E(X) = “the long run average of the outcomes”
2.1. Example
You earn
+$1 if its a heart
+$5 if its an ace(includign the ace of hearts)
+$10 if its the king of spade
$0 otherwise
What is your expected winning?
x = winning on any trial
E(x) = ?
xi | 1 | 5 | 10 | 0 |
---|---|---|---|---|
P(X=xi) | 12/52 | 4/52 | 1/52 | 35/52 |
We take the average…
(1+1+1+…+1+5+5+5+5+10+0+0+0…+0)/52 =
(1*12+5*4+10*1+0*35)/52 =
(1*12/52+5*4/52+10*1/52+0*35/52)=$0.81
3. Variance and Standard Deviation
The variance of X, Var(X), is the long-run average squared distance from the xi’s to E(X).
The square root of Var(X), is the Standard Deviation of X, SD(X), which is the long-run average distance from the xi’s to E(X).
Step 1: Subtract each xi minus E(X) like
(1-0.81), (1-0.81),…,(1-0.81), (5-0.81), (5-0.81),…, (5-0.81), (10-0.81), (0-0.81), (0-0.81),…(0-0.81)
Step 2: Square each distance:
(1-0.81)2,(1-0.81)2,…,(1-0.81)2,(5-0.81)2,(5-0.81)2,…,(5-0.81)2,(10-0.81)2,(0-0.81)2,(0-0.81)2,…(0-0.81)2
Step 3: Average the squared distances
[(1-0.81)2+(1-0.81)2+…+(1-0.81)2+(5-0.81)2+(5-0.81)2+…+(5-0.81)2+(10-0.81)2+(0-0.81)2+(0-0.81)2+…+(0-0.81)2]/52=
[(1-0.81)2*12 + (5-0.81)2*4 + (10-0.81)2*1 + (0-0.81)2*35]/52=
Var(X)=$3.4246, SD(X)=sqrt(Var(X))=$1.85
So, on average, the winnings vary by $1.85 from the expected value of $0.81
3.1. Example
A casino game costs $5 to play. If you draw first a red card, then you get to draw a second card. If the second card is the ace of hearts (which is red), you win $500. If not, you don’t win anything, i.e. lose your $5. What is your expected profits (or losses) from playing this game? Remember: profit (or loss) = winnings - cost.
Two events: Event 1: Red and then Ace of Hearts (Red∩AceofHearts) Event 2: Event 1 Not happening (Red∩AceofHearts)c
P(Event 1)= 25/52*1/51– P(Event 2)= 1-(25/52*1/51)
Let X = profit
X to PMF
xi | 500-5 = $495 | 0-5 = -$5 |
---|---|---|
P(X=xi) | 25/52 * 1/51 | 1 - (25/52 * 1/51) |
Event | Win | Profit: X | P(X) | X × P(X) |
---|---|---|---|---|
Red, A♥ | 500 | 500 - 5 = 495 | 25/52 × 1/51 = 0.0094 | 495 × 0.0094 = 4.653 |
Other | 0 | 0 - 5 = -5 | 1 - 0.0094 = 0.9906 | -5 × 0.9906 = -4.953 |
E(X) = -0.3 |
An average loss of 30¢ in the long run.