[Exer5-1]Example 3.10 of Book {Devore2017B} P.104
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(累积分布函数).