Expectation of the geometric distribution

From Maths
Jump to: navigation, search
Stub grade: A
This page is a stub
This page is a stub, so it contains little or minimal information and is on a to-do list for being expanded.The message provided is:
Finish in morning
[ilmath]\newcommand{\P}[2][]{\mathbb{P}#1{\left[{#2}\right]} } \newcommand{\Pcond}[3][]{\mathbb{P}#1{\left[{#2}\!\ \middle\vert\!\ {#3}\right]} } \newcommand{\Plcond}[3][]{\Pcond[#1]{#2}{#3} } \newcommand{\Prcond}[3][]{\Pcond[#1]{#2}{#3} }[/ilmath]
[ilmath]\newcommand{\E}[1]{ {\mathbb{E}{\left[{#1}\right]} } } [/ilmath][ilmath]\newcommand{\Mdm}[1]{\text{Mdm}{\left({#1}\right) } } [/ilmath][ilmath]\newcommand{\Var}[1]{\text{Var}{\left({#1}\right) } } [/ilmath][ilmath]\newcommand{\ncr}[2]{ \vphantom{C}^{#1}\!C_{#2} } [/ilmath][ilmath]\newcommand{\d}[0]{\mathrm{d} } [/ilmath]

Statement

Let [ilmath]X\sim[/ilmath][ilmath]\text{Geo} [/ilmath][ilmath](p)[/ilmath] where [ilmath]p[/ilmath] is the probability of any trial being a success, and each trial is i.i.d as [ilmath]X_i\sim[/ilmath][ilmath]\text{Borv} [/ilmath][ilmath](p)[/ilmath], from this we have:

  • For [ilmath]k\in\mathbb{N}_{\ge 1} [/ilmath] that [ilmath]\P{X\eq k}\eq p(1-p)^{k-1} [/ilmath]

We now define [ilmath]q:\eq 1-p[/ilmath] as this will simplify calculations further on, meaning that now:

  • For [ilmath]k\in\mathbb{N}_{\ge 1} [/ilmath] that [ilmath]\P{X\eq k}\eq pq^{k-1} [/ilmath]


Expectation

  • The expectation of [ilmath]X[/ilmath] is:
    • [math]\sum^\infty_{k\eq 1}k\P{X\eq k} [/math] which of course is actually a limit of a series, [math]\lim_{n\rightarrow\infty}\left(\sum^n_{k\eq 1}k\P{X\eq k}\right)[/math]
We claim that that [ilmath]\E{X}\eq\frac{1}{p} [/ilmath] for [ilmath]p\in[/ilmath][ilmath](0,1][/ilmath][ilmath]\subseteq\mathbb{R} [/ilmath] and undefined for [ilmath]p\eq 0[/ilmath]


To do so we will consider the 3 cases, [ilmath]p\eq 0[/ilmath], [ilmath]p\in (0,1)\subseteq\mathbb{R} [/ilmath] and [ilmath]p\eq 1[/ilmath] separately and in reverse of this order.

See also

Proof

We introduce the following for short.

  1. [math]S'_n:\eq\sum^n_{k\eq 1}kpq^{k-1} [/math] - this forms the sequence used in the limit - which is a series.
    • Thus [math]\E{X}\eq\lim_{n\rightarrow\infty}\Big(S'_n\Big)[/math]
  2. [math]S_n:\eq\sum^n_{k\eq 1}kq^{k-1} [/math]
    • This comes from the sequence inside the limit, [math]\sum^n_{k\eq 1}k\P{X\eq k}\eq\sum^n_{k\eq 1}kpq^{k-1}\eq p\sum^n_{k\eq 1} kq^{k-1} \eq pS_n[/math], so:
      • [math]\E{X}\eq\lim_{n\rightarrow\infty}\left(\sum^n_{k\eq 1}k\P{X\eq k}\right)\eq\lim_{n\rightarrow\infty}\Big(pS_n\Big)[/math]

Notice that [ilmath]S'_n\eq pS_n[/ilmath] - introduced purely to save typing.

Case 1: [ilmath]p\eq 1[/ilmath]

Notice that in this case, [ilmath]q\eq 1-p\eq 0[/ilmath].

We now consider the [ilmath]S'_n[/ilmath] terms:

  • [math]S'_n\eq pS_n\eq p\left(\sum^n_{k\eq 1}kq^{k-1}\right)[/math] - [ilmath]0^0[/ilmath] comes up here

Case 2: [ilmath]p\in (0,1)\subseteq\mathbb{R} [/ilmath] -
TODO: EXTENSION

TODO: This case can be extended to [ilmath]p\in (0,1][/ilmath] and should be
as there's no reason we can't cope with the [ilmath]q\eq 0[/ilmath] case -
TODO: SORT THIS OUT

Lemmas used:

  1. [math]\frac{\mathrm{d} }{\mathrm{d}q}\Big[q^k\Big]\Bigg\vert_q\eq kq^{k-1} [/math] which is the first result covered in differentiation[Note 1]
  2. [math]\sum^n_{k\eq 1}r^{k-1}\eq \frac{1-r^n}{1-r} [/math] (from the result on the geometric series page), and,
    • Note that [math]\sum_{k\eq 1}^nr^k\eq r\sum^n_{k\eq 1}r^{k-1} [/math] so we will really use:
      • [math]\sum^n_{k\eq 1}r^k\eq r\frac{1-r^n}{1-r} [/math]


Proof:

  • Let [ilmath]p\in[/ilmath][ilmath](0,1)[/ilmath][ilmath]\subseteq[/ilmath][ilmath]\mathbb{R} [/ilmath] be given, and let [ilmath]X\sim[/ilmath][ilmath]\text{Geo} [/ilmath][ilmath](p)[/ilmath] so [ilmath]\P{X\eq k}:\eq (1-p)^{k-1}p[/ilmath] for [ilmath]k\in\mathbb{N}_{\ge 1} [/ilmath], now:
    • [math]\E{X}:\eq\sum^\infty_{k\eq 1}k\cdot\P{X\eq k}\eq \sum^\infty_{k\eq 1}k(1-p)^{k-1}p\eq p\sum^\infty_{k\eq 1}kq^{k-1} [/math] where we have substituted [ilmath]q^{k-1} [/ilmath] for [ilmath](1-p)^{k-1} [/ilmath] at the end there.
      • We use the first lemma described above to observe that [math]kq^{k-1}\eq\frac{\d }{\d q}\Big[q^k\Big]\Big\vert_q[/math], thus:
        • [math]\E{X}\eq p\sum^\infty_{k\eq 1}\frac{\d}{\d q}\Big[q^k\Big]\Big\vert_q[/math]
          [math]\eq p\cdot\left(\frac{\d}{\d q}\left[\sum^\infty_{k\eq 1}q^k\middle]\right\vert_q\right)[/math][Note 2]
    • We now work on the expression: [math]\sum^\infty_{k\eq 1}q^k[/math], taking it as [math]\lim_{n\rightarrow\infty}\left(\sum^n_{k\eq 1}q^k\right) [/math] and operate on the [math]\sum^n_{k\eq 1}q^k[/math] first
      • By the second lemma above:
        • [math]\sum^n_{k\eq 1}q^k\eq q\frac{1-q^n}{1-q} [/math]
          [math]\eq \frac{q}{1-q}\cdot(1-q^n) [/math]
      • Now we consider [math]\lim_{n\rightarrow\infty}\left(\sum^n_{k\eq 1}q^k\right) [/math],
        • [math]\lim_{n\rightarrow\infty}\left(\sum^n_{k\eq 1}q^k\right) \eq \lim_{n\rightarrow\infty}\left(\frac{q}{1-q}\cdot(1-q^n) \right) [/math]
          [math]\eq\frac{q}{1-q}\cdot\lim_{n\rightarrow\infty}\Big((1-q^n)\Big) [/math]
        • Let us operate on the [math]\lim_{n\rightarrow\infty}\Big((1-q^n)\Big) [/math] now
          • We have three cases, [ilmath]q\eq 0[/ilmath], [ilmath]q\in(0,1)[/ilmath] and [ilmath]q\eq 1[/ilmath] - But as we are explicitly in the [ilmath]q\in(0,1)[/ilmath] case we don't need to consider them really, we do so for demonstration purposes only
          All of these are applications of limit of integer powers of a real value
          1. [ilmath]q\eq 0[/ilmath] then obviously [ilmath]0^n[/ilmath] for [ilmath]n\in\mathbb{N}_{\ge 1} [/ilmath] is always [ilmath]0[/ilmath] (with [ilmath]0^0[/ilmath] "disputed" but not relevant here) so
            • [ilmath]\lim_{n\rightarrow\infty}(1-q^n)\eq 1-0\eq 1[/ilmath]
          2. [ilmath]q\in(0,1)[/ilmath] then [ilmath]q^n[/ilmath] gets smaller as [ilmath]n[/ilmath] increases so [ilmath]q^n\rightarrow 0[/ilmath] so [ilmath]1-q^n\rightarrow 1[/ilmath], thus
            • [ilmath]\lim_{n\rightarrow\infty}(1-q^n)\eq 1-0\eq 1[/ilmath] also
          3. [ilmath]q\eq 1[/ilmath] then [ilmath]q^n\eq 1[/ilmath] always so
            • [ilmath]\lim_{n\rightarrow\infty}(1-q^n)\eq 1-1\eq 0[/ilmath]
          • So we see that [ilmath]q\in [0,1) [/ilmath][Note 3] means that [ilmath]\lim_{n\rightarrow\infty}(1-q^n)\eq 1[/ilmath]
        • Substituting our findings we see for the relevant range of this case that:
          • [math]\frac{q}{1-q}\cdot\lim_{n\rightarrow\infty}\Big((1-q^n)\Big) \eq \frac{q}{1-q} [/math]
        • Thus:
          • [math]\sum^\infty_{k\eq 1}q^k:\eq \lim_{n\rightarrow\infty}\left(\sum^n_{k\eq 1}q^k\right) \eq \frac{q}{1-q} [/math]
    • We combine this into our expression for [ilmath]\E{X} [/ilmath]:
      • [math]\E{X}\eq p\cdot\left(\frac{\d}{\d q}\left[\sum^\infty_{k\eq 1}q^k\middle]\right\vert_q\right)[/math]
        [math]\eq p\cdot\frac{\d}{\d q}\left[\frac{q}{1-q}\middle]\right\vert_q[/math]
      • We now operate on [ilmath]\frac{\d}{\d q}\big[q\cdot (1-q)^{-1}\big]\big\vert_q [/ilmath] and - as writing it this way implies - will use the product rule:
        • [math]\frac{\d}{\d q}\Big[q\cdot (1-q)^{-1}\Big]\Big\vert_q \eq q\frac{\d}{\d q}\left[(1-q)^{-1}\middle]\right\vert_q+\frac{1}{1-q}\frac{\d}{\d q}\left[q\right]\Big\vert_q[/math]
          [math]\eq\frac{-q}{(1-q)^2}\cdot\frac{\d}{\d q}\Big[(1-q)\Big]\Big\vert_q +\frac{1}{1-q} [/math] - notice the chain ruling being applied here
          [math]\eq\frac{-q}{(1-q)^2}(-1) +\frac{1}{1-q} [/math]
          [math]\eq \frac{1}{1-q}\left(1+\frac{q}{1-q}\right) [/math]
          [math]\eq \frac{1}{1-q}\left(\frac{1-q}{1-q}+\frac{q}{1-q}\right) [/math]
          [math]\eq \frac{1}{1-q}\left(\frac{1}{1-q}\right) [/math]
          [math]\eq\frac{1}{(1-q)^2} [/math] or [ilmath]\eq (1-q)^{-2} [/ilmath]
        • Finally: [math]\frac{\d}{\d q}\big[q\cdot (1-q)^{-1}\big]\big\vert_q \eq \frac{1}{(1-q)^2} [/math]
          • So now we have: [math]\E{X} \eq p\cdot\frac{\d}{\d q}\left[\frac{q}{1-q}\middle]\right\vert_q\eq p\frac{1}{(1-q)^2} [/math]
      • Lastly we operate on [math]\E{X}\eq p\frac{1}{(1-q)^2} [/math]
        • Recall that [ilmath]q:\eq 1-p[/ilmath] so [ilmath]1-q\eq 1-(1-p)\eq 1-1+p\eq p[/ilmath] - we have [ilmath]1-q\eq p[/ilmath] now, substitute this in and we see:
          • [math]\E{X}\eq p\frac{1}{p^2} [/math]
            [math]\eq \frac{1}{p} [/math]
    • So we have [math]\E{X}\eq \frac{1}{p} [/math] given our value of [ilmath]p[/ilmath]
  • Since our choice of [ilmath]p\in(0,1)[/ilmath] was arbitrary we have shown:
    • [math]\forall p\in(0,1)\left[\E{\text{Geo}(p)}\eq\frac{1}{p}\right] [/math] - as required

Notes

  1. I'd really like to link to something here so
    TODO: Link to the actual result!
  2. Remember [math]\sum^\infty_{k\eq 1}a_k[/math] is just short hand for [math]\lim_{n\rightarrow\infty}\left(\sum^n_{k\eq 1}a_k\right)[/math] - see limits and limit of a series - and remember that [math]\frac{\d}{\d x}\Big[f(x)\Big]\Big\vert_x+\frac{\d}{\d x}\Big[g(x)\Big]\Big\vert_x\eq\frac{\d}{\d x}\Big[f(x)+g(x)\Big]\Big\vert_x[/math] - as per linearity of the derivative.
    • TODO: More links?
  3. I'm extending the range slightly but as [ilmath](0,1)\subseteq [0,1)[/ilmath] we're fine to do so