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
HOW MUCH SLEEP DID YOU GET? 1. 2. 3. 4. 5. 6. 7. <5 5 6 7 8 9 >9 Slide 1- 1 UPCOMING IN CLASS Sunday Homework 5 Exam 1 – October 9th CHAPTER 14.1-14.2 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Random Variables THEORY OF A RANDOM VARIABLE E X x P x Var X x P x 2 2 SD X Var X Slide 1- 4 RANDOM VARIABLES A random variable is a variable whose number value is based on the outcome of a random event. We use a capital letter, like X, to denote a random variable. A particular value of a random variable will be denoted with a lower case letter, in this case x. Slide 1- 5 TYPE OF RANDOM VARIABLES There are two types of random variables: Discrete random variables can take one of a finite number of distinct outcomes. Example: Number of credit hours Continuous random variables can take any numeric value within a range of values. Example: Cost of books this term Slide 1- 6 EXPECTED VALUE: CENTER A probability model for a random variable consists of: The collection of all possible values of a random variable, and the probabilities that the values occur. Of particular interest is the value we expect a random variable to take on, notated μ (for population mean) or E(X) for expected value. Slide 1- 7 EXPECTED VALUE: CENTER (CONT.) The expected value of a (discrete) random variable can be found by summing the products of each possible value and the probability that it occurs: E X x P x Note: Be sure that every possible outcome is included in the sum and verify that you have a valid probability model to start with. Slide 1- 8 PLAYING CARDS You draw a card from a deck. If you get a red card, you win nothing. If you get a spade, you win $7 For any club, you get $10 plus an extra $20 for the Ace of clubs. Slide 1- 9 CREATE A PROBABILITY MODEL FOR THE AMOUNT YOU WIN AT THIS GAME 1. 2. 3. Red 26/52, Spade 13/52, Ace Club 1/52, Other Club 12/52 Red 26/52, Spade 13/52, Ace Club 1/52, Other Club 13/52 Red 26/52, Spade 13/52, Ace Club 1/52, Other Club 26/52 33% 33% 33% Slide 1- 10 1 2 3 FIND THE EXPECTED AMOUNT THAT YOU WIN. 1. 2. 3. ½ * 0 + ¼ * 7 + 1/52 * 30 + ¼ * 10 ½ * 0 + ¼ * 7 + 1/52 * 30 + 3/13 * 10 ½ * 0 + ¼ * 7 + 1/52 * 10 + 3/13 * 10 0% 1 0% 2 0% 3 Slide 1- 11 HOW MUCH WOULD YOU PAY TO PLAY IF YOU WERE CONTINUALLY PLAYING? 1. 2. 3. 4. 5. 6. $0 $1 $2 $3 $4 $5 17% 17% 17% 17% 17% 17% Slide 1- 12 1 2 3 4 5 6 HOW MUCH SHOULD YOU PAY TO PLAY IF YOU WERE PLAYING A FEW TIMES? 1. 2. 3. 4. 5. 6. $0 $1 $2 $3 $4 $5 17% 17% 17% 17% 17% 17% Slide 1- 13 1 2 3 4 5 6 HOW MUCH SHOULD YOU PAY TO PLAY? 1. 2. 3. 4. At least the expected value, and much more than that if planning to play many times No more than the expected value, and much less than that if planning to play only a few times No more than the expected value, and much less than that if planning to play many times At least the expected value, and much more than that if planning to play only a few times Slide 1- 14 NOT JUST FOR PAYOFFS The expected value of a (discrete) random variable can be found by summing the products of each possible value and the probability that it occurs: E X x P x Note: Be sure that every possible outcome is included in the sum and verify that you have a valid probability model to start with. Slide 1- 15 THE PROBLEM WITH CHILDREN A couple plans to have children until they get a girl, but they agree they will not have more than three children, even if all are boys. Assume that the probability of having a girl is 0.49 Slide 1- 16 CREATE A PROBABILITY MODEL FOR THE NUMBER OF CHILDREN THEY’LL HAVE 1. 2. 3. 4. Zero .49; One .49; Two .49; Three .49; One .49, Two .49, Three .49 One .49, Two .51*.49, Three .51*.51*.49 One .49, Two .51*.49, Three (.51*.51*.49+.51*.51*.51) Slide 1- 17 0% 1 0% 2 0% 3 0% 4 FIND THE EXPECTED NUMBER OF CHILDREN 1. 2. 3. 1*.49 + 2 *.49 +3 *.49 1*.49 + 2*.51*.49 + 3 *.51*.51*.49 1*.49 + 2*.51*.49 + 3 *.51*.51*.49 +3*.51*.51*.51 0% 1 0% 2 0% 3 Slide 1- 18 FIND THE EXPECTED NUMBER OF BOYS 1. 2. 3. 1*.49 + 2 *.51*.49 + 3*.51*.51*.49 + 3*.51*.51*.51 0*.49 + 1 *.51*.49 + 2*.51*.51*.49 + 3*.51*.51 0*.49 + 1 *.51*.49 + 2*.51*.51*.49 0% 1 0% 2 0% 3 Slide 1- 19 FIRST CENTER, NOW SPREAD… For data, we calculated the standard deviation by first computing the deviation from the mean and squaring it. We do that with discrete random variables as well. The variance for a random variable is: Var X x P x 2 2 The standard deviation for a random variable is: SD X Var X Slide 1- 20 FIND THE STANDARD DEVIATION OF THE RANDOM VARIABLE X If x= 43, then P(X=x)=0.4 If x= 30, then P(X=x)=0.3 If x= 34, then P(X=x)=0.2 If x= 46, then P(X=x)=0.1 Slide 1- 21 PLAYING CARDS You draw a card from a deck. If you get a red card, you win nothing. If you get a spade, you win $6. For any club, you win $12 plus an extra $5 for the ace of clubs. Slide 1- 22 FIND THE STANDARD DEVIATION OF THE AMOUNT YOU MIGHT WIN DRAWING A CARD. 1. 2. 3. 4. (E(x) -0)*1/2 + (E(x) -6)*1/4 + (E(x) -12)*3/13 +(E(x) 17)*1/52 (E(x) -0)2 *1/2 + (E(x) -6) 2*1/4 + (E(x) -12) 2*3/13 +(E(x) -17) 2*1/52 Sqrt ((E(x) -0)*1/2 + (E(x) -6) *1/4 + (E(x) - 12)*3/13 +(E(x) -17)*1/52) Sqrt ((E(x) -0)2 *1/2 + (E(x) -6) 2*1/4 + (E(x) -12) 2*3/13 +(E(x) -17) 2*1/52) Slide 1- 23 BASEBALL PROBLEM You play two games against the same opponent. The probability you win the first game is 0.7. If you win the first game, the probability you win the second is 0.6. If you lose the first games, the probability you win the second is 0.5. Slide 1- 24 BASEBALL PROBLEM Find the expected number of games won. Find the standard deviation. Slide 1- 25 ADDITION AND SUBTRACTION OF A CONSTANT: MEANS AND VARIANCES Adding or subtracting a constant from data shifts the mean but doesn’t change the variance or standard deviation: E(X ± c) = E(X) ± c Var(X ± c) = Var(X) Example: Consider everyone in a company receiving a $5000 increase in salary. Slide 1- 26 MULTIPLICATION AND DIVISION OF A CONSTANT: MEANS AND VARIANCES In general, multiplying each value of a random variable by a constant multiplies the mean by that constant and the variance by the square of the constant: E(aX) = aE(X)Var(aX) = a2Var(X) Example: Consider everyone in a company receiving a 10% increase in salary. Slide 1- 27 FOR THE FOLLOWING PROBLEMS, Let, Mean of X = 60 SD of X = 10 Mean of Y = 10 SD of Y = 2 Slide 1- 28 FIND THE MEAN AND STANDARD DEVIATION FOR THE RANDOM VARIABLE 1. 2. 3. 4. 3X 3*60 and 3*10 3*60 and 32*10 3*60 and 10 60 and 10 0% 1 0% 2 0% 3 Slide 0% 1- 29 4 FIND THE MEAN AND SD FOR THE RANDOM VARIABLE 3Y+4 1. 2. 3. 4. 3*10 +4 and 3*2 +4 3*10 and 3*2 3*10+4 and 3*2 3*10 and 3*2+4 0% 0% 0% 0%Slide 1- 30 1 2 3 4 FIND THE MEAN AND SD FOR THE RANDOM VARIABLE 4X+2Y 1. 2. 3. 4. 4*60+2*10 and 4*10 4*60+2*10 and 2*2 4*60+2*10 and 4*10+2*2 4*60+2*10 and sqrt(16*100+4*4) 0% 0% 0% 0%Slide 1- 31 1 2 3 4 FIND THE MEAN AND SD FOR THE RANDOM VARIABLE 2X-5Y 1. 2. 3. 4. 2*60-5*10 and sqrt(2*10-5*2) 2*60-5*10 and sqrt(4*10-25*2) 2*60-5*10 and sqrt(4*100-25*4) 2*60-5*10 and sqrt(4*100+25*4) 0% 0% 0% 0%Slide 1- 32 1 2 3 4 FIND THE MEAN AND SD FOR THE RANDOM VARIABLE X1+X2 1. 2. 3. 4. 60+60 and sqrt(100+100) 60+60 and sqrt(10+10) 60+60 and 100+100 60+60 and 10+10 0% 0% 0% 0%Slide 1- 33 1 2 3 4 EVERYTHING E X x P x Var X x P x 2 2 SD X Var X Slide 1- 34 RULES FOR E(X) AND VAR(X) Adding or subtracting a constant from data shifts the mean but doesn’t change the variance or standard deviation: E(X ± c) = E(X) ± c Var(X ± c) = Var(X) In general, multiplying each value of a random variable by a constant multiplies the mean by that constant and the variance by the square of the constant: E(aX) = aE(X)Var(aX) = a2Var(X) Slide 1- 35 UPCOMING IN CLASS Sunday Homework 5 Exam 1 – October 9th