CS2800-Probability_part_c_v.1

# CS2800-Probability_part_c_v.1 - Discrete Math CS 2800 Prof...

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

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

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

View Full Document
2 Linearity of Expectation
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 + = +

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

View Full Document
2 1 2 1 ( )( ( ) ( ) ( ) ) s S E X s X X p s s X + + = Proof: (case n=2) (alt. defn. of expectation; summing over sample space) 1 2 ( ) ( ) ( ) ( ) s S s S p s X s p s X s = + 1 2 ( ) ( ) E X E X + =
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)

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

View Full Document
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?]
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:

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

View Full Document
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!)
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)+….

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

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

## This note was uploaded on 02/01/2010 for the course CS 2800 at Cornell.

### Page1 / 49

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

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

View Full Document
Ask a homework question - tutors are online