Problem Set 6
Problem Set 6
Problem Set #6
This Problem Set is due at 11:59 pm Pacific time on 2024-11-07, and will be submitted on Canvas.
This Problem Set is worth 6% of the final course grade. There are five problems.
Problems #1 and #2 and #3 are to be completed individually, while Problems #4 and #5 are to
be completed in your assigned small groups.
Please type (or neatly handwrite) your solutions on standard 8.5 × 11 (or A4) paper, with your name(s)
at the top of each solution. Ensure that you submit five separate PDF files on Canvas, one for each
problem. Make sure you label your Problem Set #1 submissions appropriately - e.g. timothy-1-1.pdf,
timothy-1-2.pdf, timothy-1-3.pdf, timothy-1-4.pdf, timothy-1-5.pdf.
Given that the last two problems are done in a group, your final two PDF files will be identical to
some of your classmates. (For example, timothy-4.pdf might be identical to yvonne1-4.pdf and bethany1-
4.pdf). This is completely fine, and enables you to have a record of all of your submitted work in this
course.
While a solution must be absolutely perfect to receive full marks, I will be generous in awarding partial
marks for incomplete solutions that demonstrate progress.
So that there is no ambiguity, there are two non-negotiable rules. A violation of either rule constitutes
plagiarism and will result in you receiving an F for this course.
(a) If you meet with a classmate to discuss one of the Problems, the articulation of your thought process
(i.e., what you submit to me), must be an individual activity, done in your own words, away from
others. Please remember that the solution-writing process is where so much of your learning will
occur in this course - even more than the time you spend on solving the problems. Do not be
surprised if it takes you 3 to 5 times as long to write up a solution as it takes you to actually solve
the problem.
(b) This Problem Set has been designed to be challenging, because struggling through problems is how
we learn best. When stuck on a problem, it can be helpful to get a small hint that will allow you to
make some progress without robbing you of the opportunity to solve the problem. Online searches,
and even well-intentioned classmates, may be unable to provide you with just a small insight. If
you need support/a small hint, the best plan is to post your query on the Canvas discussion forum.
I will be readily available during office hours, or by appointment.
CS 5002, Spring 2024 Semester, Timothy Edmunds – Problem Set #6 2
Problem #1 – INDIVIDUAL
In this question, we will apply Bayes’ Theorem to consider the effect of medical screening in public health.
A common concern in health-care is balancing the costs of medical testing against their benefits — where
the costs include not only the actual financial cost of performing the test, but the consequences of false
results. As an example, we will consider a fictional condition “Gilliganism”.
Blood tests for Gilliganism are very effective. For this question, we will assume that all Gilligansim
tests have a sensitivity rate of 90%, and a specificity rate of 90%. (Wikipedia’s page on Sensitivity and
Specificity https://en.wikipedia.org/wiki/Sensitivity_and_specificity provides a good techni-
cal overview of the meaning of these terms.)
(a) In your own words, clearly explain the difference between sensitivity and specificity. In your opinion,
what are some factors that affect which is worse: a false positive or a false negative? Explain.
(b) The incidence rate of Gilliganism is 0.4% in people under 30 years old, and 4.0% in people 30 and
over.
If a randomly selected person receives a positive result on a Gilliganism blood test, what is the
probability that person has Gilliganism? Answer this question for both a randomly selected under-
30-year-old and a randomly selected 30-or-older.
(c) Suppose that physicians adopt the following policy: “if you receive a positive test, then we insist
that you have a second blood test so that we can be more confident in our diagnosis”.
Assume that the result of each blood test is independent of previous tests. For example, there
is a probability of 0.9 × 0.9 = 0.81 = 81% that a person with Gilliganism will receive a positive
result on both tests.
If a randomly selected person has two blood tests and receives a positive result both times, what
is the probability that person has Gilliganism? Answer this question for both a randomly selected
under-30-year-old and a randomly selected 30-or-older.
CS 5002, Spring 2024 Semester, Timothy Edmunds – Problem Set #6 3
Problem #2 – INDIVIDUAL
I have three piles of cards, with each pile containing two cards, lying face down.
Yiwei doesn’t know which pile is which. She chooses a pile at random, points to one of the two cards,
and flips it over. This card is red. Determine the probability that the other card in this pile is also red.
Feel free to use any method you wish (e.g. analysis of cases, Bayes’ Theorem, etc.)
Label the cards as follows: R1/R2 for the pile with two red cards, B1/B2 for the pile with two
black cards, and R3/B3 for the pile with one card of each colour. Once Yiwei selects a red card, we
know that Yiwei could not have chosen the B1/B2 pile. Therefore, Yiwei must have chosen either
the R1/R2 pile or the R3/B3 pile. In the first case, Yiwei’s other card is red, and in the second
case, Yiwei’s other card is black. So we conclude that the probability is 12 .
Determine the mistake in this proof, clearly explaining where the error is.
There are six cards, of which three are red and three are black. All six are equally likely to be
chosen by Yiwei. Once Yiwei selects a red card, there are 2 red cards and 3 black cards left. So the
other card in Yiwei’s pile will be black 53 of the time, and will be red 25 of the time. So we conclude
that the probability is 25 .
Determine the mistake in this proof, clearly explaining where the error is.
(d) (OPTIONAL BONUS) It turns out that the Red Card Black Card problem is completely identical
to a well-known puzzle called the Game Show Problem (also known as the Monty Hall Problem, or
the Car Goat Goat Problem). For more information on this famous problem, check out
https://brilliant.org/wiki/monty-hall-problem/
Clearly explain why these two problems are completely identical - e.g. Yiwei picking one of the
three piles is equivalent to Yiwei picking one of the three doors. What does the mixed-card pile
represent? What do the same-coloured piles represent? For all of the features in the two problems,
clearly explain how they are equivalent.
CS 5002, Spring 2024 Semester, Timothy Edmunds – Problem Set #6 4
Problem #3 – INDIVIDUAL
I have two fair dice. On each die, each of the numbers {1,2,3,4,5,6} comes up with equal probability.
We play the following dice game: You start with 0 points. In each round, I roll two dice.
If the number 6 appears on either die (or on both dice), the game is immediately over and your payoff is
0 dollars. Otherwise, you add to your current score the two numbers showing on the dice. For example,
if the first roll is (5,3), then your total score is 5+3 = 8.
You now decide whether to keep playing. If you choose to stop playing, the game is over and your
payoff is your current score in dollars. If you choose to keep playing, then I roll the two dice again. I keep
rolling two dice until you choose to stop playing, or I roll at least one 6, in which case you lose everything.
For example, suppose the first three rolls are (5,3), (2,2), and (1,5). If you choose to stop playing,
the game is over and your payoff is 5+3+2+2+1+5 = 18 dollars. However, if you choose to keep playing
and the next roll is (6,4), then the game is over and your payoff is 0 dollars.
(a) Suppose you have a score of N , and decide to keep playing. I throw the two dice. Clearly explain
11
why there is a probability that you lose everything.
36
(b) Suppose you have a score of N , and decide to keep playing. I throw the two dice. Clearly explain
−11N + 150
why the expected value for the increase in your score is .
36
(c) Determine the optimal1 strategy for this game. Clearly and carefully justify your answer.
As an optional activity (not worth any marks), you are invited to create a Python program for playing
this dice game. You can input various strategies and see how well your strategy performs by playing this
game thousands of times. This is an excellent way to verify your answer in part (c).
1
Small print: Here, “optimal” strategy means the policy that will maximize your expected winnings. We don’t take into
account the non-linear effect that money may have on your life, or other intangibles.
CS 5002, Spring 2024 Semester, Timothy Edmunds – Problem Set #6 5
Problem #4 – GROUP
You are given a fair coin, where Heads comes up 50% of the time and Tails comes up 50% of the time.
You play a game where you start with 0 points. Each time you flip Heads, you add 2 points to your
score. Each time you flip Tails, you add 1 point to your score.
If you reach a total of exactly n points, then you win. However, if you go over n points, then you
lose.
For example, suppose that n = 5. If you flip Heads, Tails, Tails, then your score is 2+1+1=4. Now
if you flip Tails, your score is 4+1=5 points and you win the game, but if you flip Heads, your score is
4+2=6 points and you lose the game.
Let Pn be the probability that you win the game with a target score of n points.
P2 P3
(c) Notice that P3 = 1 − 2 and P4 = 1 − 2 . This recursive relationship is not a coincidence.
Pn−1
Clearly explain why Pn = 1 − 2 for each integer n ≥ 2.
Now use any method of your choice (e.g. by hand, Excel, Python) to determine the value of
P20 , rounding your answer to five decimal places.
Finally, determine the limit of Pn as n → ∞. Clearly and carefully justify your answer.
CS 5002, Spring 2024 Semester, Timothy Edmunds – Problem Set #6 6
Problem #5 – GROUP
In this problem, you will do a complete analysis of the popular casino game Craps. Here are the rules.
You roll two fair 6-sided dice. If the sum of the two dice is 7 or 11, you immediately win. If the
sum of the two dice is 2, 3, or 12, you immediately lose.
If the sum is anything else (4, 5, 6, 8, 9, 10), this sum becomes known as “the point”. You then
continue rolling the two dice until you either roll a sum of 7 or you roll a sum that is equal to your point.
If your sum is 7, you lose. If your sum is the point, you win.
For example, suppose your initial roll is (3, 5). Then your point is equal to 3 + 5 = 8. Now you
keep rolling the two dice until your sum is 7 (in which case you lose) or your sum is 8 (in which case you
win). When I played the game just now, here was how the rest of the game played out:
(a) Determine the probability of winning the game on the first roll, as well as the probability of losing
the game on the first roll.
(b) Suppose the total of your first roll is 8, i.e., your “point” is 8. Suppose you roll two dice until your
sum is either 7 or 8. What is the probability that you will roll 8 before you roll 7? Leave your
answer as a fraction.
(c) Determine the probability of winning at the game of Craps. Determine this probability, both as an
exact fraction, and also rounded to two decimal places.