Answer

问题及解答

[Exer5-1]Example 3.10 of Book {Devore2017B} P.104

Posted by haifeng on 2020-03-23 17:24:38 last update 2020-03-23 17:26:21 | Edit | Answers (1)

Starting at a fixed time, we observe the gender of each newborn child at a certain hospital until a boy ($B$) is born. Let $p=P(B)$, assume that successive births are independent, and define the rv $X$ by $X=$ number of births observed. Then
\[
\begin{aligned}
p(1)&=P(X=1)=P(B)=p,\\
p(2)&=P(X=2)=P(GB)=P(G)\cdot P(B)=(1-p)p,\\
\end{aligned}
\]
and
\[
p(3)=P(X=3)=P(GGB)=P(G)\cdot P(G)\cdot P(B)=(1-p)^2 p.\\
\]
Continuing in this way, write the general formula for the pmf $p(x)$. And compute the following

  • the cdf $F(x)$.
  • $E(X)$
     

Remark. Here rv stands for random variable(随机变量), pmf stands for probability mass function (or probability density function 概率密度函数), and cdf stands for cumulative distribution function(累积分布函数).

1

Posted by haifeng on 2020-03-23 19:46:39

The general formula for the pmf $p(x)$ is

\[
p(x)=\begin{cases}
(1-p)^{x-1}p,& x=1,2,3,\ldots\\
0,&\text{otherwise}
\end{cases}
\]


CDF (See Example 3.12 in Book [1] on page 106)

For any positive integer $x$,

\[
\begin{split}
F(x)&=\sum_{y\leqslant x}p(y)=\sum_{y=1}^{x}p(y)\\
&=\sum_{y=1}^{x}(1-p)^{y-1}p=p\sum_{y=0}^{x-1}(1-p)^y\\
&=p\cdot\frac{1-(1-p)^x}{1-(1-p)}\\
&=1-(1-p)^x
\end{split}
\]

Since $F$ is constant in between positive integers,

\[
F(x)=\begin{cases}
0, & x < 1,\\
1-(1-p)^{[x]},& x\geqslant 1,
\end{cases}
\] 

where $[x]$ is the largest integer $\leqslant x$. 


Calculate the expected value $E(X)$.  (See Example 3.18 in Book [1] on page 112)

\[
\begin{split}
E(X)&=\sum_{x=1}^{\infty}x\cdot p(x)=\sum_{x=1}^{\infty}xp(1-p)^{x-1}\\
&=p\sum_{x=1}^{\infty}\biggl[-\frac{d}{dp}(1-p)^x\biggr]
\end{split}
\]

Here we can interchange the order of taking the derivative and the summation,

\[
\begin{split}
E(X)&=p\sum_{x=1}^{\infty}\biggl[-\frac{d}{dp}(1-p)^x\biggr]\\
&=(-p)\frac{d}{dp}\biggl[\sum_{x=1}^{\infty}(1-p)^x\biggr]\\
&=(-p)\frac{d}{dp}\frac{(1-p)^1}{1-(1-p)}\\
&=(-p)\frac{d}{dp}(\frac{1}{p}-1)\\
&=(-p)\cdot\frac{-1}{p^2}\\
&=\frac{1}{p}
\end{split}
\]

It means that if $p$ near $1$, we expect to see a boy very soon. If $p$ is near $0$, we expect many births before the first boy. For $p=.5$, $E(X)=2$.


References:

[1] Jay L. Devore, Probability and Statistics For Engineering and The Sciences (Fifth Edition)