Probability Reading II

We can use permutations and combinations to help us answer more complex probability questions

Example 1

A 4 digit PIN is selected. What is the probability that there are no repeated digits?

There are 10 possible values for each digit of the PIN (namely: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9), so there are 10 × 10 × 10 × 10 = 104 = 10000 total possible PINs.

To have no repeated digits, all four digits would have to be different, which is selecting without replacement. We could either compute 10 × 9 × 8 × 7, or notice that this is the same as the permutation 10P4 = 5040.

The probability of no repeated digits is the number of 4 digit PINs with no repeated digits divided by the total number of 4 digit PINs. This probability is

[latex]\frac{{{}_{{10}}{P}_{{4}}}}{{{10}^{{4}}}}=\frac{{5040}}{{10000}}={0.504}[/latex]

Example 2

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.

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]\frac{{{}_{{6}}{C}_{{6}}}}{{{}_{{48}}{C}_{{6}}}}=\frac{{1}}{{12271512}}\approx={0.0000000815}[/latex]

Example 3

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.

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]\frac{{{\left({}_{{6}}{C}_{{5}}\right)}{\left({}_{{42}}{C}_{{1}}\right)}}}{{{}_{{48}}{C}_{{6}}}}=\frac{{252}}{{12271512}}\approx{0.0000205}[/latex]

Try it Now

A multiple-choice question on an economics quiz contains 10 questions with five possible answers each. Compute the probability of randomly guessing the answers and getting 9 questions correct.

Example 4

Compute the probability of randomly drawing five cards from a deck and getting exactly one Ace.

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}{\left(\text{one Ace}\right)}=\frac{{{\left({}_{{4}}{C}_{{1}}\right)}{\left({}_{{48}}{C}_{{4}}\right)}}}{{{}_{{52}}{C}_{{5}}}}=\frac{{778320}}{{2598960}}\approx{0.299}[/latex]

Example 5

Compute the probability of randomly drawing five cards from a deck and getting exactly two Aces.

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]{P}{\left(\text{two Ace}\right)}=\frac{{{\left({}_{{4}}{C}_{{2}}\right)}{\left({}_{{48}}{C}_{{3}}\right)}}}{{{}_{{52}}{C}_{{5}}}}=\frac{{103776}}{{2598960}}\approx{0.0399}[/latex]

It is useful to note that these card problems are remarkably similar to the lottery problems discussed earlier.

Try it Now

Compute the probability of randomly drawing five cards from a deck of cards and getting three Aces and two Kings.

Birthday Problem

Let’s take a pause to consider a famous problem in probability theory:

Suppose you have a room full of 30 people. What is the probability that there is at least one shared birthday?

Take a guess at the answer to the above problem. Was your guess fairly low, like around 10%? That seems to be the intuitive answer (30/365, perhaps?). Let’s see if we should listen to our intuition. Let’s start with a simpler problem, however.

Example 6

Suppose three people are in a room. What is the probability that there is at least one shared birthday among these three people?

There are a lot of ways there could be at least one shared birthday. Fortunately there is an easier way. We ask ourselves “What is the alternative to having at least one shared birthday?” In this case, the alternative is that there are no shared birthdays. In other words, the alternative to “at least one” is having none. In other words, since this is a complementary event,

P(at least one) = 1 – P(none)

We will start, then, by computing the probability that there is no shared birthday. Let’s imagine that you are one of these three people. Your birthday can be anything without conflict, so there are 365 choices out of 365 for your birthday. What is the probability that the second person does not share your birthday? There are 365 days in the year (let’s ignore leap years) and removing your birthday from contention, there are 364 choices that will guarantee that you do not share a birthday with this person, so the probability that the second person does not share your birthday is 364/365. Now we move to the third person. What is the probability that this third person does not have the same birthday as either you or the second person? There are 363 days that will not duplicate your birthday or the second person’s, so the probability that the third person does not share a birthday with the first two is 363/365.

We want the second person not to share a birthday with you and the third person not to share a birthday with the first two people, so we use the multiplication rule:

[latex]{P}{\left(\text{no shared birthday}\right)}=\frac{{365}}{{365}}\cdot\frac{{364}}{{365}}\cdot\frac{{363}}{{365}}\approx{0.9918}[/latex]

and then subtract from 1 to get

P(shared birthday) = 1 – P(no shared birthday) = 1 – 0.9918 = 0.0082.

This is a pretty small number, so maybe it makes sense that the answer to our original problem will be small. Let’s make our group a bit bigger.

Example 7

Suppose five people are in a room. What is the probability that there is at least one shared birthday among these five people?

Continuing the pattern of the previous example, the answer should be

[latex]{P}{\left(\text{shared birthday}\right)}={1}-\frac{{365}}{{365}}\cdot\frac{{364}}{{365}}\cdot\frac{{363}}{{365}}\cdot\frac{{362}}{{365}}\cdot\frac{{361}}{{365}}\approx{0.0271}[/latex]

Note that we could rewrite this more compactly as

[latex]{P}{\left(\text{shared birthday}\right)}={1}-\frac{{{}_{{365}}{P}_{{5}}}}{{365}^{{5}}}\approx{0.0271}[/latex]

which makes it a bit easier to type into a calculator or computer, and which suggests a nice formula as we continue to expand the population of our group.

Example 8

Suppose 30 people are in a room. What is the probability that there is at least one shared birthday among these 30 people?

Here we can calculate

[latex]{P}{\left(\text{shared birthday}\right)}={1}-\frac{{{}_{{365}}{P}_{{30}}}}{{365}^{{30}}}\approx{0.706}[/latex]

which gives us the surprising result that when you are in a room with 30 people there is a 70% chance that there will be at least one shared birthday!

If you like to bet, and if you can convince 30 people to reveal their birthdays, you might be able to win some money by betting a friend that there will be at least two people with the same birthday in the room anytime you are in a room of 30 or more people. (Of course, you would need to make sure your friend hasn’t studied probability!) You wouldn’t be guaranteed to win, but you should win more than half the time.

This is one of many results in probability theory that is counterintuitive; that is, it goes against our gut instincts. If you still don’t believe the math, you can carry out a simulation. Just so you won’t have to go around rounding up groups of 30 people, someone has kindly developed a Java applet so that you can conduct a computer simulation. Go to this web page, and once the applet has loaded, select 30 birthdays and then keep clicking Start and Reset. If you keep track of the number of times that there is a repeated birthday, you should get a repeated birthday about 7 out of every 10 times you run the simulation.

Try it Now

Suppose 10 people are in a room. What is the probability that there is at least one shared birthday among these 10 people?

Expected Value

Casino roulette wheelExpected value is perhaps the most useful probability concept we will discuss. It has many applications, from insurance policies to making financial decisions, and it’s one thing that the casinos and government agencies that run gambling operations and lotteries hope most people never learn about.

Example 9

In the casino game roulette, a wheel with 38 spaces (18 red, 18 black, and 2 green) is spun. In one possible bet, the player bets $1 on a single number. If that number is spun on the wheel, then they receive $36 (their original $1 + $35). Otherwise, they lose their $1. On average, how much money should a player expect to win or lose if they play this game repeatedly?

Suppose you bet $1 on each of the 38 spaces on the wheel, for a total of $38 bet. When the winning number is spun, you are paid $36 on that number. While you won on that one number, overall you’ve lost $2. On a per-space basis, you have “won”—$2/$38 ≈ –$0.053. In other words, on average you lose 5.3 cents per space you bet on.

We call this average gain or loss the expected value of playing roulette. Notice that no one ever loses exactly 5.3 cents: most people (in fact, about 37 out of every 38) lose $1 and a very few people (about 1 person out of every 38) gain $35 (the $36 they win minus the $1 they spent to play the game).

There is another way to compute expected value without imagining what would happen if we play every possible space. There are 38 possible outcomes when the wheel spins, so the probability of winning is [latex]\frac{1}{38}[/latex]. The complement, the probability of losing, is [latex]\frac{37}{38}[/latex].

Summarizing these along with the values, we get this table:

Outcome Probability of outcome
$35 [latex]\displaystyle\frac{{1}}{{38}}[/latex]
–$1 [latex]\displaystyle\frac{{37}}{{38}}[/latex]

Notice that if we multiply each outcome by its corresponding probability we get $35 × [latex]\frac{{1}}{{38}}[/latex] = 0.9211 and –$1 × [latex]\frac{37}{38}[/latex] = –0.9737, and if we add these numbers we get 0.9211 + (–0.9737) ≈ –0.053, which is the expected value we computed above.

Expected Value

Expected Value is the average gain or loss of an event if the procedure is repeated many times.

We can compute the expected value by multiplying each outcome by the probability of that outcome, then adding up the products.

Try it Now

You purchase a raffle ticket to help out a charity. The raffle ticket costs $5. The charity is selling 2000 tickets. One of them will be drawn and the person holding the ticket will be given a prize worth $4000. Compute the expected value for this raffle.

Example 10

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. If they match 5 numbers, then win $1,000. It costs $1 to buy a ticket. Find the expected value.

Earlier, we calculated the probability of matching all 6 numbers and the probability of matching 5 numbers:

[latex]\frac{{{}_{{6}}{C}_{{6}}}}{{{}_{{48}}{C}_{{6}}}}=\frac{{1}}{{12271512}}\approx{0.0000000815}[/latex] for all 6 numbers,

[latex]\frac{{{\left({}_{{6}}{C}_{{5}}\right)}{\left({}_{{42}}{C}_{{1}}\right)}}}{{{}_{{48}}{C}_{{6}}}}=\frac{{252}}{{12271512}}\approx{0.0000205}[/latex] for 5 numbers.

Our probabilities and outcome values are:

Outcome Probability of outcome
$999,999 [latex]\frac{{1}}{{12271512}}[/latex]
$999 [latex]\frac{{252}}{{12271512}}[/latex]
–$1 [latex]{1}-\frac{{253}}{{12271512}}=\frac{{12271259}}{{12271512}}[/latex]

The expected value, then is:

[latex]{\left(\${999},{999}\right)}\times\frac{{1}}{{12271512}}+{\left(\${999}\right)}\times\frac{{252}}{{12271512}}+{\left(-\${1}\right)}\times\frac{{12271259}}{{12271512}}\approx-\${0.898}[/latex]

On average, one can expect to lose about 90 cents on a lottery ticket. Of course, most players will lose $1.

In general, if the expected value of a game is negative, it is not a good idea to play the game, since on average you will lose money. It would be better to play a game with a positive expected value (good luck trying to find one!), although keep in mind that even if the average winnings are positive it could be the case that most people lose money and one very fortunate individual wins a great deal of money. If the expected value of a game is 0, we call it a fair game, since neither side has an advantage.

Not surprisingly, the expected value for casino games is negative for the player, which is positive for the casino. It must be positive or they would go out of business. Players just need to keep in mind that when they play a game repeatedly, their expected value is negative. That is fine so long as you enjoy playing the game and think it is worth the cost. But it would be wrong to expect to come out ahead.

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?

Expected value also has applications outside of gambling. Expected value is very common in making insurance decisions.

Example 11

According to the estimator at numericalexample.com, a 40-year-old man in the US has a 0.242% risk of dying during the next year. 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?

The probabilities and outcomes are

Outcome Probability of outcome
$100,000 – $275 = $99,725 0.00242
–$275 1 – 0.00242 = 0.99758

The expected value is ($99,725)(0.00242) + (–$275)(0.99758) = –$33.

Not surprisingly, the expected value is negative; the insurance company can only afford to offer policies if they, on average, make money on each policy. They can afford to pay out the occasional benefit because they offer enough policies that those benefit payouts are balanced by the rest of the insured people.

For people buying the insurance, there is a negative expected value, but there is a security that comes from insurance that is worth that cost.