Not sure if you still need the answer to this but here it is:
A) We're looking for P (A | First = G, Second = R)
We develop: P (A | First = G, Second = R) = P ( A intersection First = G, Second = R) / P (First = G, Second = R) -- We can apply the bayes theorem here
We now have: P (First = G, Second = R) | A) * P ( A ) / P (First = G, Second = R) ---- We already know P (A) and can calculate the missing pieces
We get: 5/7 * 2/6 * 0.3 / [ 5/7 * 2/6 * 0.3 + 4/7 * 3/6 * 0.7 ] = 0.2632
We're looking for P ( Third = R | Second = R, First = G) = P ( Third = R intersection First = G, Second = R) / P (First = G, Second = R)
We already calculated the denominator in A), ---> [ 5/7 * 2/6 * 0.3 + 4/7 * 3/6 * 0.7 ], now lets find the num.
We basically have to find that sequence for both types of urs, A and B.
We get: 5/7 * 2/6 * 1/5 * 0.3 + 4/7 * 3/6 * 2/5 * 0.7 / [ 5/7 * 2/6 * 0.3 + 4/7 * 3/6 * 0.7 ] = 0.3474
Hope that helps
This post was edited by Pasc on Feb 19 2022 08:07pm