1
$\begingroup$

Let $X$ and $Y$ be exponential random variables with parameters 1 and 2. A coin has probability of getting heads as $p$ and probability of getting tails as $1-p$. Let $Z$ be another random variable such that $Z=X$, if the coin turns heads and $Z=Y$, if the coin turns tails. Find $p(1\leq Z \leq 2)$.

MY WORK: $P(1<=Z<=2)=P(1<=X<=2|Z=X) + P(1<=Y<=2|Z=Y) = P(1<=X<=1) + P(1<=Y<=1)$ I could proceed very easily like this, but is this correct?

$\endgroup$
1
  • 2
    $\begingroup$ can you share what have you done so far? Also, which exponential dist. format are you using? $\endgroup$
    – gunes
    Commented Jun 27, 2020 at 16:43

1 Answer 1

0
$\begingroup$

$$P(1<Z<2) = P(1<X<2 \vert \mbox{coin was heads})P(\mbox{coin was heads}) + P(1<Y<2 \vert \mbox{coin was tails})P(\mbox{coin was tails})$$

If my algebra does not betray me,

$$P(1<Z<2) = 0.23\cdot 0.5 + 0.12\cdot0.5 = 0.175$$

Some simulations...

set.seed(0)
coin = rbinom(10000,1,0.5)
z = rexp(length(coin), rate = 1+coin)
mean((1<z)&(z<2))
>>>0.1769

Which is within simulation error of my result.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.