1. a. Let X denote the first chicken pulled out randomly from coop B. Let Y be the 2 chickens that escape from coop A to coop B. P(X=F) = P(X=F|Y=MM)P(Y=MM) + P(X=F|Y=FF)P(Y=FF) + P(X=F|Y=MF)P(Y=MF) P(X=F) = (10C1/17C1) x ( 10C2/15C2) + (12C1/17C1)x (5C2/15C2) + (11C1/17C1)x (10C1 x 5C1/15C2) P(X=F) = 0.627 1.b. Let Z the second chicken pulled out randomly from coop B. P(Z=F|X=F) = P(Z=F,X=F)/P(X=F) Notice that P(Z=F,X=F) is the probability of picking 2 chickens from coop B both of which are female. P(Z=F,X=F) = P(Z=F,X=F|Y=MM)P(Y=MM) + P(Z=F,X=F|Y=FF)P(Y=FF) + P(Z=F,X=F|Y=MF)P(Y=MF) P(Z=F,X=F) = (10C2/17C2)x ( 10C2/15C2) + (12C2/17C2)x (5C2/15C2) + (11C2/17C2)x (10C1 x 5C1/15C2) P(Z=F,X=F) = 0.38 Therefore, P(Z=F|X=F) = 0.38/0.627 = 0.606 2.a Let X0 be the initial distribution over the states of the cat. Thus, X0=[1 0 0 0] Let T be the given transition matrix. Then after 4 hours, the distribution over the states of the cat will be: X4= X0 x T x T x T x T X4=[0.239 0.305 0.228 0.227] Thus the probability that cat is asleep after 4 hours is 0.227. 2.b. Let Xt and Xt-‐1 be the current and previous state distributions of the cat. The intent of the question was to calculate P(Xt-‐1|Xt) P(Xt-‐1|Xt) = P(Xt|Xt-‐1). P(Xt-‐1)/P(Xt) Assuming uniform distribution for the prior, P(Xt-‐1) = { happy=0.25, hungry=0.25, angry=0.25, asleep=0.25} P(Xt-‐1|Xt) = P(Xt|Xt-‐1). P(Xt-‐1) / Σ Xt-‐1 P(Xt| Xt-‐1).P(Xt-‐1) P(Xt-‐1 = happy|Xt) = 0.5 * 0.25 / (0.5*0.25 + 0.5 * 0.25) = 0.5 P(Xt-‐1 = hungry|Xt) = 0.0 * 0.25 / (0.5*0.25 + 0.5 * 0.25) = 0.0 P(Xt-‐1 = angry|Xt) = 0.0 * 0.25 / (0.5*0.25 + 0.5 * 0.25) = 0.0 P(Xt-‐1 = asleep|Xt) = 0.5 * 0.25 / (0.5*0.25 + 0.5 * 0.25) = 0.5 An interpretation of the problem could have been to determine P(P(Xt-‐1=happy) While this was not the intent, it was accepted as an answer Xt= Xt-‐1 x T Since cat is currently happy, we know that Xt=[1 0 0 0]. Thus, Xt-‐1=T-‐1 Xt Thus, Xt-‐1=[17 -‐5 4 -‐15] The values of Xt-‐1 are not probabilities because the probabilities assigned to current state are unreachable from a valid state at time (t-‐1).
© Copyright 2026 Paperzz