Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M&M problem in chapter 2: Bayes' theoreom #44

Closed
NaraMB opened this issue Jul 1, 2021 · 2 comments
Closed

M&M problem in chapter 2: Bayes' theoreom #44

NaraMB opened this issue Jul 1, 2021 · 2 comments

Comments

@NaraMB
Copy link

NaraMB commented Jul 1, 2021

After thinking through and solving the problem successfully, I looked at solution.
A subtle (and even trivial, may be) change in defining hypothesis and data could be

Hypotheses A: one M&M from 94, another from 96
Hypotheses B: one from 96, another from 94
Given: one is yellow and one is green

Here, formulation of hypothesis is based on the information in the problem. (one from each bag; it could be of any color)
Data or Given is yellow from one and green from another, which changes the likelihood based on the color.

If we state hypothesis as "green from 1994 and yellow from 1996", it seems like hypothesis itself is defined based on the Data :). It took me a while to figure it out.
Is my understanding correct here?

@AllenDowney
Copy link
Owner

AllenDowney commented Jul 1, 2021 via email

@MassD
Copy link

MassD commented May 29, 2023

@NaraMB

I think there might be an easier-to-understand way for the hypotheses and data

Data: Got Y (yellow) and G (green), and each from one bag respectively.

Hypotheses: Y is from b94

Since the data already assumed one from each bag, we can ignore the cases where Y and G are from the same bag.

Here is the Bayes'

$$P(Y_{b94} | YG) = p(Y_{b94}) * P(YG | Y_{b94}) \over P(YG)$$

where

$P(Y_{b94}) = P(b94) * P(Y | b94) = {1 \over 2 }* 0.2$ (Theorem 2 on page 13)

$P(YG | Y_{b94}) = P (G_{b96}) = 0.2$, as since Y is already from b94, G must be from b96, thus 0.2

$P(YG) = P(Y_{b1994}) * P(YG | Y_{b1994}) + P(Y_{b1996}) * P(YG | Y_{b1996}) = {1 \over 2+1 }* 0.2 * 0.2 + {1 \over 2 }*0.14*0.1$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants