0
$\begingroup$

"Consider a sequence of independent trials each with the same probability of success $0\leq p\leq 1.$ Let $X$ be the number of successes in three trials and $Y$ be the number of trials necessary to obtain the first success. Find, as a function of $p$, $cov(X,Y)$ and show that $cov(X,Y)\leq 0$ for every $p\in [0,1]$."

What I have done:

$P(X=k)=\binom{3}{k}p^{3-k}(1-p)^k$, $P(Y=k)=(1-p)^{k-1}p$, $E(X)=\sum_{k=0}^{3}kP(X=k)=\sum_{k=0}^{3}k\binom{3}{k}p^{3-k}(1-p)^k=(1-p)(p^2+p+1),$ $E(Y)=\sum_{k=0}^{3}k(1-p)^{k-1}p=p(6-8p+3p^2),$ $E(XY)=\sum_{k=0}^{3}k\binom{3}{k}p^{4-k}(1-p)^{2k-1}=3p^3(1-p)+6p^2(1-p)^3+3p(1-p)^5$ so $\fbox{$cov(X,Y)=E(XY)-E(X)E(Y)=$}3p^3(1-p)+6p^2(1-p)^3+3p(1-p)^5-(1-p)(p^2+p+1)p(6-8p+3p^2)=p^5-9p^4+12p^3-p^2-3p=\fbox{$p(p-1)^2(p^2-7p-3)$}$ and since $p$ and $(p-1)^2\geq 0$ and $p^2-7p-3<0$ for $p\in [0,1]$ we have that $cov(X,Y)\leq 0$ for $p\in [0,1],$ as desired. $\square$

I would like to have some feedback about my solution, thanks.

$\endgroup$

1 Answer 1

1
$\begingroup$

$X=Z_1 + Z_2 + Z_3$ where $Z_i$ are i.i.d. Bernoulli random variables with mean $p$, so $E[X] = E[Z_1] + E[Z_2] + E[Z_3] = 3p$.


$Y$ can take values in $1,2,3,\ldots$ to infinity, not $0,1,2,3$. You can check that this is a geometric distribution and the mean is $E[Y] = 1/p$.


Let "S" denote success and "F" denote failure. We can go through the 8 cases of what the first three outcomes are.

\begin{align} &E[XY] \\ &= 3 \cdot 1 \cdot P(SSS) + 2 \cdot 1 \cdot (P(SSF) + P(SFS)) + 2 \cdot 2 \cdot P(FSS) + 1 \cdot 2 \cdot P(FSF) + 1 \cdot 3 \cdot P(FFS) + 0 \cdot P(FFF) \\ &= 3p^3 + 8p^2 (1-p) + 5 p(1-p)^2 \\ &= (5-2p)p \end{align}


$\text{Cov}(X,Y) = (5-2p)p - 3$ which is a quadratic in $p$, and you can easily check that it is below $0$ for $p \in (0,1)$.

$\endgroup$
2
  • $\begingroup$ thank you for your interest in my question; shouldn't $$E[XY] = 3 \cdot 1 \cdot P(SSS) + 2 \cdot 1 \cdot (P(SSF) + P(SFS)) + 2 \cdot 2 \cdot P(FSS) + 1 \cdot 2 \cdot P(FSF) + 1 \cdot 3 \cdot P(FFS) + 0 \cdot P(FFF)$$ be equal to $$3p^3+2\cdot 2 p^2 (1-p)+4(1-p)p^2+2(1-p)^2 p+3p(1-p)^2$$? $\endgroup$
    – lorenzo
    Apr 15, 2022 at 22:08
  • $\begingroup$ @lorenzo Thanks for the correction; updated my answer. $\endgroup$
    – angryavian
    Apr 16, 2022 at 0:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .