Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Bayesian inference
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Probability of a hypothesis=== {| class="wikitable floatright" style="font-size:100%;" |+ [[Contingency table]] ! {{diagonal split header|<br />Cookie|Bowl}} ! #1<br />''H''<sub>1</sub> !! #2<br />''H''<sub>2</sub> !! rowspan="4" style="padding:0;"| !! <br />Total |- ! Plain, ''E'' | '''30''' || 20 || '''50''' |- ! Choc, Β¬''E'' | 10 || 20 || 30 |- ! Total | 40 || 40 || 80 |- | colspan="5"|''P''(''H''<sub>1</sub>|''E'') = 30 / 50 = 0.6 |} Suppose there are two full bowls of cookies. Bowl #1 has 10 chocolate chip and 30 plain cookies, while bowl #2 has 20 of each. Our friend Fred picks a bowl at random, and then picks a cookie at random. We may assume there is no reason to believe Fred treats one bowl differently from another, likewise for the cookies. The cookie turns out to be a plain one. How probable is it that Fred picked it out of bowl #1? Intuitively, it seems clear that the answer should be more than a half, since there are more plain cookies in bowl #1. The precise answer is given by Bayes' theorem. Let <math>H_1</math> correspond to bowl #1, and <math>H_2</math> to bowl #2. It is given that the bowls are identical from Fred's point of view, thus <math>P(H_1)=P(H_2)</math>, and the two must add up to 1, so both are equal to 0.5. The event <math>E</math> is the observation of a plain cookie. From the contents of the bowls, we know that <math>P(E \mid H_1) = 30/40 = 0.75</math> and <math>P(E \mid H_2) = 20/40 = 0.5.</math> Bayes' formula then yields <math display="block">\begin{align} P(H_1 \mid E) &= \frac{P(E \mid H_1)\,P(H_1)}{P(E \mid H_1)\,P(H_1)\;+\;P(E \mid H_2)\,P(H_2)} \\ \\ \ & = \frac{0.75 \times 0.5}{0.75 \times 0.5 + 0.5 \times 0.5} \\ \\ \ & = 0.6 \end{align}</math> Before we observed the cookie, the probability we assigned for Fred having chosen bowl #1 was the prior probability, <math>P(H_1)</math>, which was 0.5. After observing the cookie, we must revise the probability to <math>P(H_1 \mid E)</math>, which is 0.6.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)