Download presentation
Presentation is loading. Please wait.
Published byCamron Banks Modified over 9 years ago
1
Random Variables Probability distribution functions Expected values
2
Random variables (r.v.) Random variables assign numbers to outcomes of a random experiment –Outcomes of the random experiments can already be numbers or non-numeric. Why defining random variables? –It simplifies our way to get to a mathematical model for real life. They are usually indicated with the last letters of the alphabet: X, Y,..
3
Examples Flip a coin thrice. –Could define the following random variable: –X = #H in the three flips –X can assume the values 0, 1, 2, 3 Roll two dice –X = sum of the two faces showing up –X = 2, 3, 4, …, 12 –Y = 1 if sum > 7, Y = 0 if sum ≤ 7. Note: a r.v. properly defined assigns a numerical value to each outcome of S
4
Discrete Random variables A random variable is discrete if all its possible outcomes can be counted. –# H in flipping the coin thrice –Number of children in a family –Number of stars in a galaxy(?) Will concentrate on these first
5
How do I assign probabilities to r.v.? The outcome of a r.v. depends on the outcome of the experiment on which the random variable is defined. For each value (outcome) of the r.v. add the probabilities of the corresponding outcomes in the random experiment on which the r.v. is defined.
6
Flip a Coin Three Times Outcomes: HHH HHT HTH HTT THH THT TTH TTT X = number of Heads P(X = 3) = 1/8 P(X = 2) = 3/8 P(X = 1) = 3/8 P(X = 0) = 1/8
7
Random Variable Each outcome is a number Name it X P( X = 1 ) =.2, P( X = 2 ) =.6,… 123 P.2.6.2 X=123 P.2.6.2
8
Probability distribution function pdf Table k0123 P(X=k)1/83/8 1/8 1.Prob.’s add up to 1. 2.0 ≤ P(X=k) ≤ 1 for every k. 3.Other #’s have prob. = 0
9
Roll Two Dice Outcomes: (1,1)(1,2)(1,3)(1,4)(1,5)(1,6) (2,1)(2,2)(2,3)(2,4)(2,5)(2,6) (3,1)(3,2)(3,3)(3,4)(3,5)(3,6) (4,1)(4,2)(4,3)(4,4)(4,5)(4,6) (5,1)(5,2)(5,3)(5,4)(5,5)(5,6) (6,1)(6,2)(6,3)(6,4)(6,5)(6,6) pdf X = sum of the two rolls
11
Example k234567 P(X=k)0.1 0.3 0.1 P(X < 3) = P(X=2) = 0.1 P(X ≤ 3) = P(X=2) + P(X=3) = 0.1+ 0.1= 0.2 Cumulative distribution function (CDF) P(X ≤ k) = sum of all probabilities up to k
12
P(X > 4) = P(X=5) + P(X=6) + P(X=7) = 0.5 = 1 – P(X ≤ 4) P(3 < X ≤ 6) = P(X=4) + P(X=5) + P(X=6) = 0.7 = P(X ≤ 6) – P(X ≤ 3) P(X=3 OR X=6) = P(X=3) + P(X=6) = 0.2 X=j and X=k are MUTUALLY EXCLUSIVE Example - continues
13
Score on the Quiz Probability of scoring better than 50% is P(X >50) = P(X= 60) + P(X=80) + P(X=100) =.15 +.3 +.4 =.85 Score20406080100 P.1.05.15.3.4
14
Background: Sigma Notation A short hand for writing long sums
15
Expected Value Mean of X over the long run Equivalent notation Both refer to the possible values (outcomes) of the r.v.
16
Examples k25 P(X=k)1/32/3 E(X) = 2 P(X=2) + 5 P(X=5) = 2(1/3) + 5(2/3) = 2/3 + 10/3 =12/3 = 4
17
k25 P(X=k)1/32/3
18
Banker’s Offer = $138,000
19
Who wants to be a Millionaire? Quit = $100,000. Guess right X= $250,000. Guess wrong X= $32,000. P(Right = ¼) E(X) = 250(¼) + 32(¾) = $86,500 P(Right = ½) E(X) = 250(½) + 32(½) = $141,000
20
Expected Quiz Score E(X) = 20(.1) + 40(.05) + 60(.15) + 80(.3) + 100(.4) = 2 + 2 + 9 + 24 + 40 = 77 Score20406080100 P.1.05.15.3.4
21
Properties of E(X) For any two random variables, X, Y E(X+Y) = E(X) + E(Y) For any constants a, b such that Y = a+bX E(Y) = a + b E(X)
22
E(X+Y) = E(X) + E(Y) (Linearity) An exam is composed by five questions. Each question has four (given) possible answers, only one of which is correct. A correct anwer is worth 20 points while an incorrect answer gets -4 points. No penalties are given for no answer. If a student answers at random at all questions what’s he/she’s expected score?
23
Solution Each question can be modeled with a random variable X with values: –X = 20 if answer is correct –X = -4 if answer is not correct If a student answers at random: P(X = 20) = ¼ and P(X = - 4) = ¾ E(X) = 20 ∙ ¼ + (-4) ¾ = 2
24
If we assign a r.v. to any of the 5 questions of the exam, say X 1, …, X 5 Expected score E(X 1 +X 2 +X 3 +X 4 +X 5 ) = = E(X 1 )+E(X 2 )+E(X 3 )+E(X 4 )+E(X 5 ) = 2 + 2 + 2 + 2 + 2 =10
25
Linear combinations What’s Y = a + b X? Mathematically a linear combination From a practical point of view it could be a change of the unit of measurement X degrees in Celsius, Y degrees in Fahrenheit Y = 32 + 1.8 ∙ X (a=32, b=1.8) X = feet, Y = inches Y = 12 ∙ X (a=0, b=12)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.