Random VariablesLecture 4(Lecture 4) 1 / 28Random VariablesA Random Variable is a numerical variable whose value dependson the outcome of a random phenomenon.Each outcome is a number:1 2 3P 0.2 0.6 0.2Name the random variable XP(X = 1) = 0.2, P(X = 2) = 0.6, P(X = 3) = 0.2.X 1 2 3P 0.2 0.6 0.2(Lecture 4) 3 / 28Flip a Coin 3 timesOutcomesHHH HHT HTH HTTTHH THT TTH TTTX = number of Heads(Lecture 4) 4 / 28Flip a Coin 3 timesOutcomesHHH HHT HTH HTTTHH THT TTH TTTX = number of HeadsP(X = 3) = 1/8(Lecture 4) 5 / 28Flip a Coin 3 timesOutcomesHHH HHT HTH HTTTHH THT TTH TTTX = number of HeadsP(X = 3) = 1/8P(X = 2) = 3/8(Lecture 4) 6 / 28Flip a Coin 3 timesOutcomesHHH HHT HTH HTTTHH THT TTH TTTX = number of HeadsP(X = 3) = 1/8P(X = 2) = 3/8P(X = 1) = 3/8(Lecture 4) 7 / 28Flip a Coin 3 timesOutcomesHHH HHT HTH HTTTHH THT TTH TTTX = number of HeadsP(X = 3) = 1/8P(X = 2) = 3/8P(X = 1) = 3/8P(X = 0) = 1/8(Lecture 4) 8 / 28Probability Distribution Function (PDF)k X = 0 X = 1 X = 2 X = 3P(X = k) 1/8 3/8 3/8 1/8(Lecture 4) 9 / 28More generallyX takes values {x1, . . . , xk}PDFk X = x1. . . X = xkP(X = k) p1. . . pkp1= P(X = x1),. . .pk= P(X = xk)(Lecture 4) 10 / 28Remarks1All probabilities add up to 1.p1+ . . . + pk= 12For every k,0 ≤ pk≤ 13All other numbers have probability 0.(Lecture 4) 11 / 28Roll Two DiceOutcomesX = sum of two dicePDFk 2 3 4 5 6 7 8 9 10 11 12P(X = k)136118112195361653619112118136(Lecture 4) 12 / 28Roll Two Dicek 2 3 4 5 6 7 8 9 10 11 12P(X = k)136118112195361653619112118136(Lecture 4) 13 / 28Event A = {X = k}The events {X = k} and {X = j} are mutually exclusive.Simple OR Rule:P(X = k or X = j) = P(X = k) + P(X = j)(Lecture 4) 14 / 28Job interview5 applicants are selected for an inter viewX = number of womenX = 0 X = 1 X = 2 X = 3 X = 4 X = 5P(X = x) 0.0312 0.1563 0.3125 0.3125 0.1563 0.0312What is the probability that one or two women are selected forinterview?(Lecture 4) 15 / 28Job interviewX = 0 X = 1 X = 2 X = 3 X = 4 X = 5P(X = x) 0.0312 0.1563 0.3125 0.3125 0.1563 0.0312P(one or two women )= P(X = 1 or X = 2)= P(X = 1) + P(X = 2)= 0.1563 + 0.3125= 0.4688(Lecture 4) 16 / 28Job interviewX = 0 X = 1 X = 2 X = 3 X = 4 X = 5P(X = x) 0.0312 0.1563 0.3125 0.3125 0.1563 0.0312What is the probability that at least 2 women are selected?P(at least 2 women are selected)= P(2 or 3 or 4 or 5 women are selected)P(X ≥ 2) = P(X = 2 or X = 3 or X = 4 or X = 5)= P(X = 2) + P(X = 3) + P(X = 4) + P(X = 5)= 0.3125 + 0.3125 + 0.1563 + 0.0312= 0.8125(Lecture 4) 17 / 28Sigma NotationA short hand for writing long sums5Xk=1k = 1 + 2 + 3 + 4 + 55Xk=1k2= 12+ 22+ 32+ 42+ 52= 1 + 4 + 9 + 16 + 25X0≤k≤3(k − 1)2= (0 − 1)2+ (1 − 1)2+ (2 − 1)2+ (3 − 1)2= 1 + 0 + 1 + 4(Lecture 4) 18 / 28Fundamental probability formulaX = random variableA = a set of possible values of X (an event)P(X takes a value in A) =Xfor all k that are in AP(X = k).(Lecture 4) 19 / 28Fundamental probability formula(Lecture 4) 20 / 28Job Interview ExampleMeaning Probability Σ notation Computeat least 3 P(X ≥3)Pk≥3P(X = k ) P(X = 3) + P(X = 4)+P(X = 5)at most 3 P(X ≤3)Pk≤3P(X = k ) P(X = 0) + P(X = 1)+P(X = 2) + P(X = 3)less than 3 P(X<3)Pk<3P(X = k ) P(X = 0) + P(X = 1)+P(X = 2)more than 3 P(X >3)Pk>3P(X = k ) P(X = 4) + P(X = 5)(Lecture 4) 21 / 28ExampleX = 0 X = 1 X = 2 X = 3 X = 4P(X = x) 0.0625 0.25 0.375 0.25 0.0625We want to compute the following probability:P( at most 3 girls ) = P(X ≤ 3)= P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3)= 0.0625 + 0.25 + 0.375 + 0.25 = 0.9375.(Lecture 4) 22 / 28ExampleX = 0 X = 1 X = 2 X = 3 X = 4P(X = x) 0.0625 0.25 0.375 0.25 0.0625Another way to compute this probability is through the complementrule:P(X ≤ 3) = 1 − P(X > 3)= 1 − P(X = 4)= 1 − 0.0625 = 0.9375.(Lecture 4) 23 / 28Expected ValueE(X ) =Xall kk · P(X = k)Interpretation1A probability-weighted average.2Long-run average of X .3The fair value of a gamble.4The balance point for a probability histogram/bargraph.(Lecture 4) 24 / 28How to compute E(X )k 2 5P(X = k) 1/3 2/3E(X ) = 2 · P(X = 2) + 5 · P(X = 5)= 2 (1/3) + 5 (2/3)= 2/3 + 10/3 = 12/3 = 4(Lecture 4) 25 / 28k 2 5P(X = k) 1/3 2/3(Lecture 4) 26 / 28k 2 5P(X = k) 1/3 2/3(Lecture 4) 27 / 28k 2 5P(X = k) 1/3 2/3(Lecture 4) 28 /
View Full Document