How Do I Apply the Product Rule?

The Product Rule helps you to find probabilities involving intersections (and). It is easiest to apply when you have put your information on a tree diagram. This video shows how to find the probability of drawing two hearts in a row from a standard deck of cards.

For this example, you have two sets of branches since you are drawing two cards in a row.

If you are finding the probability of producing three male offspring in a row…you need three sets of branches. Each set of branches has goes toward male of female.

How Do You Pick Stocks With Bayes’ Rule?

A stock brokerage is grading its trainees by evaluating their stock picks over a 6 month period. The company has analyzed the trainees’ stock portfolios and computer usage to determine that 60% of the stocks picked by the trainees were up in the 6 month period and 45% of the trainees do research on their stock picks. In addition, the brokerage determined that of the stocks that were up, 30 of the trainees picking a particular stock did research on the stock and 30 of the trainees picking a particular stock did not do any research on the stock.

By Dipsey, via Wikimedia Commons

If a trainee buys the stock of a company they have researched, what is the likelihood that the stock was up over the 6 month period?

Before we start calculating haphazardly, let’s define two events for the problem:

S is the event that a stock that was picked by a trainee was up

R is the event that a trainee did research on a stock that they picked

In terms of these events, we need to find the probability P(S | R), the probability that a stock picked by a trainee was up, given that that stock pick was researched by the trainee. Now let’s examine the information in the problem statement.

The statement says, “60% of the stocks picked by the trainees were up in the 6 month period.” This information is given as a percentage so it corresponds to an empirical probability. In terms of the event S, it tells us that

P(S) = 0.60

The statement also says, “45% of the trainees do research on their stock picks.” This information relates to the event R and tells us that

P(R) = 0.45

The statement “the brokerage determined that of the stocks that were up, 30 of the trainees picking a particular stock did research on the stock and 30 of the trainees picking a particular stock did not do any research on the stock” relates the events S and R. By saying that “of the stocks that were up”, we are establishing that the following information corresponds only to stocks picked by the trainees that are up or that the information matches a conditional probability where we are given S. Additionally, we know that a total of 60 trainees picked stocks that were up since of the stocks that were up, 30 trainees did research and 30 did not do research. Based on this information,

stocks_01

On a tree diagram, we can label the branches as shown.

stocks_02

For this particular way of constructing the tree diagram, the probability P(R) = 0.45 cannot be labeled on the diagram directly. Remember, we are looking for P(S | R) which is NOT the same as the probability P(R | S) = 0.5. To relate these conditional probabilities, utilize Bayes’ Rule in the form,

stocks_03

Solving for P(S | R), we get

stocks_04

Each of the probabilities on the right side we have already found and can be substituted to yield

stocks_05

This number does not have much meaning unless we compare it to the likelihood of picking a stock that is up, given that the trainee did not do any research on the stock, . Using Bayes’ Rule in this case yields

stocks_06

The only probability that we have not calculated is P(R′). Using the compliment rule, this is easily calculated as

stocks_07

Now we can return to Bayes’ Rule to calculate

stocks_08

In summary, we now know that

stocks_09

Now we can compare these two probabilities to draw conclusions about the events. Based on these numbers, we see that it is more likely that a stock chosen by a trainee goes up provided the do research. The probabilities P(′ | R) and P(′ | R′) can be found with similar versions of Bayes’ Rule.

How Do You Fight Spam With Bayes’ Rule?

It might surprise you to know that in 2013, 70.7% of all worldwide emails were spam. Spam emails are unsolicited email that are sent out in bulk. To combat these emails, companies utilize spam filters provided by software companies to block the spam emails from reaching the desired recipient.

One provider, SpamTitan, advertises the following data

  • It blocks 99.9% of all spam email.
  • It blocks 0.03% of all emails that are not spam.

Based on the information above, what is the probability that a delivered email is spam?

To start a problem like this, let’s identify the relevant events.

  • S is the event that an email is spam
  • ′ is the event that an email is not spam
  • B is the event the an email is blocked
  • B′ is the event an email is not blocked

Based on these events, we want to compute the probability that an email is spam given that it is not blocked, P(S|B′).

Let’s look at a tree diagram of the situation.

 

Next, we’ll label the given information on the diagram.

The key here is to recognize that the data provided by the software company are conditional probabilities. Since we know that the probabilities on branches from a single point must add to 1, we can finish labeling the diagram.

The diagram is labeled nicely, but none of the probabilities match P(S|B′). The conditional probabilities on the second set of branches are all given the event S or the event ′. To find P(S|B′), we’ll utilize Bayes’ Rule. Start with the relationship between conditional probabilities,

and solve for P(S|B′). This gives

All of the probabilities on the right side may be found from the tree diagram.

The probabilities in the numerator are located along the branch in red through S and B′.

The probability in the denominator corresponds to all branches in green that lead to B′. Since the events along each branch are disjoint, the probabilities for each branch add. This gives us

So the likelihood that an unblocked email is spam is 0.24%.

Users are typically very tolerant of getting spam that has made it through a spam filter. However, they are not very tolerant of blocked emails turning out to not be spam. This probability is P(S′|B). We can compute this probability in a similar manner:

This likelihood equates to 0.012%. This should make customers very happy since it means that there important emails will rarely be blocked by the spam filter.