So let's say Jack is waiting in line for the zoo. If Boo the monkey is present on a day, the average wait time is $40$ minutes. If Boo's not there, it's $10$ minutes. On any given day there's a $7\%$ chance that Boo's there. Jack happens to wait $25$ minutes in line. What is the probability that Boo was present?
So the waiting time is a RV with an exponential distribution, so the PDF is $fX(t)= (1/\beta)\exp(−t/\beta)$
Do I use two PDF's for each case (present and not present) with betas of $40$ and $10$ respectively? Sorry, not entirely sure how this problem should be solved. If anyone could help with how to enter it in $R$ that would be great, thanks in advance!
So far: $fx(\text{present} | t=25) = (fx(t=25 | \text{present}) \times P(\text{present})) / fx(t)$
But don't know how to calculate any of these, or if they're correct at all. Thanks again!
If $P$ is a random variable that is one if the monkey is present and zero if not, we have $$ f_{T\mid P}(t\mid P=1) = \frac{1}{40}e^{-t/40}\\f_{T\mid P}(t\mid P=0) = \frac{1}{10}e^{-t/10}\\Pr(P=1) = \frac{7}{100}\\Pr(P=0) = \frac{93}{100}$$ and the Bayes rule gives $$ Pr(P=1\mid T=25)= \frac{f_{T\mid P}(25\mid P=1)Pr(P=1)}{f_{T\mid P}(25\mid P=1)Pr(P=1)+f_{T\mid P}(25\mid P=0)Pr(P=0)}$$