Probability Distributions and Expected Value Chapter 5 1
Probability Distributions and Expected Value Chapter 5. 1 – Probability Distributions and Predictions Mathematics of Data Management (Nelson) MDM 4 U Authors: Gary Greer (with K. Myers)
Probability Distributions of a Discrete Random Variable n n a discrete random variable is one that can take on only a finite number of values for example, rolling a die can only produce numbers in the set {1, 2, 3, 4, 5, 6} rolling 2 dice can produce only numbers in the set {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} choosing a card from a complete deck can produce only the cards in the set {A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K}
Probability Distribution n a probability distribution of a random variable x, is a function which provides the probability of each possible value of x this function may be represented as a table of values, a graph or a mathematical expression for example, rolling a die:
Probability Distribution for 2 Dice
What would a probability distribution graph for three dice look like? n n lets try it! Using three dice, figure out how many possible cases there are now find out how many possible ways there are to create each of the possible cases fill in a table like the one below now you can make your graph Outcome 3 # cases 1 4 5 6 7 8 9 …
So what does an experimental distribution look like? n n n a simulated dice throw was done a million times using a Java program and generated the following data what is the most common outcome? does this make sense?
Back to 2 Dice n n n What is the expected value of throwing 2 dice? How could this be calculated? So the expected value of a discrete variable x is the sum of the values of x multiplied by their probabilities
Example: tossing 3 coins X P(X) n n 0 heads 1 head 2 heads 3 heads ⅛ ⅜ ⅜ ⅛ what is the likelihood of at least 2 heads? it must be the total probability of tossing 2 heads and tossing 3 heads P(X = 2) + P(X = 3) = ⅜ + ⅛ = ½ so the probability is 0. 5
Example: tossing 3 coins X P(X) n n n 0 heads 1 head 2 heads 3 heads ⅛ ⅜ ⅜ ⅛ what is the expected number of heads it must be the sums of the values of x multiplied by the probabilities of x 0 P(X = 0) + 1 P(X = 1) + 2 P(X = 2) + 3 P(X = 3) = 0(⅛) + 1(⅜) + 2(⅜) + 3(⅛) = 1½ so the expected number of heads is 1. 5
Selecting a Team of three people from a group of 4 men and 3 women n n n what is the probability of having at least one woman on the team? there are C(7, 3) or 35 possible teams C(4, 3) have no women C(4, 2) x C(3, 1) have one woman C(4, 1) x C(3, 2) have 2 women C(3, 3) have 3 women
Example: selecting a committee n n n X 0 women 1 woman 2 women 3 women P(X) 4/35 18/35 12/35 1/35 what is the likelihood of at least one woman? it must be the total probability of all the cases with at least one woman P(X = 1) + P(X = 2) + P(X = 3) = 18/35 + 12/35 + 1/35 = 31/35 is there an easier way? ?
Example: selecting a committee n n X 0 women 1 woman 2 women 3 women P(X) 4/35 18/35 12/35 1/35 what is the expected number of women? 0 P(X = 0) + 1 P(X = 1) + 2 P(X = 2) + 3 P(X = 3) = 0(4/35) + 1(18/35) + 2(12/35) + 3(1/35) = 1. 3 (approximately)
Exercises / Homework n n Homework: page 277 #1, 2, 3, 4, 5, 9, 12, 13
Pascal’s Triangle and the Binomial Theorem Chapter 5. 2 – Probability Distributions and Predictions Mathematics of Data Management (Nelson) MDM 4 U Authors: Gary Greer (with K. Myers)
How many routes are there to the top right-hand corner? n n n you need to move up 4 spaces and over 5 spaces the total routes can be calculated with C(9, 5) or C(9, 4) = 126 ways
The Binomial Theorem n the term (a + b) can be expanded: q q q (a + b)0 = 1 (a + b)1 = a + b (a + b)2 = a 2 + 2 ab + b 2 (a + b)3 = a 3 + 3 a 2 b + 3 ab 2 + b 3 (a + b)4 = a 4 + 4 a 3 b + 6 a 2 b 2 + 4 ab 3 + b 4 Blaise Pascal (for whom the Pascal computer language is named) noted that there are patterns of expansion, and from this he developed what we now know as Pascal’s Triangle. He also invented the second mechanical calculator
Pascal’s Triangle n 1 n 1 1 the outer values are always 1 n the inner values are determined by adding the values of the two values diagonally above n 2 1 n 1 3 3 1 n 1 4 6 4 1 n 1 5 10 10 5 1
Pascal’s Triangle sum of each row is n 1 = 20 n 1 1 n 2 = 21 n 1 2 1 n 4 = 22 n 1 3 3 1 n 8 = 23 n 1 4 6 4 1 n 16 = 24 n 1 5 10 10 5 1 n 32 = 25 n 1 6 15 20 15 6 1 n 64 = 26 n
Pascal’s Triangle n 1 1 1 n 1 2 1 n 1 3 3 1 n 1 4 6 4 1 n 1 5 10 10 5 1 n 1 6 15 20 15 6 1 n n n Uses? binomial theorem combinations! q choose 2 items from 5 q go to the 5 th row, the 2 nd number = 10 (always start counting at 0) q so it can be used to find combinations modeling the electrons in each shell of an atom
Pascal’s Triangle – Cool Stuff n 1 1 1 n 1 2 1 n 1 3 3 1 n 1 4 6 4 1 n 1 5 10 10 5 1 n 1 6 15 20 15 6 1 n n n each diagonal is summed up in the next value below and to the left called the hockey stick property there may even be music hidden in it http: //www. geocities. com/Vi enna/9349/pascal. mid
Pascal’s Triangle – Cool Stuff n numbers divisible by 5 similar patterns exist for other numbers http: //www. shodor. org/interactivate/ac tivities/pascal 1/
Pascal’s Triangle can also be seen in terms of combinations n=0 nn = 1 nn = 2 nn = 3 nn = 4 nn = 5 nn = 6 n
Pascal’s Triangle n n symmetrical down the middle outside is always 1 second diagonal values match the row numbers sum of each row is a power of 2 q n sum of nth row is 2 n number inside a row is the sum of the two numbers above it
So what does this have to do with the Binomial Theorem n remember that: q q n n (a + b)4 = a 4 + 4 a 3 b + 6 a 2 b 2 + 4 ab 3 + b 4 and the triangle’s 4 th row is 1 4 6 4 1 so Pascal’s Triangle allows you to predict the coefficients in the binomial expansion notice also that the exponents on the variables also form a predictable pattern with the exponents of each term having a sum of n
The Binomial Theorem
A Binomial Expansion n lets expand (x + y)4
Another Binomial Expansion n lets expand (a + 4)5
Some Binomial Examples n what is the 6 th term (a + b)9? don’t forget that when you find the 6 th term, r = 5 n what is the 11 th term of (2 x + 4)12 n
Finding the term…
Finding the term…
Look at the triangle in a different way n n n n n=0 n=1 n=2 n=3 n=4 n=5 n=6 r 0 1 1 1 1 r 2 r 3 r 4 r 5 1 2 3 4 5 6 1 3 6 10 15 1 4 1 10 5 1 20 15 6 1 for a binomial expansion of (a + b)5, the term for r = 3 has a coefficient of 10 n
And one more thing… n remember that for the inner numbers in the triangle, any number is the sum of the two numbers above it for example 4 + 6 = 10 this suggests the following n which provides an example of Pascal’s Identity n n
For Example…
How can this help us solve our original problem? n so by overlaying Pascal’s Triangle over the grid we can see that there are 126 ways to move from one corner to another 1 5 15 35 70 126 1 4 10 20 35 56 1 3 6 10 15 21 1 2 3 4 5 6 1 1 1
How many routes pass through the green square? n n n to get to the green square, there are C(4, 2) ways (6 ways) to get to the end from the green square there are C(5, 3) ways (10 ways) in total there are 60 ways
How many routes do not pass through the green square? n n n there are 60 ways that pass through the green square there are C(9, 5) or 126 ways in total then there must be 126 – 60 paths that do not pass through the green square
Exercises / Homework n n n Homework: read the examples on pages 281 -287, in particular the example starting on the bottom of page 287 is important page 289 #1, 2 a c e g, 3, 4, 5, 6, 8, 9, 11, 13
- Slides: 37