class: top, right, inverse, title-slide # STT 2820 Chapter 13 ### Alan T. Arnholt ### updated: 2019-09-30 --- class: inverse, center, middle # From Randomness to Probability --- # Vocabulary Each time we observe a random phenomenon is called a **trial**. The value of the trial is the **outcome**. If we combine outcomes, we have an **event**. The set of all outcomes possible is the **sample space**, `\(S\)`. The **probability** of an event is its long term relative frequency. -- `$$P(A) =\frac{\text{Number of outcomes in } A}{\text{Number of possible outcomes}}$$` --- # Probability Axioms 1. For any event `\(A\)`, `\(0 \leq P(A) \leq 1\)`. -- 2. `\(P(S) =1\)` where `\(S\)` is the sample space. -- 3. `\(P(A) + P(A^c) =1\)` so `\(P(A^c)=1 - P(A)\)`. -- 4. `\(P(A \cup B) = P(A) + P(B) - P(A \cap B)\)`. If `\(P(A \cap B) = 0\)`, the `\(P(A \cup B) = P(A) + P(B)\)`. -- 5. `\(P(A \cap B) = P(A) \times P(B)\)` if and only if `\(A\)` and `\(B\)` are independent. -- If `\(P(A\cap B) = 0\)`, events are **disjoint**. --- class: inverse, center, middle # Dice --- # You roll a fair die four times 1. How many outcomes are in the sample space? `\(6^4 = 1296\)` <table> <thead> <tr> <th style="text-align:right;"> roll1 </th> <th style="text-align:right;"> roll2 </th> <th style="text-align:right;"> roll3 </th> <th style="text-align:right;"> roll4 </th> </tr> </thead> <tbody> <tr> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:right;"> 2 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:right;"> 3 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:right;"> 4 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:right;"> 5 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:right;"> 6 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 2 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:right;"> 2 </td> <td style="text-align:right;"> 2 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:right;"> 3 </td> <td style="text-align:right;"> 2 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:right;"> 4 </td> <td style="text-align:right;"> 2 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> </tr> </tbody> </table> --- # When you roll a fair die four times, what is the probability that you roll: * Four twos? - How many outcomes have exactly four twos? (1) - `\(P(\text{four twos}) = \frac{1}{1296}\)` OR Define the events `\(A\)`, `\(B\)`, `\(C\)`, and `\(D\)` to be obtaining a two on the first, second, third, and fourth roll of the die. Since `\(A\)`, `\(B\)`, `\(C\)`, and `\(D\)` are independent, `$$P(\text{four twos}) = P(A \cap B \cap C \cap D) = \\ P(A) \times P(B) \times P(C) \times P(D) = \frac{1}{6} \times \frac{1}{6} \times \frac{1}{6} \times \frac{1}{6}= \frac{1}{1296}$$` --- # When you roll a fair die four times, what is the probability that you roll: * At least one five? -- `$$P(\text{roll at least one five}) = 1 - P(\text{roll no fives}) = 1 - \left(\frac{5}{6}\right)^4 = \frac{671}{1296} = 0.5177469$$` --- # When you roll a fair die four times, what is the probability that you roll: * The numbers you roll are not all sixes? -- `$$P(\text{numbers are not all sixes}) = 1 - P(\text{numbers are all sixes}) = \\ 1 - \left(\frac{1}{6}\right)^4 = \frac{1295}{1296} = 0.9992284$$` --- # When you roll a fair die four times, what is the probability that you roll: * Only the last number you roll is a six? This means that the first three numbers can be anything other than a ____ -- 6 -- `$$P(\text{only last number is a six}) = [P(\text{any number but six})]^3 \times P(\text{must be a six}) \\ \left[\frac{5}{6}\right]^3 \times \frac{1}{6} = \frac{125}{1296} = 0.0964506$$` --- # When you roll a fair die four times, what is the probability that you roll: * Not more than 2 on any roll? -- `$$P(\text{not more than a two on any roll}) = P(\text{not more than a two})^4 = \\ \left(\frac{2}{6}\right)^4 = 0.0123457$$` --- --- # When you roll a fair die four times, what is the probability that you roll: * Even or more than 4? -- Let `\(A\)` be the event of rolling an even number, and `\(B\)` the event of rolling a number greater than 4. `$$P(A \cup B) = P(A) + P(B) - P(A \cap B) = \frac{3}{6} + \frac{2}{6} - \frac{1}{6} = \frac{4}{6}$$` -- Since the probability of rolling an even number or more than 4 on a single roll is `\(\frac{4}{6}\)`, the probability of rolling an even number or more than 4 with four rolls of a fair die is `\(\left(\frac{4}{6}\right)^4 = \frac{256}{1296} = 0.1975309\)`. --- class: inverse, center, middle # Poker --- # How many five card hands exist? ??? Explain deck of cards: 4 suits {Hearts, Diamonds, Spades, Clubs}, 13 denominations {2, ..10, J, Q, K, A} -- First, note that there are 52 cards in a standard deck of cards used to play poker. Second, we are not sampling with replacement! -- The number of ways the first card can be selected is 52, the second 51, the third 50, the fourth 49, and the fifth 48. -- Imagine holding the cards in your hand. When playing cards, the order you hold the cards in your hand does not matter. Consequently, there are 5! ways the cards in your hand can be arranged. Therefore, there are -- `\(\frac{52 \times 51 \times 50 \times 49 \times 48}{5 \times 4 \times 3 \times 2 \times 1} = 2,598,960\)` different five card hands. -- In general, this is a combination of `\(n\)` things taken `\(k\)` at a time, written as `$$C_{n,k} = \binom{n}{k} = \frac{n!}{(n-k)!k!}$$` --- # How many flushes exist? Note: A flush is all 5 cards of the same suit. -- Since there are 13 cards in each suit and there are four suits, there are `\(C_{13, 5} = \binom{13}{5} = \frac{13!}{(13-5)!5!} = \frac{13 \times 12 \times 11 \times 10 \times 9}{5 \times 4 \times 3 \times 2 \times 1} = 1287\)` flushes in each suit, and a total of `\(4 \times 1287 = 5148\)` possible flushes. --- # What is the probability of a flush? `\(P(\text{flush})=\frac{\text{number of flushes}}{\text{number of five card hands}} = \frac{5148}{2598960} = 0.0019808\)` -- * What is the probability of a royal flush? Note that a royal flush is A,K,Q,J,10 in a single suit. -- `\(P(\text{royal flush}) = \frac{4\binom{5}{5}}{\binom{52}{5}} = \frac{4}{2598960} = 1.5390772\times 10^{-6}\)` -- * What is the probability of 100 royal flushes in a row? -- `\(P(\text{100 royal flushes in a row}) = \left(\frac{4}{2598960}\right)^{100} \approx 5.3215677 \times 10^{-582}\)` --- class: inverse, center, middle # Homework Problem 19 --- On September, 11, 2002, a particular state lottery's daily number came up 9-1-1. Assume that no more than one digit is used to represent the first nine months. Answer the following: * What is the probability that the winning three numbers match the date on any given day? -- Question? How many possible outcomes or winning 3 numbers exist? -- 0-9, 0-9, 0-9, so `\(10 \times 10 \times 10 = 1000\)` -- Question? How many ways can the 3 winning numbers match the date? -- Only 1! So the answer is `\(\left(\frac{1}{10}\right)^3=\frac{1}{1000}\)` --- * What is the probability that a whole year passes without this happening? (where 3 winning numbers do not match date) There are 65 days where the chance to match is zero---Oct 10-Oct 31 (22), Nov 10-Nov 30 (21), and Dec 10-Dec 31 (22)---So there are 300 days in a year (not a leap year) where a match might occur. -- `$$P(\text{no match all year}) = (\text{probability not a match})^{\text{number of days where match could happen}} =\\ \left(1 - \frac{1}{1000}\right)^{300} = (0.999)^{300} = 0.740707$$` -- * What is the probability that the date and winning lottery number match at least once during any year? -- `$$P(\text{at least one match}) = 1 - P(\text{no matches in a year}) = 1 - 0.740707 = 0.259293$$` --- * The probability that at least one of the winning numbers from 36 states is 6-0-9 on June 9 is.... -- In general, probability at least 1 match in `\(K\)` states is `\(1 -(\text{prob no matches})^{\text{number of states}}\)`. In particular, `\(1 - \left(\frac{999}{1000}\right)^{36} = 0.0353771\)` --- class: inverse, center, middle # Homework Problem 15 --- # You roll a fair die three times. What is the probability of each of the following? a. You roll all 2's -- `$$(1/6)^3 = 1/216 = 0.0046296$$` -- b. You roll all odd numbers. -- `$$(3/6)^3 = 1/8 = 0.125$$` -- c. None of your rolls gets a number divisible by 2. -- `$$(3/6)^3 = 1/8= 0.125$$` -- d. You roll at least one 3. -- `$$P(\text{roll at least one three}) = 1 - P(\text{no threes}) = 1 - (5/6)^3 = 0.4212963$$` --- # Continuation from rolling three fair die. e. The numbers you roll are not all 3's `$$P(\text{not all 3s}) = 1 - P(\text{all 3s}) = 1 - (1/6)^3 = 0.9953704$$` --- class: inverse, center, middle # Homework Problem 9 --- In a large introductory statistics lecture hall, the professor reports that 56% of the students enrolled have never taken a calculus course, 25% have taken only one semester of calculus, and the rest have taken two or more semesters of calculus. The professor randomly assigns students to groups of three to work on a project for the course. You are assigned to be part of a group. What is the probability that of your other two groupmates, a. neither has studied calculus? Draw a picture! -- `\(P(\text{no calculus}) = 0.56^2 = 0.3136\)` -- b. both have studied at least one semester of calculus? -- `\(P(\text{both at least one semester}) = 0.44^2 = 0.1936\)` -- c. at least one has had more than one semester of calculus? -- `$$P(\text{at least one with 2 or more semesters of calculus}) = \\ 1 - P(\text{both 1 or less semesters}) = 1 - 0.81^2 = 0.3439$$`