Applications With Probability
In the next section, we will explore more complex conditional probabilities and ways to compute them. Conditional probabilities can give us information such as the likelihood of getting a positive test result for a disease without actually having the disease. If a doctor thinks the chances that a positive test result nearly guarantees that a patient has a disease,they might begin an unnecessary and possibly harmful treatment regimen on a healthy patient. If you were to get a positive test result, knowing the likelihood of getting a false positive can guide you to get a second opinion.Learning Objectives
Applications With Probability- Compute a conditional probability for an event
- Use Baye’s theorem to compute a conditional probability
- Calculate the expected value of an event
Bayes' Theorem
In this section we concentrate on the more complex conditional probability problems we began looking at in the last section. For example, suppose a certain disease has an incidence rate of 0.1% (that is, it afflicts 0.1% of the population). A test has been devised to detect this disease. The test does not produce false negatives (that is, anyone who has the disease will test positive for it), but the false positive rate is 5% (that is, about 5% of people who take the test will test positive, even though they do not have the disease). Suppose a randomly selected person takes the test and tests positive. What is the probability that this person actually has the disease? There are two ways to approach the solution to this problem. One involves an important result in probability theory called Bayes' theorem. We will discuss this theorem a bit later, but for now we will use an alternative and, we hope, much more intuitive approach. Let's break down the information in the problem piece by piece as an example.example
Suppose a certain disease has an incidence rate of 0.1% (that is, it afflicts 0.1% of the population). The percentage 0.1% can be converted to a decimal number by moving the decimal place two places to the left, to get 0.001. In turn, 0.001 can be rewritten as a fraction: 1/1000. This tells us that about 1 in every 1000 people has the disease. (If we wanted we could write P(disease)=0.001.) A test has been devised to detect this disease. The test does not produce false negatives (that is, anyone who has the disease will test positive for it). This part is fairly straightforward: everyone who has the disease will test positive, or alternatively everyone who tests negative does not have the disease. (We could also say P(positive | disease)=1.) The false positive rate is 5% (that is, about 5% of people who take the test will test positive, even though they do not have the disease). This is even more straightforward. Another way of looking at it is that of every 100 people who are tested and do not have the disease, 5 will test positive even though they do not have the disease. (We could also say that P(positive | no disease)=0.05.) Suppose a randomly selected person takes the test and tests positive. What is the probability that this person actually has the disease? Here we want to compute P(disease|positive). We already know that P(positive|disease)=1, but remember that conditional probabilities are not equal if the conditions are switched. Rather than thinking in terms of all these probabilities we have developed, let's create a hypothetical situation and apply the facts as set out above. First, suppose we randomly select 1000 people and administer the test. How many do we expect to have the disease? Since about 1/1000 of all people are afflicted with the disease, 1/1000 of 1000 people is 1. (Now you know why we chose 1000.) Only 1 of 1000 test subjects actually has the disease; the other 999 do not. We also know that 5% of all people who do not have the disease will test positive. There are 999 disease-free people, so we would expect (0.05)(999)=49.95 (so, about 50) people to test positive who do not have the disease. Now back to the original question, computing P(disease|positive). There are 51 people who test positive in our example (the one unfortunate person who actually has the disease, plus the 50 people who tested positive but don't). Only one of these people has the disease, soP(disease | positive) [latex]\approx\frac{1}{51}\approx0.0196[/latex]
or less than 2%. Does this surprise you? This means that of all people who test positive, over 98% do not have the disease. The answer we got was slightly approximate, since we rounded 49.95 to 50. We could redo the problem with 100,000 test subjects, 100 of whom would have the disease and (0.05)(99,900)=4995 test positive but do not have the disease, so the exact probability of having the disease if you test positive isP(disease | positive) [latex]\approx\frac{100}{5095}\approx0.0196[/latex]
which is pretty much the same answer. But back to the surprising result. Of all people who test positive, over 98% do not have the disease. If your guess for the probability a person who tests positive has the disease was wildly different from the right answer (2%), don't feel bad. The exact same problem was posed to doctors and medical students at the Harvard Medical School 25 years ago and the results revealed in a 1978 New England Journal of Medicine article. Only about 18% of the participants got the right answer. Most of the rest thought the answer was closer to 95% (perhaps they were misled by the false positive rate of 5%). So at least you should feel a little better that a bunch of doctors didn't get the right answer either (assuming you thought the answer was much higher). But the significance of this finding and similar results from other studies in the intervening years lies not in making math students feel better but in the possibly catastrophic consequences it might have for patient care. If a doctor thinks the chances that a positive test result nearly guarantees that a patient has a disease, they might begin an unnecessary and possibly harmful treatment regimen on a healthy patient. Or worse, as in the early days of the AIDS crisis when being HIV-positive was often equated with a death sentence, the patient might take a drastic action and commit suicide. This example is worked through in detail in the video here. https://youtu.be/hXevfqsBinoBayes’ Theorem
[latex]P(A|B)=\frac{P(A)P(B|A)}{P(A)P(B|A)+P(\bar{A})P(B|\bar{A})}[/latex]
[latex]P(\text{disease}|\text{positive})=\frac{P(\text{disease})P(\text{positive}|\text{disease})}{P(\text{disease})P(\text{positive}|\text{disease})+P(\text{nodisease})P(\text{positive}|\text{nodisease})}[/latex]
Plugging in the numbers gives[latex]P(\text{disease}|\text{positive})=\frac{(0.001)(1)}{(0.001)(1)+(0.999)(0.05)}\approx0.0196[/latex]
which is exactly the same answer as our original solution. The problem is that you (or the typical medical student, or even the typical math professor) are much more likely to be able to remember the original solution than to remember Bayes' theorem. Psychologists, such as Gerd Gigerenzer, author of Calculated Risks: How to Know When Numbers Deceive You, have advocated that the method involved in the original solution (which Gigerenzer calls the method of "natural frequencies") be employed in place of Bayes' Theorem. Gigerenzer performed a study and found that those educated in the natural frequency method were able to recall it far longer than those who were taught Bayes' theorem. When one considers the possible life-and-death consequences associated with such calculations it seems wise to heed his advice.example
A certain disease has an incidence rate of 2%. If the false negative rate is 10% and the false positive rate is 1%, compute the probability that a person who tests positive actually has the disease.Answer: Imagine 10,000 people who are tested. Of these 10,000, 200 will have the disease; 10% of them, or 20, will test negative and the remaining 180 will test positive. Of the 9800 who do not have the disease, 98 will test positive. So of the 278 total people who test positive, 180 will have the disease. Thus
[latex]P(\text{disease}|\text{positive})=\frac{180}{278}\approx0.647[/latex]
so about 65% of the people who test positive will have the disease. Using Bayes theorem directly would give the same result:[latex]P(\text{disease}|\text{positive})=\frac{(0.02)(0.90)}{(0.02)(0.90)+(0.98)(0.01)}=\frac{0.018}{0.0278}\approx0.647[/latex]
View the following for more about this example. https://youtu.be/_c3xZvHto3kTry it now
Example
A quiz consists of 3 true-or-false questions. In how many ways can a student answer the quiz?Answer: There are 3 questions. Each question has 2 possible answers (true or false), so the quiz may be answered in 2 · 2 · 2 = 8 different ways. Recall that another way to write 2 · 2 · 2 is 23, which is much more compact.
Permutations
In this section we will develop an even faster way to solve some of the problems we have already learned to solve by other means. Let's start with a couple examples.example
How many different ways can the letters of the word MATH be rearranged to form a four-letter code word?Answer: This problem is a bit different. Instead of choosing one item from each of several different categories, we are repeatedly choosing items from the same category (the category is: the letters of the word MATH) and each time we choose an item we do not replace it, so there is one fewer choice at the next stage: we have 4 choices for the first letter (say we choose A), then 3 choices for the second (M, T and H; say we choose H), then 2 choices for the next letter (M and T; say we choose M) and only one choice at the last stage (T). Thus there are 4 · 3 · 2 · 1 = 24 ways to spell a code worth with the letters MATH.
Factorial
n! = n · (n – 1) · (n – 2) ··· 3 · 2 · 1
Try it now
examples
A charity benefit is attended by 25 people and three gift certificates are given away as door prizes: one gift certificate is in the amount of $100, the second is worth $25 and the third is worth $10. Assuming that no person receives more than one prize, how many different ways can the three gift certificates be awarded?Answer: Using the Basic Counting Rule, there are 25 choices for the person who receives the $100 certificate, 24 remaining choices for the $25 certificate and 23 choices for the $10 certificate, so there are 25 · 24 · 23 = 13,800 ways in which the prizes can be awarded.
Example
Eight sprinters have made it to the Olympic finals in the 100-meter race. In how many different ways can the gold, silver and bronze medals be awarded?Answer: Using the Basic Counting Rule, there are 8 choices for the gold medal winner, 7 remaining choices for the silver, and 6 for the bronze, so there are 8 · 7 · 6 = 336 ways the three medals can be awarded to the 8 runners. Note that in these preceding examples, the gift certificates and the Olympic medals were awarded without replacement; that is, once we have chosen a winner of the first door prize or the gold medal, they are not eligible for the other prizes. Thus, at each succeeding stage of the solution there is one fewer choice (25, then 24, then 23 in the first example; 8, then 7, then 6 in the second). Contrast this with the situation of a multiple choice test, where there might be five possible answers — A, B, C, D or E — for each question on the test. Note also that the order of selection was important in each example: for the three door prizes, being chosen first means that you receive substantially more money; in the Olympics example, coming in first means that you get the gold medal instead of the silver or bronze. In each case, if we had chosen the same three people in a different order there might have been a different person who received the $100 prize, or a different goldmedalist. (Contrast this with the situation where we might draw three names out of a hat to each receive a $10 gift certificate; in this case the order of selection is not important since each of the three people receive the same prize. Situations where the order is not important will be discussed in the next section.)
Factorial examples are worked in this video. https://youtu.be/9maoGi5fd_Mn · (n – 1) · (n – 2) ··· (n – r + 1)
If you don't see why (n — r + 1) is the right number to use for the last factor, just think back to the first example in this section, where we calculated 25 · 24 · 23 to get 13,800. In this case n = 25 and r = 3, so n — r + 1 = 25 — 3 + 1 = 23, which is exactly the right number for the final factor. Now, why would we want to use this complicated formula when it's actually easier to use the Basic Counting Rule, as we did in the first two examples? Well, we won't actually use this formula all that often; we only developed it so that we could attach a special notation and a special definition to this situation where we are choosing r items out of n possibilities without replacement and where the order of selection is important. In this situation we write:Permutations
nPr = n · (n – 1) · (n – 2) ··· (n – r + 1)
We say that there are nPr permutations of size r that may be selected from among n choices without replacement when order matters. It turns out that we can express this result more simply using factorials.[latex]{}_{n}{{P}_{r}}=\frac{n!}{(n-r)!}[/latex]
example
I have nine paintings and have room to display only four of them at a time on my wall. How many different ways could I do this?Answer: Since we are choosing 4 paintings out of 9 without replacement where the order of selection is important there are 9P4 = 9 · 8 · 7 · 6 = 3,024 permutations.
Example
How many ways can a four-person executive committee (president, vice-president, secretary, treasurer) be selected from a 16-member board of directors of a non-profit organization?Answer: We want to choose 4 people out of 16 without replacement and where the order of selection is important. So the answer is 16P4 = 16 · 15 · 14 · 13 = 43,680.
View this video to see more about the permutations examples. https://youtu.be/xlyX2UJMJQITry It Now
How many 5 character passwords can be made using the letters A through Z- if repeats are allowed
- if no repeats are allowed
Example
In a certain state's lottery, 48 balls numbered 1 through 48 are placed in a machine and six of them are drawn at random. If the six numbers drawn match the numbers that a player had chosen, the player wins $1,000,000. In this lottery, the order the numbers are drawn in doesn’t matter. Compute the probability that you win the million-dollar prize if you purchase a single lottery ticket.Answer: In order to compute the probability, we need to count the total number of ways six numbers can be drawn, and the number of ways the six numbers on the player’s ticket could match the six numbers drawn from the machine. Since there is no stipulation that the numbers be in any particular order, the number of possible outcomes of the lottery drawing is 48C6 = 12,271,512. Of these possible outcomes, only one would match all six numbers on the player’s ticket, so the probability of winning the grand prize is: [latex-display]\frac{{}_{6}{{C}_{6}}}{{}_{48}{{C}_{6}}}=\frac{1}{12271512}\approx0.0000000815[/latex-display]
Example
In the state lottery from the previous example, if five of the six numbers drawn match the numbers that a player has chosen, the player wins a second prize of $1,000. Compute the probability that you win the second prize if you purchase a single lottery ticket.Answer: As above, the number of possible outcomes of the lottery drawing is 48C6 = 12,271,512. In order to win the second prize, five of the six numbers on the ticket must match five of the six winning numbers; in other words, we must have chosen five of the six winning numbers and one of the 42 losing numbers. The number of ways to choose 5 out of the 6 winning numbers is given by 6C5 = 6 and the number of ways to choose 1 out of the 42 losing numbers is given by 42C1 = 42. Thus the number of favorable outcomes is then given by the Basic Counting Rule: 6C5 · 42C1 = 6 · 42 = 252. So the probability of winning the second prize is. [latex-display]\frac{\left({}_{6}{{C}_{5}}\right)\left({}_{42}{{C}_{1}}\right)}{{}_{48}{{C}_{6}}}=\frac{252}{12271512}\approx0.0000205[/latex-display]
examples
Compute the probability of randomly drawing five cards from a deck and getting exactly one Ace.Answer: In many card games (such as poker) the order in which the cards are drawn is not important (since the player may rearrange the cards in his hand any way he chooses); in the problems that follow, we will assume that this is the case unless otherwise stated. Thus we use combinations to compute the possible number of 5-card hands, 52C5. This number will go in the denominator of our probability formula, since it is the number of possible outcomes. For the numerator, we need the number of ways to draw one Ace and four other cards (none of them Aces) from the deck. Since there are four Aces and we want exactly one of them, there will be 4C1 ways to select one Ace; since there are 48 non-Aces and we want 4 of them, there will be 48C4 ways to select the four non-Aces. Now we use the Basic Counting Rule to calculate that there will be 4C1 · 48C4 ways to choose one ace and four non-Aces. Putting this all together, we have
[latex]P(\text{oneAce})=\frac{\left({}_{4}{{C}_{1}}\right)\left({}_{48}{{C}_{4}}\right)}{{}_{52}{{C}_{5}}}=\frac{778320}{2598960}\approx0.299[/latex]
Example
Compute the probability of randomly drawing five cards from a deck and getting exactly two Aces.Answer: The solution is similar to the previous example, except now we are choosing 2 Aces out of 4 and 3 non-Aces out of 48; the denominator remains the same: [latex-display]P(\text{twoAces})=\frac{\left({}_{4}{{C}_{2}}\right)\left({}_{48}{{C}_{3}}\right)}{{}_{52}{{C}_{5}}}=\frac{103776}{2598960}\approx0.0399[/latex-display] It is useful to note that these card problems are remarkably similar to the lottery problems discussed earlier.
Try it now
Try It Now
A friend offers to play a game, in which you roll 3 standard 6-sided dice. If all the dice roll different values, you give him $1. If any two dice match values, you get $2. What is the expected value of this game? Would you play?Example
A 40-year-old man in the U.S. has a 0.242% risk of dying during the next year.[footnote]According to the estimator at http://www.numericalexample.com/index.php?view=article&id=91[/footnote] An insurance company charges $275 for a life-insurance policy that pays a $100,000 death benefit. What is the expected value for the person buying the insurance?Answer: The probabilities and outcomes are
Outcome | Probability of outcome |
$100,000 - $275 = $99,725 | 0.00242 |
-$275 | 1 – 0.00242 = 0.99758 |
Licenses & Attributions
CC licensed content, Original
- Introduction and Learning Outcomes. Provided by: Lumen Learning License: CC BY: Attribution.
- Revision and Adaptation. Provided by: Lumen Learning License: CC BY: Attribution.
CC licensed content, Shared previously
- Math in Society. Authored by: David Lippman. Located at: http://www.opentextbookstore.com/mathinsociety/. License: CC BY-SA: Attribution-ShareAlike.
- Bayes' Theorem MMB 01. Authored by: mattbuck. Located at: https://commons.wikimedia.org/wiki/File:Bayes%27_Theorem_MMB_01.jpg. License: CC BY-SA: Attribution-ShareAlike.
- Probability of a diesase given a positive test: Bayes Theorem ex1. Authored by: OCLPhase2's channel. License: CC BY: Attribution.
- Probability of a disease given a positive test: Bayes Theorem ex2. Authored by: OCLPhase2's channel. License: CC BY: Attribution.
- Basic counting. Authored by: OCLPhase2's channel. License: CC BY: Attribution.
- Counting using the factorial. Authored by: OCLPhase2's channel. License: CC BY: Attribution.
- Permutations. Authored by: OCLPhase2's channel. License: CC BY: Attribution.
- Combinations. Authored by: OCLPhase2's channel. License: CC BY: Attribution.
- Combinations 2. Authored by: OCLPhase2's channel. License: CC BY: Attribution.
- Probabilities using combinations. Authored by: OCLPhase2's channel. License: CC BY: Attribution.
- Probabilities using combinations: cards. Authored by: OCLPhase2's channel. License: CC BY: Attribution.
- Probability: the birthday problem. Authored by: OCLPhase2's channel. License: CC BY: Attribution.
- Question ID 17479. Authored by: Lippman, David. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
- Roulette. Authored by: Chris Yiu. License: CC BY-SA: Attribution-ShareAlike.
- Expected value. Authored by: OCLPhase2's channel. License: CC BY: Attribution.
- Expected value of insurance. Authored by: OCLPhase2's channel. License: CC BY: Attribution.