WORKED EXAMPLES

  

Index

Site Map

Photos

Washington

London

N Carolina

Videos

Science

England

Cars

Dogs

Albania

Diary

Fun Stuff

9-11

Author

Links 

Guestbook

 

See also ...

( HomeScienceProbability → Examples )

The previous sections have provided some basic tools for evaluating probabilities.  In this article, some simple examples are provided, showing how the results of the previous sections can be applied to solve problems in probability theory.

Previous:  Bayes' Theorem

 

The following are examples of how to apply the rules that we have discussed in the previous articles.  In setting out these examples I will try to explain as fully as possible the reasoning that is required to solve the problems.  In all cases, identifying the relevant events that define the problem is key to solving the problem.

All of these examples are taken from the book Probability and Statistics, by Morris DeGroot, 1989, a fantastic reference work that covers the subject of probability in a much more thorough (and formal) manner than I have been able to do in these articles.

In all cases my advice for solving these problems, and any other problem of calculating probabilities, is to determine first whether conditional probabilities are involved.  If conditional probabilities are required or given, then this tells us that we may need to use Bayes’ theorem in solving the problem.

Another piece of advice is to define the sample space and events at the start of the problem.  The solution of the problem will then often involve identifying the number of outcomes contained in the events and sample space, especially if conditional probabilities are not involved or required.

Rolling Dice

The problem:  Suppose that 12 dice are rolled.  What is the probability that each of the 6 numbers appears twice?

Since the individual rolls of the dice may be considered as independent, there are no conditional probabilities involved in this problem.

Let us define the event A as the outcomes in which each of the 6 possible numbers appear twice.  The sample space S contains all the possible combinations of numbers that can be shown by 12 dice.

Since each die can show one of 6 numbers, the size of the sample space S is 612.

The more tricky question relates to how many ways 12 dice can show each of the six numbers twice.  To answer this, we can think back to the section in the “counting” article in which we considered splitting a number of elements into groups, with a given number of elements to appear in each group.

Let us think of the six numbers that appear on a die as defining six groups, and let us split the 12 dice into these groups according to the numbers that appear on the dice.  For example, if a particular die shows a “1”, the we put it into the first group.  Thus, if each number is to appear twice on the 12 dice, then we need to split our 12 dice such that two dice appear in each of the six groups.

From the article on counting outcomes, it was shown that the number of ways this can happen is 12!/(2!2!2!2!2!2!) = 12!/(2!)6.  Therefore the required probability is given by

           

Thus this outcome is not very likely!

Birthday Problem

The problem:  Suppose that k people are present in a room.  Neglecting leap years and assuming that the birthdays of the k people are independent, what is the probability that two or more people in the room share a birthday?

This is an old problem that illustrates that a surprisingly small number of people are required in a group for the probability of birthday sharing to be quite high.  Since the birthdays are assumed to be independent, no conditional probabilities are required.

Let us define the event A as the outcomes in which two or more of the k people in the room share a birthday.  The sample space S consists of all the possible combinations of birthdays that the k people could have.

Now, the problem asks us to compute the probability that two or more people share a birthday.  In order to simplify the problem, we can note that the sample space S for the problem is spanned by the event A, and also by the complement of A, namely that no two people in the room share a birthday.  Since the latter is easier to compute, it is more convenient to define an event B that is equal to the complement of A and hence evaluate

           

Now, since each of the k people in the room can have one of 365 birthdays, the size of the sample space S is just 365k.

How many ways can the k people have different birthdays?  Let us consider any one person in the room.  That person can have any of the 365 available birthdays.  Now pick another person – that person can have any of the 364 remaining birthdays.  Considering all k folk in this way, the total number of different birthdays (i.e. the number of outcomes in event B) is equal to the permutation 365!/(365-k)!.

Therefore the probability that two or more folk share a birthday is

           

Now, for k = 23, this probability is 0.5.  For k = 50, the probability is 0.97.  That is, if we gather 50 people at random in a room, the probability that two or more people in the room share a birthday is 97%.

Playing Cards

The problem:  In a game of cards, four people are each dealt 13 cards.  What is the probability that the first player receives 6 hearts, the second player 4 hearts, the third player 2 hearts, and the fourth player 1 heart?

In this problem, no conditional probabilities are required, if we assume that the cards in the deck are properly shuffled and that all hands of cards are equally likely.

Let us begin by defining an event A as the set of outcomes in which the first player receives 6 hearts, the second player 4 hearts, the third player 2 hearts, and the fourth player 1 heart.  The sample space S is just the number of ways in which 52 cards can be distributed equally among four players.

To obtain the number of outcomes in S, we can think back to the section in the “counting” article in which we consider splitting a number of elements into groups, with a given number of elements to appear in each group.  Thus, the number of outcomes in S is 52!/(13!)4.

Now we need to compute the number of outcomes in A.  We begin by using the same counting result to work out how many ways 13 hearts can be distributed such that the four players A, B, C and D receive 6, 4, 2 and 1 heart.  The answer is 13!/(6!4!2!1!).

This is not quite the end of the problem, because there are 39 cards left to be distributed.  Now, player A requires 13 – 6 = 7 cards, player B requires 13 – 4 = 9 cards, and so on.  The number of ways the remaining cards can be distributed is therefore 39!/(7!9!11!12!).

The total number of outcomes in A is therefore 13!/(6!4!2!1!) × 39!/(7!9!11!12!), and so the required probability is

           

Defective Items

The problem:  Three different machines are used to produce a particular manufactured item.  The three machines, A, B and C, produce 20%, 30% and 50% of the items, respectively.  Now, machines A, B and C produce defective items at a rate of 1%, 2% and 3%, respectively.  Suppose that we pick an item from the final batch at random.  The item is found to be defective.  What is the probability that the item was produced by machine B?

In contrast to the previous problems, we now have to deal with a conditional probability, since we require the probability that an item was produced by machine B, given that the item is found to be defective.  Let us define some events.

Let A, B and C be the events that an item selected at random was produced by machines A, B and C, respectively.  Let event F be the event that the item is defective.  The probability we are seeking is

           

Since the events A, B and C span the sample space of all outcomes, we know from Bayes’ theorem that this probability is given by

           

All the probabilities on the right hand side of this expression are given in the statement of the problem.  Thus, we have

           

and for the conditional probabilities

           

From which we can easily work out that

           

Health Checks

The problem:  Suppose that a particular disease occurs in the population with a probability of 1 in 10,000.  To check that you don’t have the disease, you decide to have a health test.  Now, the health test has the following characteristics:

1.  The health test identifies those who do have the disease – i.e. gives a correct positive response – with 95% accuracy.

2.  The health test identifies those who do not have the disease – i.e. gives a correct negative response – with 95% accuracy.

You take the health check and it indicates that you do have the disease.  What is the probability that you really do have the disease?

As with the previous problem, it can be seen that we are dealing with conditional probabilities – we require the probability that you have the disease, given that the test came back positive.  Clearly there is a probability that you don’t have the disease, since the test gives a correct positive response only 95% of the time.

As ever, let us begin by defining some events:

Let A be the event that you have the disease, let B be the event that you don’t have the disease, and let P be the event that a positive response is gain from the test. The probability we seek is therefore

           

The events A and B cover all outcomes in the sample space of outcomes.  Therefore, from Bayes’ theorem this is given by

           

All of the probabilities on the right-hand side are given in the problem statement.  We have:

           

and the conditional probabilities are given by

           

Therefore, using Bayes’ theorem, we have

           

Thus, the probability is lower than one might think.  Even though the health test has a 95% probability of giving a correct positive response, the 5% of false positives is sufficient to ensure that the actual probability of having the disease, noting the 1 in 10,000 incidence of the disease in the population is, only 0.002.

To contrast this, if the test gave correct positive responses 99% of the time and the incidence of the disease were 1 in 100, then the probability of a positive response indicating having the disease is 0.5.

 

Next:  The Game of Craps