Difference between revisions of "Variance of the geometric distribution"

From Maths
Jump to: navigation, search
m (Adding notice)
(Completed the initial workings, most of the proof is on paper, marked as stub.)
Line 1: Line 1:
 +
{{Stub page|grade=A|msg=There's work to do, not just writing out the entire proof [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 15:04, 16 January 2018 (UTC) }}
 
{{ProbMacros}}{{M|\newcommand{\d}[0]{\mathrm{d} } }}{{M|\newcommand{\ddq}[1]{ \frac{\d}{\d q}{\left[{#1}\middle]\right\vert_q} }  }}__TOC__
 
{{ProbMacros}}{{M|\newcommand{\d}[0]{\mathrm{d} } }}{{M|\newcommand{\ddq}[1]{ \frac{\d}{\d q}{\left[{#1}\middle]\right\vert_q} }  }}__TOC__
 
==Notes==
 
==Notes==
[[File:MostOfGeometricDistributionVarianceComputations.JPG|thumbnail|Workings so far]]It's {{MM|\frac{1-p}{p^2} }} I believe - I did this quickly on a sticky note starting from the warning below. My "formal attempt" (here) though I messed up the final step. I'll fix it later today. DO NOT USE RESULT unless you complete the proof, everything is fine until you hit the red and highly visible WARNING marker below.
+
[[File:MostOfGeometricDistributionVarianceComputations.JPG|thumbnail|Workings so far]]The variance is {{MM|\frac{1-p}{p^2} }}
 
==Final steps==
 
==Final steps==
 
Recall {{M|q:\eq 1-p}}
 
Recall {{M|q:\eq 1-p}}
Line 34: Line 35:
 
Now we substitute this all in to  {{M|\E{X^2}\eq \alpha-\beta+\E{X}+pq\left(\frac{\d^2}{\d q^2}\left[\sum^\infty_{k\eq 3}q^k\middle]\right\vert_q\right)}} and:
 
Now we substitute this all in to  {{M|\E{X^2}\eq \alpha-\beta+\E{X}+pq\left(\frac{\d^2}{\d q^2}\left[\sum^\infty_{k\eq 3}q^k\middle]\right\vert_q\right)}} and:
 
* {{MM|\E{X^2}\eq \P{X\eq 1}+4\P{X\eq 2}-\P{X\eq 1}-2\P{X\eq 2}+\frac{1}{p}+2(1-p)\left(\frac{1}{p^2}-p\right)}}
 
* {{MM|\E{X^2}\eq \P{X\eq 1}+4\P{X\eq 2}-\P{X\eq 1}-2\P{X\eq 2}+\frac{1}{p}+2(1-p)\left(\frac{1}{p^2}-p\right)}}
*: {{MM|\eq 2\P{X\eq 2}+\frac{1}{p}+2(1-p)\left(\frac{1}{p^2}-\frac{p^2}{p^2}\right)}} - {{Warning|Error is here, the {{MM|\frac{p^2}{p^2} }} should be {{MM|\frac{p^3}{p^2} }} instead!}} - I'm just saving my work, I scrutinised everything and the error was here!
+
*: {{MM|\eq 2\P{X\eq 2}+\frac{1}{p}+2(1-p)\left(\frac{1}{p^2}-\frac{p^3}{p^2}\right)}}
*: {{MM|\eq 2(1-p)p+\frac{1}{p}+2(1-p)\frac{1-p^2}{p^2} }}
+
*: {{MM|\eq 2(1-p)p+\frac{1}{p}+2(1-p)\frac{1-p^3}{p^2} }}
*: {{MM|\eq \frac{1}{p}+2(1-p)\left(p+\frac{1-p^2}{p^2}\right)}}
+
*: {{MM|\eq \frac{1}{p}+2(1-p)\left(p+\frac{1-p^3}{p^2}\right)}}
*: {{MM|\eq \frac{1}{p}+2(1-p)\left(\frac{p^3}{p^2}+\frac{1-p^2}{p^2}\right)}}
+
*: {{MM|\eq \frac{1}{p}+2(1-p)\left(\frac{p^3}{p^2}+\frac{1-p^3}{p^2}\right)}}
*: {{MM|\eq \frac{1}{p}+2(1-p)\frac{p^3-p^2+1}{p^2} }}
+
*: {{MM|\eq \frac{1}{p}+2(1-p)\frac{1}{p^2} }}
 +
*: {{MM|\eq \frac{1}{p} +\frac{2}{p^2} - \frac{2}{p} }}
 +
*: {{MM|\eq \frac{2}{p^2}-\frac{1}{p} }}
 +
*: {{MM|\eq \frac{2}{p^2}-\frac{p}{p^2} }} - it's probably easier in this form
 +
Given we'll need to subtract {{M|\frac{1}{p^2} }} there's no point in proceeding any further
 +
 
 +
 
 +
Lastly:
 +
* {{M|\Var{X}\eq\E{X^2}-(\E{X})^2}}, so
 +
** {{MM|\Var{X}\eq \frac{2}{p^2}-\frac{p}{p^2} - \frac{1}{p^2} }}
 +
**: {{MM|\eq\frac{1}{p^2}-\frac{p}{p^2} }}
 +
**: {{MM|\eq\frac{1-p}{p^2} }}
 +
Thus
 +
* {{MM|\Var{X}\eq\frac{1-p}{p^2} }}
 +
==Notes==
 +
<references group="Note"/>
 +
==References==
 +
<references/>
 +
{{Theorem Of|Probability|Statistics|Elementary Probability}}
 +
[[Category:Variance Calculations]]

Revision as of 15:04, 16 January 2018

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:
There's work to do, not just writing out the entire proof Alec (talk) 15:04, 16 January 2018 (UTC)
[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][ilmath]\newcommand{\ddq}[1]{ \frac{\d}{\d q}{\left[{#1}\middle]\right\vert_q} } [/ilmath]

Notes

Workings so far
The variance is [math]\frac{1-p}{p^2} [/math]

Final steps

Recall [ilmath]q:\eq 1-p[/ilmath]

Computing [math]\frac{\d^2}{\d q^2}\left[\sum^\infty_{k\eq 3} q^k\middle]\right\vert_q[/math]

We leave the bottom of the paper workings with:

  • [math]\frac{\d^2}{\d q^2}\left[\sum^\infty_{k\eq 3} q^k\middle]\right\vert_q[/math]
    [math]\eq\frac{\d}{\d q}\left[\frac{1}{(1-q)^2}-1-2q\middle]\right\vert_q [/math]
    [math]\eq -2+\ddq{(1-q)^{-2} } [/math]
    [math]\eq -2+(-2)(1-q)^{-3}\cdot\ddq{1-q} [/math]
    [math]\eq -2+\frac{-2}{(1-q)^3}\cdot (-1)[/math]
    [math]\eq\ 2\left(\frac{1}{(1-q)^3}-1\right)[/math]
  • We may now substitute [ilmath]q\eq 1-p[/ilmath] (as [ilmath]q:\eq 1-p[/ilmath] so [ilmath]p\eq 1-q[/ilmath] follows)
    • This yields:
      • [math]\frac{\d^2}{\d q^2}\left[\sum^\infty_{k\eq 3} q^k\middle]\right\vert_q \eq 2\left(\frac{1}{p^3}-1\right)[/math]

Computing [ilmath]\E{X^2} [/ilmath]

Recall:

  • [ilmath]q:\eq 1-p[/ilmath]
  • [ilmath]\alpha:\eq \P{X\eq 1}+4\P{X\eq 2} [/ilmath]
  • [ilmath]\beta:\eq \P{X\eq 1}+2\P{X\eq 2} [/ilmath]

The previous step yielded:

  • [math]\frac{\d^2}{\d q^2}\left[\sum^\infty_{k\eq 3} q^k\middle]\right\vert_q \eq\ 2\left(\frac{1}{p^3}-1\right)[/math]

and we got as far as:

  • [math]\E{X^2}\eq \alpha-\beta+\E{X}+pq\left(\frac{\d^2}{\d q^2}\left[\sum^\infty_{k\eq 3}q^k\middle]\right\vert_q\right)[/math]

So:

  • [math]pq\left(\frac{\d^2}{\d q^2}\left[\sum^\infty_{k\eq 3}q^k\middle]\right\vert_q\right)[/math]
    [math]\eq 2pq\left(\frac{1}{p^3}-1\right)[/math]
    [math]\eq 2q\left(\frac{1}{p^2}-p\right)[/math]
    [math]\eq 2(1-p)\left(\frac{1}{p^2}-p\right)[/math]


Now we substitute this all in to [ilmath]\E{X^2}\eq \alpha-\beta+\E{X}+pq\left(\frac{\d^2}{\d q^2}\left[\sum^\infty_{k\eq 3}q^k\middle]\right\vert_q\right)[/ilmath] and:

  • [math]\E{X^2}\eq \P{X\eq 1}+4\P{X\eq 2}-\P{X\eq 1}-2\P{X\eq 2}+\frac{1}{p}+2(1-p)\left(\frac{1}{p^2}-p\right)[/math]
    [math]\eq 2\P{X\eq 2}+\frac{1}{p}+2(1-p)\left(\frac{1}{p^2}-\frac{p^3}{p^2}\right)[/math]
    [math]\eq 2(1-p)p+\frac{1}{p}+2(1-p)\frac{1-p^3}{p^2} [/math]
    [math]\eq \frac{1}{p}+2(1-p)\left(p+\frac{1-p^3}{p^2}\right)[/math]
    [math]\eq \frac{1}{p}+2(1-p)\left(\frac{p^3}{p^2}+\frac{1-p^3}{p^2}\right)[/math]
    [math]\eq \frac{1}{p}+2(1-p)\frac{1}{p^2} [/math]
    [math]\eq \frac{1}{p} +\frac{2}{p^2} - \frac{2}{p} [/math]
    [math]\eq \frac{2}{p^2}-\frac{1}{p} [/math]
    [math]\eq \frac{2}{p^2}-\frac{p}{p^2} [/math] - it's probably easier in this form

Given we'll need to subtract [ilmath]\frac{1}{p^2} [/ilmath] there's no point in proceeding any further


Lastly:

  • [ilmath]\Var{X}\eq\E{X^2}-(\E{X})^2[/ilmath], so
    • [math]\Var{X}\eq \frac{2}{p^2}-\frac{p}{p^2} - \frac{1}{p^2} [/math]
      [math]\eq\frac{1}{p^2}-\frac{p}{p^2} [/math]
      [math]\eq\frac{1-p}{p^2} [/math]

Thus

  • [math]\Var{X}\eq\frac{1-p}{p^2} [/math]

Notes

References