Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
COMP 170 L2 Page 1 L17: Random Variables and Expectation COMP 170 L2 Page 2 Outline Random Variables The concept Bernoulli/Binomial random variables Expectation of Random Variables The concept Properties Expectation and counting Geometric distribution COMP 170 L2 Page 3 Functions on Sample Space Probability starts with a process (test, experiment) whose outcome is uncertain Sample space: the set of all possible outcomes Sometimes, we want to define functions on the sample space Example Process: flip a coin n times Sample space: set of sequences of n elements, each being H or T Example: n=5, Function: “Number of heads” COMP 170 L2 Page 4 Random Variables Probability starts with a process whose outcome is uncertain Sample space: the set of all possible outcomes Sometimes, we want to define functions on the sample space Outcome of the process is uncertain Function defined on the outcome is also uncertain So, called random variable A random variable is a function defined on the sample space Example: “Number of heads” in n coin flips is a random variables COMP 170 L2 Page 5 Example 2 COMP 170 L2 Page 6 Outline Random Variables The concept Bernoulli/Binomial random variables Expectation of Random Variables The concept Properties Expectation and counting Geometric distribution COMP 170 L2 Page 7 COMP 170 L2 Page 8 COMP 170 L2 Page 9 COMP 170 L2 Page 10 COMP 170 L2 Page 11 COMP 170 L2 Page 12 Binomial Random Variable n Bernoulli trials, each with probability of success at each trial being p X: number of successes, X: called Binomial random variable P: Binomial probability distribution Do the numbers sum to 1? COMP 170 L2 Page 13 COMP 170 L2 Page 14 Outline Random Variables The concept Bernoulli/Binomial random variables Expectation of Random Variables The concept Properties Expectation and counting Geometric distribution COMP 170 L2 Page 15 Expectation of Random Variables COMP 170 L2 Page 16 Expectation Example COMP 170 L2 Page 17 Expectation and Average Expectation ~= Average over many runs of process Expect the average COMP 170 L2 COMP 170 L2 Page 19 Outline Random Variables The concept Bernoulli/Binomial random variables Expectation of Random Variables The concept Properties Proof of linearity Use of linearity Expectation and counting Geometric distribution COMP 170 L2 Page 20 Expectation from Sample space Get the same result from sample space COMP 170 L2 Page 21 Expectation from Sample space COMP 170 L2 Page 22 COMP 170 L2 Page 23 COMP 170 L2 Page 24 COMP 170 L2 Page 25 COMP 170 L2 Page 26 COMP 170 L2 Page 27 Outline Random Variables The concept Bernoulli/Binomial random variables Expectation of Random Variables The concept Properties Proof of linearity Use of linearity Expectation and counting Geometric distribution COMP 170 L2 Page 28 COMP 170 L2 Page 29 COMP 170 L2 Page 30 COMP 170 L2 Page 31 COMP 170 L2 Page 32 COMP 170 L2 Page 33 Outline Random Variables The concept Bernoulli/Binomial random variables Expectation of Random Variables The concept Properties Expectation and counting Geometric distribution COMP 170 L2 Page 34 COMP 170 L2 Page 35 COMP 170 L2 Page 36 COMP 170 L2 Page 37 COMP 170 L2 Page 38 Outline Random Variables The concept Bernoulli/Binomial random variables Expectation of Random Variables The concept Properties Expectation and counting Geometric distribution COMP 170 L2 Repeating Bernoulli Trials Until Success Page 39 COMP 170 L2 Page 40 Number of Trials until First Success COMP 170 L2 Let x = 1-p Consider only 0 < p < 1 Then, 0 < x <1 Let n goes to infinity, LHS becomes Page 41 COMP 170 L2 Page 42 Number of Trial until First Success COMP 170 L2 Page 43 COMP 170 L2 Page 44 COMP 170 L2 Recap: 06-05-2010 Probability starts with a process whose outcome is uncertain Sample space: the set of all possible outcomes A random variable is a function defined on the sample space Bernoulli RV: Uncertain because outcome of process is Outcome of Bernoulli Trail (success of failure) Binomial RV # of successes in n independent Bernoulli trials