Eleisha's Segment 2: Bayes

From Computational Statistics Course Wiki
Revision as of 11:18, 23 January 2014 by Eleishaj (talk | contribs)
Jump to navigation Jump to search

To Calculate:

1. If the knight had captured a Gnome instead of a Troll, what would his chances be of crossing safely?


2. Suppose that we have two identical boxes, A and B. A contains 5 red balls and 3 blue balls. B contains 2 red balls and 4 blue balls. A box is selected at random and exactly one ball is drawn from the box. What is the probability that it is blue? If it is blue, what is the probability that it came from box B?

A = Drawn from Box A

B = Drawn from Box B

Probability that the drawn ball is blue = Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(Blue) = P(Blue 1 }

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(Blue) }

Hypothesis 1 (H_1) = The ball was drawn from box A Hypothesis 2 (H_2) = The ball was drawn from box B


Probability that if the drawn ball is blue then it came from box B = Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(H_2 | Blue) } Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(H_2 | Blue) = \frac{P(Blue | H_2)P(H_2)}{P(Blue | H_1)p(H_1) + P(Blue| H_2)P(H_2)} = \frac{(\frac{1}{2})(\frac{4}{6})}{ (\frac{3}{16}) + (\frac{4}{12})} = \frac{16}{25} = 0.64 }