Read · 1 min

Tricky Bayes’ Rule Calculation Example\text{Tricky Bayes' Rule Calculation Example}

===

Jolie and her daughter want to go to the beach and sunbathe tomorrow. In recent years, it has rained only 5 days each year. Unfortunately, the weatherman has predicted rain for tomorrow.

When it actually rains, the weatherman correctly forecasts rain 90% of the time.

When it doesn't rain, he incorrectly forecasts rain 10% of the time.


What is the probability that it will rain tomorrow?

Solution:

We are interested in the probability that it will rain tomorrow, given that the weather man predicted rain.

Event A1A_1. It rains tomorrow.

Event A2A_2. It does not rain tomorrow.

Event BB. The weatherman predicts rain.

In other words, we are interested in P(A1∣B)P(A_1|B)


We can solve for this using the values that were indirectly given to us and Bayes' Rule.

P(A1)=5/365=0.0136985P( A_1 ) = 5/365 =0.0136985 [It rains 5 days out of the year.]

P(A2)=360/365=0.9863014P( A_2 ) = 360/365 = 0.9863014 [It does not rain 360 days out of the year.]

P(B∣A1)=0.9P( B | A_1 ) = 0.9 [When it rains, the weatherman predicts rain 90% of the time.]

P(B∣A2)=0.1P( B | A_2 ) = 0.1 [When it does not rain, the weatherman predicts rain 10% of the time.]


probability that the weatherman predicts rain == probability that weatherman predicts rain and it actually rains + probability that weather man predicts rain and it does not actually rain

P(A∩B)=P(A∣B)P(B)P(A \cap B) = P(A|B)P(B)

P(B)=P(B∩A1)+P(B∩A2)=P(A1)P(B∣A1)+P(A2)P(B∣A2)P(B)= P(B \cap A_1) + P(B \cap A_2 ) =P( A_1 ) P( B | A_1 ) + P( A_2 ) P( B | A_2 )

P(A1∣B)=P(A1)P(B∣A1)P(A1)P(B∣A1)+P(A2)P(B∣A2)P( A_1 | B ) = \frac{P( A_1 ) P( B | A_1 )}{P( A_1 ) P( B | A_1 ) + P( A_2 ) P( B | A_2 )}

P(A1∣B)=(0.014)(0.9)(0.014)(0.9)+(0.986)(0.1)P( A_1 | B ) = \frac{(0.014)(0.9)}{ (0.014)(0.9) + (0.986)(0.1) }

P(A1∣B)=0.113P( A_1 | B ) = 0.113

11.3% chance of rain tomorrow? Thats actually not that likely. Especially if Jolie and her daughter consider that it is even less likely for it to rain the ENTIRE day tomorrow. Hopefully there is an hour of sunshine.

Put ideas together

Contest problems often need this idea together with one or two others. That is where understanding goes deeper than memory. These are real problems from the AMC 8 and AMC 12, the national math competitions for middle and high school students, each with a worked solution on LIVE by Po-Shen Loh.

Read · 1 min

One tool to find the conditional probability is known as Bayes' Rule. Here's what it says:

Suppose that we have events AA and BB. Then we can compute the conditional probability as P(A∣B)=P(A)P(B∣A)P(B).P(A \mid B) = \frac{ P(A) P(B\mid A) }{ P(B) }. Here, P(A∣B)P(A \mid B) is the conditional probability of observing AA given that BB is true, while P(A)P(A) and P(B)P(B) are the probabilities of observing AA or BB, without regard to the other.

Equivalently, we can express Bayes' Rule as P(A)P(B∣A)=P(B)P(A∣B).P(A) P(B\mid A) = P(B) P(A \mid B).

Illustrated · 2 min

Calculating Conditional Probability

We've learned about independent events and are ready to move on!

As a reminder, conditional probability is the probability of an event occurring given that another event has already occurred. We use conditional probability in various fields in the real-world, including machine learning, statistics, and real-world decision-making.

To find the conditional probability, we can use a straightforward formula.

Conditional Probability
P(A|B) = [P(A) * P(B|A)]/[P(B)]

Image source: by Anusha Rahman

The formula is:

P(A∣B)=P(A)⋅P(B∣A)P(B)P(A|B) = \frac{P(A) \cdot P(B|A)}{P(B)}

Real-Life Uses of Bayes' Rule

  • Bayes' Rule can be used to determine the accuracy of medical test results or medications by taking into consideration how likely any given person is to have a disease or symptom and the general accuracy of the test/drug.

  • In finance, Bayes' Rule can be used to rate the risk of lending money to potential borrowers.

Essentially, the theorem provides a way to revise existing predictions of how likely an event is to occur given additional related probabilities/evidence.

We can use a tree diagram or a venn diagram to consider conditional probability, depending on the complexity of the problem. With a tree diagram, we can graphically represent conditional probability. At each branch of the tree, we consider the outcome of a different event. A venn diagram is another way of graphically representing conditional probability, typically used to illustrate set relationships.

In essence, conditional probability plays a vital role in making decisions based on test results, incorporating prior knowledge, and understanding the relationship between events. Conditional probability requires more strategic thinking than most of the other concepts we've learned so far in probability theory.

####Cancer Example

Let's say you are a medical researcher. We have a population of individuals, some of whom have cancer and some who don't. We also have a diagnostic test to determine whether someone has cancer or not.

  • True positive results: The test correctly identifies individuals who have cancer as positive.
  • False positive results: The test incorrectly identifies individuals without cancer as positive.
  • True positive rate: The proportion of individuals with cancer who test positive correctly.
  • Positive test result: The test indicates the presence of cancer, regardless of whether the person has cancer or not.
  • Negative test result: The test indicates the absence of cancer, regardless of whether the person has cancer or not.

To calculate the conditional probability of having cancer given a positive test result, we could use the formula:

P(Cancer∣Positive Test)=P(Cancer and Positive Test)P(Positive Test)P(\text{Cancer}|\text{Positive Test}) = \frac{P(\text{Cancer and Positive Test}) }{P(\text{Positive Test})}

In the next lesson, you will learn how to use two way tables! You will also use this concept to use conditional probability to determine independence.

In the last lesson in this topic, you will learn about binomial probability.

Video

(Video) How to Calculate Conditional Probability

by statisticsisfun

In this video by statisticsisfun, you will learn how to calculate conditional probability using Bayes Theorem.

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems