1

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?

Nisha
  • 124
  • 2
    can you share what have you done so far? Also, which exponential dist. format are you using? – gunes Jun 27 '20 at 16:43

1 Answers1

0

$$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.