Presentation is loading. Please wait.

Presentation is loading. Please wait.

Expectation and Variance

Similar presentations


Presentation on theme: "Expectation and Variance"โ€” Presentation transcript:

1 Expectation and Variance
X: sum of two die rolls X = 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 P(X=2) = 1/36 P(X=3) = 1/18 P(X=4) = 1/12 P(X=5) = 1/9 P(X=7) = 1/6 P(X=13) = ? P(X=13) = 0 ๐ธ ๐‘‹ =(2)๐‘ƒ ๐‘‹=2 +(3)๐‘ƒ ๐‘‹=3 +(4)๐‘ƒ ๐‘‹=4 +โ‹ฏ+ 12 ๐‘ƒ(๐‘‹=12) = = = = 42 6 =7 X P(X=x) 2 1/36 3 1/18 4 1/12 5 1/9 6 5/36 7 1/6 X P(X=x) 8 5/36 9 1/9 10 1/12 11 1/18 12 1/36

2 Expectation and Variance
X: sum of two die rolls X = 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 P(X=2) = 1/36 P(X=3) = 1/18 P(X=4) = 1/12 P(X=5) = 1/9 P(X=7) = 1/6 ๐‘‰๐‘Ž๐‘Ÿ ๐‘‹ =๐ธ ๐‘‹ 2 โˆ’ ๐ธ ๐‘‹ 2 ๐ธ ๐‘‹ 2 = (2) 2 ๐‘ƒ ๐‘‹=2 + (3) 2 ๐‘ƒ ๐‘‹=3 + (4) 2 ๐‘ƒ ๐‘‹=4 +โ‹ฏ+ (12) 2 ๐‘ƒ ๐‘‹=12 = (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) = = = โ‰ˆ ๐‘‰๐‘Ž๐‘Ÿ ๐‘‹ =๐ธ ๐‘‹ 2 โˆ’ ๐ธ ๐‘‹ 2 = โˆ’ = โˆ’ = = 35 6 โ‰ˆ5.8333 ๐‘†๐ท ๐‘‹ = =2.4152 X P(X=x) 2 1/36 3 1/18 4 1/12 5 1/9 6 5/36 7 1/6 X P(X=x) 8 5/36 9 1/9 10 1/12 11 1/18 12 1/36

3 Expectation and Variance
Suppose we have multiple Discrete Random Variables ๐‘‹ 1 , ๐‘‹ 2 ,โ€ฆ, ๐‘‹ ๐พ with all random variables mutually independent. Suppose we create a new random variable by taking a weighted sum of the others: ๐‘Œ=๐‘+ ๐‘˜=1 ๐พ ๐‘ ๐‘˜ ๐‘‹ ๐‘˜ =๐‘+ ๐‘ 1 ๐‘‹ 1 + ๐‘ 2 ๐‘‹ 2 +โ‹ฏ+ ๐‘ ๐พ ๐‘‹ ๐พ . Expected value of ๐‘Œ: ๐ธ ๐‘Œ =๐ธ ๐‘+ ๐‘˜=1 ๐พ ๐‘ ๐‘˜ ๐‘‹ ๐‘˜ =๐ธ ๐‘ + ๐‘˜=1 ๐พ ๐ธ( ๐‘ ๐‘˜ ๐‘‹ ๐‘˜ ) =๐‘+ ๐‘˜=1 ๐พ ๐‘ ๐‘˜ ๐ธ( ๐‘‹ ๐‘˜ ) =๐‘+ ๐‘ 1 ๐ธ ๐‘‹ 1 + ๐‘ 2 ๐ธ ๐‘‹ 2 +โ‹ฏ+ ๐‘ ๐พ ๐ธ ๐‘‹ ๐พ =๐‘+ ๐‘ 1 ๐œ‡ ๐‘‹ 1 + ๐‘ 2 ๐œ‡ ๐‘‹ 2 +โ‹ฏ+ ๐‘ ๐พ ๐œ‡ ๐‘‹ ๐พ = ๐œ‡ ๐‘Œ Variance of ๐‘Œ: ๐‘‰๐‘Ž๐‘Ÿ ๐‘Œ = Var ๐‘+ ๐‘˜=1 ๐พ ๐‘ ๐‘˜ ๐‘‹ ๐‘˜ = ๐‘˜=1 ๐พ ๐‘‰๐‘Ž๐‘Ÿ ๐‘ ๐‘˜ ๐‘‹ ๐‘˜ = ๐‘˜=1 ๐พ ๐‘ ๐‘˜ 2 ๐‘‰๐‘Ž๐‘Ÿ( ๐‘‹ ๐‘˜ ) = ๐‘ 1 2 ๐‘‰๐‘Ž๐‘Ÿ ๐‘‹ 1 + ๐‘ 2 2 ๐‘‰๐‘Ž๐‘Ÿ ๐‘‹ 2 +โ‹ฏ+ ๐‘ ๐พ 2 ๐‘‰๐‘Ž๐‘Ÿ ๐‘‹ ๐พ = ๐‘ 1 2 ๐œŽ ๐‘‹ ๐‘ 2 2 ๐œŽ ๐‘‹ โ‹ฏ+ ๐‘ ๐พ 2 ๐œŽ ๐‘‹ ๐พ 2 = ๐œŽ ๐‘Œ 2 ๏ƒ The standard deviation of Y is just the square root of ๐œŽ ๐‘Œ 2 .

4 Expectation and Variance
๐‘‹ ๐‘– : face value of a fair die roll on the ith roll. ๐‘‹ ๐‘– = 1, 2, 3, 4, 5, 6 ๐‘ƒ ๐‘‹ ๐‘– =1 =1/6 ๐‘ƒ ๐‘‹ ๐‘– =2 =1/6 ๐‘ƒ ๐‘‹ ๐‘– =3 =1/6 ๐‘ƒ ๐‘‹ ๐‘– =4 =1/6 ๐‘ƒ ๐‘‹ ๐‘– =5 =1/6 ๐‘ƒ ๐‘‹ ๐‘– =6 =1/6 We know that ๐ธ ๐‘‹ ๐‘– =3.5, and that ๐‘‰๐‘Ž๐‘Ÿ ๐‘‹ ๐‘– = Now, suppose that we want the expected value and variance of a new random variable Y, defined as the sum of two independently thrown dice. We find the following: ๐ธ ๐‘Œ =๐ธ ๐‘‹ 1 + ๐‘‹ 2 =๐ธ ๐‘‹ 1 +๐ธ ๐‘‹ 2 = =7 ๐‘‰๐‘Ž๐‘Ÿ ๐‘Œ =๐‘‰๐‘Ž๐‘Ÿ ๐‘‹ 1 + ๐‘‹ 2 =๐‘‰๐‘Ž๐‘Ÿ ๐‘‹ 1 +๐‘‰๐‘Ž๐‘Ÿ ๐‘‹ 2 = = = 35 6 =5.8333 This is exactly the same as we found by computed the expected value and variance of the sum of two dice directly! ๐‘‹ ๐‘– ๐‘ท( ๐‘‹ ๐‘– = ๐‘ฅ ๐‘– ) 1 1/6 2 3 4 5 6

5 Continuous Random Variable
Consider a random variable X with values from 0 to 1 Discrete Continuous โˆ†๐‘ฅ=0.1? โˆ†๐‘ฅ=0.01? โˆ†๐‘ฅ=0.001? X P(X=x) 0.4 1 0.6 X P(X=x) 0.1 0.2 โ‹ฎ 0.9 1.0 X P(X=x) 0.01 0.02 โ‹ฎ 0.99 1.00 X P(X=x) 0.001 0.002 โ‹ฎ 0.999 1.000 What increment do you use???

6 Continuous Random Variable
Consider a random variable X with values from 0 to 1 Discrete Continuous โˆ†๐‘ฅ=0.1? โˆ†๐‘ฅ=0.01? โˆ†๐‘ฅ=0.001? X P(X=x) 0.4 1 0.6 X P(X=x) 0.1 0.2 โ‹ฎ 0.9 1.0 X P(X=x) 0.01 0.02 โ‹ฎ 0.99 1.00 X P(X=x) 0.001 0.002 โ‹ฎ 0.999 1.000 What increment do you use???

7 Continuous Random Variable
Every continuous random variable is defined by a probability density function (pdf) Probability density function for continuous random variable ๐‘‹: ๐‘“(๐‘ฅ) Probability of ๐‘‹ less than or equal to some value ๐‘Ž, ๐‘ƒ ๐‘‹โ‰ค๐‘Ž = ๐น ๐‘‹ (๐‘Ž), is defined as the area under the curve to the left of ๐‘Ž ๐‘ƒ ๐‘‹โ‰ค๐‘Ž = โˆ’โˆž ๐‘Ž ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ In this example, values of ๐‘‹ range from โˆ’โˆž to โˆž a

8 Continuous Random Variable
Every continuous random variable is defined by a probability density function (pdf) Probability density function for continuous random variable ๐‘‹: ๐‘“(๐‘ฅ) Probability of ๐‘‹ less than or equal to some value ๐‘Ž, ๐‘ƒ ๐‘‹โ‰ค๐‘Ž = ๐น ๐‘‹ (๐‘Ž), is defined as the area under the curve to the left of ๐‘Ž ๐‘ƒ ๐‘‹โ‰ค๐‘Ž = โˆ’โˆž ๐‘Ž ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ Probability of ๐‘‹ greater than or equal to some value ๐‘Ž, ๐‘ƒ ๐‘‹โ‰ฅ๐‘Ž , is defined as the area under the curve to the right of ๐‘Ž ๐‘ƒ ๐‘‹โ‰ฅ๐‘Ž = ๐‘Ž โˆž ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ In this example, values of ๐‘‹ range from โˆ’โˆž to โˆž a

9 Continuous Random Variable
Every continuous random variable is defined by a probability density function (pdf) Probability density function for continuous random variable ๐‘‹: ๐‘“(๐‘ฅ) Probability of ๐‘‹ less than or equal to some value ๐‘Ž, ๐‘ƒ ๐‘‹โ‰ค๐‘Ž = ๐น ๐‘‹ (๐‘Ž), is defined as the area under the curve to the left of ๐‘Ž ๐‘ƒ ๐‘‹โ‰ค๐‘Ž = โˆ’โˆž ๐‘Ž ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ Probability of ๐‘‹ greater than or equal to some value ๐‘Ž, ๐‘ƒ ๐‘‹โ‰ฅ๐‘Ž , is defined as the area under the curve to the right of ๐‘Ž ๐‘ƒ ๐‘‹โ‰ฅ๐‘Ž = ๐‘Ž โˆž ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ Probability of ๐‘‹ between ๐‘Ž and ๐‘, ๐‘ƒ ๐‘Žโ‰ค๐‘‹โ‰ค๐‘ , is defined as the area under the curve between ๐‘Ž and ๐‘ ๐‘ƒ ๐‘Žโ‰ค๐‘‹โ‰ค๐‘ = ๐‘Ž ๐‘ ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ In this example, values of ๐‘‹ range from โˆ’โˆž to โˆž a a b

10 Continuous Random Variable
Every continuous random variable is defined by a probability density function (pdf) Probability density function for continuous random variable ๐‘‹: ๐‘“(๐‘ฅ) Probability of the entire range of ๐‘‹, ๐‘ƒ โˆ’โˆžโ‰ค๐‘‹โ‰คโˆž , is the area under the entire curve ๐‘ƒ โˆ’โˆžโ‰ค๐‘‹โ‰คโˆž = โˆ’โˆž โˆž ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ =1 ๏ƒ  Probability of all possible values of ๐‘‹ In this example, values of ๐‘‹ range from โˆ’โˆž to โˆž

11 Continuous Random Variable
Every continuous random variable is defined by a probability density function (pdf) Probability density function for continuous random variable ๐‘‹: ๐‘“(๐‘ฅ) Probability of the entire range of ๐‘‹, ๐‘ƒ โˆ’โˆžโ‰ค๐‘‹โ‰คโˆž , is the area under the entire curve ๐‘ƒ โˆ’โˆžโ‰ค๐‘‹โ‰คโˆž = โˆ’โˆž โˆž ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ =1 ๏ƒ  Probability of all possible values of ๐‘‹ Probability of ๐‘‹ between ๐‘Ž and ๐‘Ž, ๐‘ƒ ๐‘Žโ‰ค๐‘‹โ‰ค๐‘Ž =๐‘ƒ ๐‘‹=๐‘Ž , is the area under the curve between ๐‘Ž and ๐‘Ž ๐‘ƒ ๐‘‹=๐‘Ž = ๐‘Ž ๐‘Ž ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ =0 ๏ƒ  Area doesnโ€™t exist! Area of a line is 0. A continuous random variable theoretically has an infinite number of possible values The probability of ๐‘‹ equal to an exact point value out of an infinite number of choices = 1 โˆž =0 In this example, values of ๐‘‹ range from โˆ’โˆž to โˆž a

12 Continuous Random Variable
For continuous ๐‘‹, since ๐‘ƒ ๐‘‹=๐‘Ž =0, โ‰ค and โ‰ฅ are interchangeable with < and >, respectively ๐‘ƒ ๐‘‹โ‰ค๐‘Ž =๐‘ƒ ๐‘‹<๐‘Ž +๐‘ƒ ๐‘‹=๐‘Ž =๐‘ƒ ๐‘‹<๐‘Ž +0=๐‘ƒ ๐‘‹<๐‘Ž ๐‘ƒ ๐‘‹โ‰ฅ๐‘Ž =๐‘ƒ ๐‘‹>๐‘Ž +๐‘ƒ ๐‘‹=๐‘Ž =๐‘ƒ ๐‘‹>๐‘Ž +0=๐‘ƒ(๐‘‹>๐‘Ž) ๐‘ƒ ๐‘Žโ‰ค๐‘‹โ‰ค๐‘ =๐‘ƒ ๐‘Žโ‰ค๐‘‹<๐‘ =๐‘ƒ ๐‘Ž<๐‘‹โ‰ค๐‘ =๐‘ƒ(๐‘Ž<๐‘‹<๐‘) Caution: not true for discrete ๐‘‹ because ๐‘ƒ ๐‘‹=๐‘Ž is not 0 (given that ๐‘Ž is a possible value of ๐‘‹)

13 Continuous Random Variable
Complement rule ๏ƒ ๐‘ƒ ๐‘‹โ‰ค๐‘Ž =1โˆ’๐‘ƒ ๐‘‹>๐‘Ž (๐‘‹>๐‘Ž and ๐‘‹โ‰ค๐‘Ž are complements) ๐‘ƒ(๐‘‹โ‰ค๐‘Ž) ๐‘ƒ โˆ’โˆžโ‰ค๐‘‹โ‰คโˆž =1 ๐‘ƒ(๐‘‹>๐‘Ž) = โˆ’ a a

14 Continuous Random Variable
Interval ๏ƒ  ๐‘ƒ ๐‘Žโ‰ค๐‘‹โ‰ค๐‘ =๐‘ƒ ๐‘‹โ‰ฅ๐‘Ž โˆ’๐‘ƒ(๐‘‹โ‰ฅ๐‘) ๐‘ƒ ๐‘Žโ‰ค๐‘‹โ‰ค๐‘ ๐‘ƒ(๐‘‹โ‰ฅ๐‘Ž) ๐‘ƒ(๐‘‹โ‰ฅ๐‘) = โˆ’ a b a b


Download ppt "Expectation and Variance"

Similar presentations


Ads by Google