CS2800-Probability_part_c_v.2

CS2800-Probability_part_c_v.2 - Discrete Math CS 2800 Prof....

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Discrete Math CS 2800 Prof. Bart Selman selman@cs.cornell.edu Module Probability --- Part c) 1) Linearity of Expectation 2) St. Petersburg (Gambling) Paradox 3) Randomized Algorithms 4) Variance
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Linearity of Expectation
Background image of page 2
3 Linearity of Expectation Thm. 1 2 1 2 ( ... ) ( ) ( ) ... ( ) n n E X X X E X E X E X + + + = + + + Very useful result. Holds even when X_i’s are dependent! Proof: (case n=2) 1 2 1 2 ( ) ( )( ( ) ( )) s S E X X p s X s X s + = +
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 1 2 1 ( )( ( ) ( ) ( ) ) s S E X s X X p s s X + + = Proof: (case n=2) (defn. of expectation; summing over elementary events in sample space ) 1 2 ( ) ( ) ( ) ( ) s S s S p s X s p s X s = + 1 2 ( ) ( ) E X E X + = ( 29 ( 29 x E X xP X x = = QED Aside, alternative defn. of expectation:
Background image of page 4
Example application Consider n coin flips of biased coin (prob. p of heads), what is the expected number of heads? Let X_i be a 0/1 r.v such that X_i is 1 iff i th coin flip comes up head. (X_i is called an “ indicator variable ”.) So, we want to know: 1 2 ( ... ) n E X X X + + + 1 2 ( ) ( ) ... ( ) n E X E X E X = + + + What is E(X_i) ? ( ) 1. 0.(1 ) i E X p p p = + - = 1 2 ( ) ( ) ... ( ) n E X E X E X np + + + = So, Linearity of Expectation! QED Holds even if coins are not flipped independently! Consider: all coins “glued” together. Either all “heads” or all “tails”. Still correct expectation! Why? (can be quite counter-intuitive)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example Consider n children of different heights placed in a line at random. Starting from the beginning of the line, select the first child. Continue walking, until you find a taller child or reach the end of the line. When you encounter taller child, also select him/her, and continue to look for next tallest child or reach end of line. Question: What is the expected value of the number of children selected from the line?? Hmm. Looks tricky… What would you guess? Lineup of 100 kids. .. [e.g. 15 more or less?] Lineup of 1,000 kids… [e.g. 25 more or less?]
Background image of page 6
Let X be the r.v. denoting the number of children selected from the line. 1 2 1 2 ( ) ( ... ) ( ) ( ) ... ( ) n n E X E X X X E X E X E X = + + + = + + + 1 2 ... n X X X X = + + + where i X = 1 1 if the tallest among the first i children. (i.e. will be selected from the line) 0 otherwise { By linearity of expectation, we have:
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
What is E(X_i)? What is P(X_1 = 1)? Now, E(X_i) = 0 * P(X_i = 0) + 1 * P(X_i = 1) = 0 * (1 – 1/i) + 1 * (1/i) = 1/i. So, E(X) = 1 + 1/2 + 1/3 + 1/4 … + 1/n 1 ln( ) , 0.57722. .. ' . n where Euler s c s on n t γ + + = e.g. N = 100 E(X) ~ 5 N = 200 E(X) ~ 6 N = 1000 E(X) ~ 7 N = 1,000,000 E(X) ~ 14 N = 1,000,000,000 E(X) ~ 21 A: 1 What is P(X_n = 1)? A: 1/n What is P(X_i = 1)? A: 1/i small!! Consider doubling queue: What’s probablility tallest kid in first half? A: ½ (in which case 2 nd half doesn’t add anything!)
Background image of page 8
9 Indicator Random Variable Recall: Linearity of Expectation ) ( .... ) ( ) ( ) .... ( 2 1 2 1 n n X E X E X E X X X E + + + = + + + Y An indicator random variable is: 0/1 binary random variable. 1 corresponds to an event E, and 0 corresponds to the event did not occur Then E(Y) = 1*P(E) + 0*(1-P(E)) = P(E) Expected number of times event event occurs: E(X1+X2+…) = E(X1)+E(X2)+…. = P(E1)+P(E2)+….
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Define for i = 1, … n, a random variable: E [ X i i = 1 n ] = E[X i i = 1 n ] Suppose everyone (n) puts their cell phone in a pile in the middle of the room, and I return them randomly. What is the expected number of students who receive their own phone back? Guess??
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 49

CS2800-Probability_part_c_v.2 - Discrete Math CS 2800 Prof....

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online