CS2800-Probability_part_c_v.2

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

Info icon This 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 [email protected] Module Probability --- Part c) 1) Linearity of Expectation 2) St. Petersburg (Gambling) Paradox 3) Randomized Algorithms 4) Variance
Image of page 1

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

View Full Document Right Arrow Icon
2 Linearity of Expectation
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 + = +
Image of page 3

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

View Full Document Right 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:
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)
Image of page 5

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

View Full Document Right 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?]
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:
Image of page 7

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

View Full Document Right 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 Note that the one tallest 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!)
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)+….
Image of page 9

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

View Full Document Right 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??
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern