The mean of a geometric random variable

92 Views Asked by At

The mean of a geometric random variable is

$$ \frac{1-p}{p} $$

What would be the mean of x for this density function?

$$ f_{x}(x) = \sum_{k=0}^{\infty} p(1-p)^{k} \delta (x-k) $$ I got confused with the delta function!

2

There are 2 best solutions below

1
On BEST ANSWER

The Dirac delta function is zero everywhere except when its argument is zero, and integrates to become a one. Since the support of the function $f$ is a discrete set (all the nonnegative integers), integrating over it (e.g. finding the mean using $\int_{\Bbb R}xf(x)\,dx$) is the same as doing a summation over that discrete set. To pick $k=4$ at random, $$\int_{\Bbb R} xp(1-p)^4\delta(x-4)\,dx = 4p(1-p)^4,$$ since the only value of $x$ that matters is $x=4$, because that's where the delta function has support, and we substitute that value in. Integrating a sum is the sum of the integrals, so the integral just becomes the traditional discrete formula $$\sum_{k=0}^\infty kp(1-p)^k.$$

2
On

Using $$ \int_{\mathbb{R}}x\,\delta(x-k)\,\mathrm{d}x=k $$ and $$ \begin{align} \sum_{k=0}^\infty kx^{k-1} &=\frac{\mathrm{d}}{\mathrm{d}x}\sum_{k=0}^\infty x^k\\ &=\frac{\mathrm{d}}{\mathrm{d}x}\frac1{1-x}\\ &=\frac1{(1-x)^2} \end{align} $$ we get $$ \begin{align} \color{#00A000}{\int_{\mathbb{R}}x}\sum_{k=0}^\infty p(1-p)^k\color{#00A000}{\delta(x-k)\,\mathrm{d}x} &=\sum_{k=0}^\infty \color{#00A000}{k}p(1-p)^k\\ &=p(1-p)\sum_{k=0}^\infty k\color{#C00000}{(1-p)}^{k-1}\\ &=p(1-p)\frac1{(1-\color{#C00000}{(1-p)})^2}\\ &=\frac{1-p}{p} \end{align} $$


We can use $$ \begin{align} \sum_{k=0}^\infty k(k-1)x^{k-2} &=\frac{\mathrm{d}^2}{\mathrm{d}x^2}\sum_{k=0}^\infty x^k\\ &=\frac{\mathrm{d}^2}{\mathrm{d}x^2}\frac1{1-x}\\ &=\frac2{(1-x)^3} \end{align} $$ to get the variance, $$ \begin{align} \mathrm{E}\left((X-\mathrm{E}(X))^2\right) &=\mathrm{E}\left(X^2\right)-2\mathrm{E}(X)\mathrm{E}(X)+\mathrm{E}(X)^2\\ &=\mathrm{E}\left(X^2\right)-\mathrm{E}(X)^2\\ &=\sum_{k=0}^\infty k^2p(1-p)^k-\left(\frac{1-p}{p}\right)^2\\ &=\sum_{k=0}^\infty k(k-1)p(1-p)^k+\sum_{k=0}^\infty kp(1-p)^k-\left(\frac{1-p}{p}\right)^2\\ &=p(1-p)^2\sum_{k=0}^\infty k(k-1)\color{#C00000}{(1-p)}^{k-2}+\frac{1-p}{p}-\left(\frac{1-p}{p}\right)^2\\ &=p(1-p)^2\frac2{\left(1-\color{#C00000}{(1-p)}\right)^3}+\frac{1-p}{p}-\left(\frac{1-p}{p}\right)^2\\ &=\frac{1-p}{p^2} \end{align} $$


We can use $$ \begin{align} \sum_{k=0}^\infty k(k-1)(k-2)x^{k-2} &=\frac{\mathrm{d}^3}{\mathrm{d}x^3}\sum_{k=0}^\infty x^k\\ &=\frac{\mathrm{d}^3}{\mathrm{d}x^3}\frac1{1-x}\\ &=\frac6{(1-x)^4} \end{align} $$ to get the third moment, $$ \begin{align} \mathrm{E}\left((X-\mathrm{E}(X))^3\right) &=\mathrm{E}\left(X^3\right)-3\mathrm{E}\left(X^2\right)\mathrm{E}(X)+3\mathrm{E}(X)\mathrm{E}(X)^2-\mathrm{E}(X)^3\\ &=\mathrm{E}\left(X^3\right)-\mathrm{E}(X)^3-3\mathrm{E}(X)\mathrm{Var}(X) \end{align} $$ First compute $$ \begin{align} \mathrm{E}\left(X^3\right) &=\sum_{k=0}^\infty k^3p(1-p)^k\\ &=\sum_{k=0}^\infty(k(k-1)(k-2)+\color{#00A000}{3k(k-1)}+\color{#0000FF}{k})p(1-p)^k\\ &=p(1-p)^3\sum_{k=0}^\infty k(k-1)(k-2)\color{#C00000}{(1-p)}^{k-3}+\color{#00A000}{6\left(\frac{1-p}{p}\right)^2}+\color{#0000FF}{\frac{1-p}{p}}\\ &=p(1-p)^3\frac6{(1-\color{#C00000}{(1-p)})^4}+6\left(\frac{1-p}{p}\right)^2+\frac{1-p}{p}\\ &=6\left(\frac{1-p}{p}\right)^3+6\left(\frac{1-p}{p}\right)^2+\frac{1-p}{p} \end{align} $$ Putting the last two equations together, we get $$ \begin{align} \mathrm{E}\left((X-\mathrm{E}(X))^3\right) &=6\left(\frac{1-p}{p}\right)^3+6\left(\frac{1-p}{p}\right)^2+\frac{1-p}{p}\\ &-\left(\frac{1-p}{p}\right)^3\\ &-3\frac{1-p}{p}\frac{1-p}{p^2}\\ &=\frac{(2-p)(1-p)}{p^3} \end{align} $$