Learning from Data
HW1:
Bins and Marbles 3. We have 2 opaque bags, each containing 2 balls. One bag has 2 black balls and the other has a black ball and a white ball. You pick a bag at random and then pick one of the balls in that bag at random. When you look at the ball, it is black. You now pick the second ball from that same bag. What is the probability that this ball is also black?
A. Baye's Th
Assume: Bag1 has 2 black balls, Bag2 has 1 white/1black ball
We want to find out the prob that we took the bag1 given the first ball is black.
P(bag=1|firstball=black) =
P(firstball=black|bag=1)P(bag=1)|P(firstball=black)=
1*.5 /(P(firstball=black|bag=1)P(bag=1) +P(firstball=black|bag=2)P(bag=2))=
0.5 /(1*0.5+0.5*0.5)= 0.5/.75 = 2/3
________________________________________________________
Consider a sample of 10 marbles drawn from a bin that has red and green marbles. The probability that any marble we draw is red is μ = 0.55 (independently, with replacement). We address the probability of getting no red marbles (ν = 0) in the following cases:
4. We draw only one such sample. Compute the probability that ν = 0. The closest answer is (closest is the answer that makes the expression |your answer− given option| closest to 0):
.0003405 (Binomial with nCr , n=r=10 , answer is (1-μ)^10
5. We draw 1,000 independent samples. Compute the probability that (at least) one of the samples has ν = 0. The closest answer is:
Prob(that at least one sample has v=0) = 1-no sample has v=0
= 1 - (1-.0003405)^1000=0.289








