a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment
wasoxygen  ·  2767 days ago  ·  link  ·    ·  parent  ·  post: Probably Overthinking It: Bayes' Theorem is not optional

The four-part Probability is Hard series convinced me of the utility of using a simulator to map out the probability space. Sometimes it seems like overkill to actually write and execute the code, but with these tricky problems it's good to be thorough.

Let's see if I can talk my way through how a simulator would work.

I simulate a million days in Seattle. They break down as follows:

300,000 rainy days

700,000 sunny days

Each day, I call Albert.

On 200,000 rainy days, Albert is honest and says "yes it is raining."

On 100,000 rainy days, Albert lies and says "no it is not raining."

On 466,667 sunny days, Albert is honest and says "no it is not raining."

On 233,333 sunny days Albert lies and says "yes it is raining."

In this problem Albert says yes. So it is actually raining in 200,000 out of 433,333 cases in which I hear yes, about 46% of the time.

Next I call Betty. Ignoring the cases in which Albert said "no" I find four cases:

Of the 200,000 rainy days on which Albert said "yes," Betty will be honest and say "yes" on 133,333 days.

Of the 200,000 rainy days on which Albert said "yes," Betty will lie and say "no" on 66,667 days.

Of the 233,333 sunny days on which Albert said "yes," Betty will be honest and say "no" on 155,556 days.

Of the 233,333 sunny days on which Albert said "yes," Betty will lie and say "yes" on 77,778 days.

In this problem Betty says yes. So it is actually raining in 133,333 days out of 211,111 days in which I hear a second yes, about 63% of the time.

Next I call Charlie. Ignoring the cases in which Betty said "no" I find four cases:

Of the 133,333 rainy days on which Albert and Betty said "yes," Charlie will be honest and say "yes" on 88,889 days.

Of the 133,333 rainy days on which Albert and Betty said "yes," Charlie will lie and say "no" on 44,444 days.

Of the 77,778 sunny days on which Albert and Betty said "yes," Charlie will be honest and say "no" on 51,852 days.

Of the 77,778 sunny days on which Albert and Betty said "yes," Charlie will lie and say "yes" on 25,926 days.

In this problem Charlie says yes. So it is actually raining in 88,889 days out of 114,815 in which I hear yes three times, about 77% of the time.

This does not match the given answer of 47%, but my prior estimate of rain (30%) is higher than the 10% used in the article. If my arithmetic is correct, this tedious approach seems like a reliable way to get a result that is comprehensible.

I am still not sure how to use the formula to get an answer; the article throws in a "Bayes factor" which makes sense but seems like a shortcut.