class: center, middle, inverse, title-slide # Week 10 - Probability ## In Class Exercise
### Danilo Freire ### 5 April 2019 --- <style> .remark-slide-number { position: inherit; } .remark-slide-number .progress-bar-container { position: absolute; bottom: 0; height: 6px; display: block; left: 0; right: 0; } .remark-slide-number .progress-bar { height: 100%; background-color: #EB811B; } .orange { color: #EB811B; } </style> # In Class Exercise .font150[ * Four quick questions: - Objective and subjective probability - Permutations - Combinations - Conditional probability * And an interesting example of signalling ] --- # Question 1: Frequentist x Bayesian Prob. .font130[ * Identify the following as _frequentist_ (objective) and _Bayesian_ (subjective) probability claims: - Using her old gradebooks, Professor Lindström determines that the likelihood that one of her students earns an A is 0.18. - Professor Turan suspects that today few of his students have arrived to class well prepared. - Professor Long learns that over the past five years, 79% of his students have given him “Very Good” or “Excellent” ratings. - Professor Lee tells her students that nuclear war between Pakistan and India is unlikely. .orange[5 minutes to answer, 5 minutes for discussion] ] --- # Question 1: Frequentist x Bayesian Prob. .font150[ * .orange[Frequentist/objective probability:] the ratio between the number of times the event occurs and the number of trials, in repeated trials under the same conditions * .orange[Bayesian/subjective probability:] measure of one's subjective belief about the likelihood of an event occurring ] --- # Answers to Question 1 .font150[ 1) Using her old gradebooks, Professor Lindström determines that the likelihood that one of her students earns an A is 0.18.] -- .font150[ A: .orange[Frequentist.] the professor counts similar events (grades) in repeated trials (courses) ] -- .font150[ 2) Professor Turan suspects that today few of his students have arrived to class well prepared.] -- .font150[ A: .orange[Bayesian.] Turan assumes this is the case based on one single observation (students' performance today) and his prior beliefs about the students' level of effort ] --- # Answers to Question 1 .font150[ 3) Professor Long learns that over the past five years, 79% of his students have given him “Very Good” or “Excellent” ratings.] -- .font150[ A: .orange[Frequentist.] Ratio of comparable events over time ] -- .font150[ 4) Professor Lee tells her students that nuclear war between Pakistan and India is unlikely.] -- .font150[ A: .orange[Bayesian.] Unique event that cannot be repeated under the same conditions ] --- # Question 2: Permutations .font150[ * Compute each of the following permutations (ordering matters): 1) How many ways there are to put 12 people in 5 chairs? 2) And 10 people in 10 chairs? 3) A zip code contains 5 digits. How many different zip codes can be made with the digits 0–9 if no digit is used more than once and the first digit is not 0? .orange[5-10 minutes to answer, 5 for discussion] ] --- # Answer2 to Question 2 .font150[ 1) How many ways there are to put 12 people in 5 chairs? ] -- .font150[ A: `\(\frac{12!}{(12-5)!} = 12 \times 11 \times 10 \times 9 \times 8 = 95,040\)` ] -- .font150[ 2) And 10 people in 10 chairs? ] -- .font150[ ```r factorial(10) # New R command! ``` ``` ## [1] 3628800 ``` ] --- # Answers to Question 2 .font140[ * A zip code contains 5 digits. How many different zip codes can be made with the digits 0–9 if no digit is used more than once and the first digit is not 0? ] -- .font140[ A: For the first position, there are 9 possible choices (since 0 is not allowed). After that number is chosen, there are 9 possible choices (since 0 is now allowed). Then, there are 8 possible choices, 7 possible choices and 6 possible choices. `$$9 \times 9 \times 8 \times 7 \times 6 = 27,216$$` .orange[Think about the problem first, then apply the formula!] ] --- # Question 3: Combinations .font150[ * To win a particular lottery game, a player chooses 4 numbers from 1 to 60. Each number can only be chosen once. If all numbers match the 4 winning numbers, regardless of order, the player wins. What is the probability that the winning numbers are 35, 2, 28, and 59? * .orange[Do not use R to answer this question.] * .orange[5-10 minutes to write the answer, 5-10 minutes for discussion] ] --- # Answer to Question 3 .font140[ * We choose 4 numbers from 60. As _we don't care about the order_, we're talking about combinations ] -- .font140[ * Formula: `\(\frac{n!}{(n-k)! k!}\)` ] -- .font140[ * `\(\frac{60!}{(60-4)!4!} = \frac{60 \times 59 \times 58 \times 57 \times 56 ... \times 2 \times 1}{56! \times 4! }\)` ] -- .font140[ * We cancel out everything from `\(56 \times 55 .... \times 1\)` in the nominator and `\(56!\)` in the denominator ] -- .font140[ * We're left with `\(\frac{60 \times 59 \times 58 \times 57}{4 \times 3 \times 2 \times 1} = 487,635\)` * So the chance of having 35, 2, 28, and 59 as the winning numbers are `\(\frac{1}{487635}\)` ] --- # Question 4: Conditional Probabilities .font140[ * Researchers asked graduate students in Rhode Island about what they thought was the coolest idea in economics: signalling, supply and demand, or opportunity costs. Students of political science, sociology and economics were surveyed. Here are the results: | | Political Science | Sociology | Economics | All | | :---------------- | :---------------- | :-------- | :-------- | :-- | | Signalling | 57 | 87 | 103 | 247 | | Supply and demand | 50 | 42 | 49 | 141 | | Opportunity costs | 42 | 22 | 26 | 90 | | All | 149 | 151 | 178 | 478 | ] --- # Question 4: Conditional Probabilities .font140[ | | Political Science | Sociology | Economics | All | | :---------------- | :---------------- | :-------- | :-------- | :-- | | Signalling | 57 | 87 | 103 | 247 | | Supply and demand | 50 | 42 | 49 | 141 | | Opportunity costs | 42 | 22 | 26 | 90 | | **All** | 149 | 151 | 178 | 478 | * What is the probability that someone is a political scientist given that he thinks supply and demand is the coolest idea in economics? * What is the probabily that someone likes signalling theory given that she studies economics? ] --- # Answer 4 .font120[ | | Political Science | Sociology | Economics | All | | :---------------- | :---------------- | :-------- | :-------- | :-- | | Signalling | 57 | 87 | 103 | 247 | | Supply and demand | 50 | 42 | 49 | 141 | | Opportunity costs | 42 | 22 | 26 | 90 | | **All** | 149 | 151 | 178 | 478 | * What is the probability that someone is a political scientist given that he thinks supply and demand is the coolest idea in economics? ] -- .font120[ * `\(\frac{50}{141} \approx 35\%\)` ] -- .font120[ * What is the probabily that someone likes signalling theory given that she studies economics? ] -- .font120[ * `\(\frac{103}{178} \approx 58\%\)` ] --- # Answer 4 - Signalling .font150[ * Answer: _most economists think signalling is the coolest idea in their field_ * ... and indeed it is! * Congratulations if you've answered all questions correctly! * .orange[But before you leave...] * Professor Skarbek knows a lot about signalling and he has great stories to tell. Take a look at the picture on the next slide and think what is the signal being sent and to whom. ] --- class: clear background-image: url(mara.jpg) --- class: inverse, center, middle # See you next week! <html><div style='float:left'></div><hr color='#EB811B' size=1px width=720px></html>