Sampling with and without replacement

probabilitystatistics

A box contains 5 tickets. An unknown number of them are red, the rest are green. Suppose that to start off with you think there are equally likely to be 0, 1, 2, 3, 4, or 5 red tickets in the box. Three tickets are drawn from the box between draws. The tickets are red, green, and red. Given this information, what is the chance that there are actually 3 red tickets in the box?
a) with replacement (Answer: 0.36)
b) without replacement (Answer: 0.4)

So far I have done this: P(RRRGG|RGR) = P(RRRGG & RGR)/P(RGR) = P(RRRGG)/P(RGR), but I do not know what to do next because I keep getting the wrong answer.

Best Answer

a) [with replacement] We start by calculating the prob of drawing $R,G,R$ given first 0, then 1, then 2, then 3, then 4, then 5 reds initially in the bag.

$p(RGR|0)=0$; $p(RGR|1)=(1/5)(4/5)(1/5)$; $p(RGR|2)=(2/5)(3/5)(2/5)$; $p(RGR|3)=(3/5)(2/5)(3/5)$; $p(RGR|4)=(4/5)(1/5)(4/5)$; $p(RGR|5)=0$.

So inverting, using Bayes' Th we get that $p(3|RGR)=p(RGR|3)/(p(RGR|0)+\dots+p(RGR|5)=18/(4+12+18+16)=18/50=0.36$.

(b) [without replacement] $p(RGR|0)=p(RGR|1)=0$; $p(RGR|2)=(2/5)(3/4)(1/3)=6/60$; p(RGR|3)=(3/5)(2/4)(2/3)=12/60$; p(RGR|4)=(4/5)(1/4)(3/3)=12/60$.

So $p(3|RGR)=12/(6+12+12)=12/30=0.40$.