# Random Variables and Probability

So I encountered this problem while I was studying for exam. However, I cannot wrap my head around the solution that the answer key provided.

The problem goes like this:

Bob watches cars that pass by his house. Bob assumes that each successive car that goes by has a $$\frac{1}{4}$$ chance of being a Japanese car and $$\frac{3}{4}$$ chance of being an American car. If his assumption is right, what is the probability that Bob will see at least two Japanese cars pass by before the $$3^{rd}$$ American car passes by.

From my understanding, the perfect case would be only five cars intotal$$(2\ Japanese\ cars\ and \ 3\ American\ cars)$$ pass by his house and he sees the $$3^{rd}$$ American car the last. Such as, $$JJAA\ or\ JAJA$$, and then followed by the $$3^{rd}A$$, the probability of this case would be $$6\cdot(\frac{1}{4})^2\cdot(\frac{3}{4})^3$$. I realized that this may not be the right approach because it could be the case like $$JJJJAAA$$ or even more $$A's$$ before three $$D's$$. I also tried to approach the problem by using complement of $$A\geq2$$ with $$A=0\ and \ A=1$$. But all of this is still under the assumption of only five cars intotal pass by. I'm stuck now....

Any help would be appreciated.

• Try solving the complementary problem: probability of seeing less than two J's before the third A. – Moss Murderer Jan 21 at 7:32

This is simply $$1-$$ P($$AAA$$, $$JAAA,AJAA,AAJA$$). Because, in all other situations, you get two Japanese cars before the 3rd American car. These have $$(1-p)^3,p^2(1-p)^3,p^2(1-p)^3,p^2(1-p)^3$$ probabilities respectively. Summing them yields, $$(1+3p)(1-p)^3=189/256$$, subtracting from $$1$$ yields $$67/256$$.