# Is this a correct way to continually update a probability using Bayes Theorem?

Let's say I'm trying to find out the probability that someone's favorite ice cream flavor is vanilla.

I know that the person also enjoys horror movies.

I want to find out the probability that the person's favorite ice cream is vanilla given that they enjoy horror movies.

I know the following things:

1. $5\%$ of people choose vanilla as their favorite ice cream flavor. ( This is my $P(A)$ )
2. $10\%$ of people whose favorite is vanilla ice cream also love horror movies. ( This is my $P(B|A)$ )
3. $1\%$ of people whose favorite is not vanilla ice cream also love horror movies ( This is my $P(B|\lnot A)$ )

So, I calculate it like this: $$P(A|B)=\frac{0.05\times0.1}{(0.05 \times 0.1)+(0.01 \times(1-0.05))}$$ I find that $P(A|B) = 0.3448$ (rounded to the nearest ten-thousandth). There is a $34.48\%$ chance that a horror movie fan's favorite ice cream flavor is vanilla.

But then I learn that the person has seen a horror movie in the past 30 days. Here's what I know:

1. $34.48\%$ is the updated posterior probability that vanilla is the person's favorite ice cream flavor -- the $P(A)$ in this next problem.
2. $20\%$ of people whose favorite is vanilla ice cream have seen a horror movie in the past 30 days.
3. $5\%$ of people whose favorite is not vanilla ice cream have seen a horror movie in the past 30 days.

This gives: $$\frac{0.3448\times0.2}{(0.3448\times0.2)+(0.05\times(1-0.3448))} = 0.6779$$ when rounded.

So now I believe there is a $67.79\%$ chance that the horror movie fan loves ice cream given that they've seen a horror movie in the past 30 days.

But wait, there is another thing. I also learned that the person owns a cat.

Here's what I know:

1. $67.79\%$ is the updated posterior probability that vanilla is the person's favorite ice cream flavor -- the $P(A)$ in this next problem
2. $40\%$ of people whose favorite is vanilla ice cream also own cats
3. $10\%$ of people whose favorite is not vanilla ice cream also own cats

This gives: $$\frac{0.6779\times0.4}{(0.6779\times 0.4)+(0.1\times(1-0.6779))} = 0.8938$$ when rounded.

My question basically boils down to this: Am I correctly updating probability using Bayes' theorem? Am I getting anything else wrong in my methods?

• love = favorite? you're not posting degrees of loving. if you love it, it is your favorite. clarify if needed. Dec 19, 2012 at 9:10
• Good point. I changed "love" to "favorite." It's not grammatically correct, but it's less wordy than saying "choose vanilla for their favorite ice cream flavor." I hope that clears things up. Dec 19, 2012 at 14:16