Notes:Poisson and Gamma distribution

From Maths
Jump to: navigation, search
These are PRELIMINARY NOTES: I got somewhere and don't want to lose the work on paper.
[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]

Initial notes

Here we will use [ilmath]X\sim[/ilmath][ilmath]\text{Poi} [/ilmath][math](\lambda)[/math] for [ilmath]\lambda\in\mathbb{R}_{>0} [/ilmath] as "events per unit time" for simplicity of conceptualising what's going on, in practice it wont matter what continuous unit is used.


We use the following:

  • Let [ilmath]k\in\mathbb{N}_{\ge 1} [/ilmath], we are interested in the distribution of the time until [ilmath]k[/ilmath] events have accumulated.
  • Let [ilmath]T[/ilmath] be the time until [ilmath]k[/ilmath] accumulations, so:
    • [ilmath]F(t):\eq\P{T\le t} \eq 1-\P{T>t} [/ilmath][Note 1] and we can use [ilmath]\P{T>t} [/ilmath] to be "fewer events than [ilmath]k[/ilmath] occurred for the range of time [ilmath][0,t][/ilmath]" or to be more formal / specific:
      • [ilmath]\P{T>t}\eq\P{\text{the number of events that occurred for the range of time }[0,t]<k} [/ilmath]
        [ilmath]\eq\P{\text{the number of events that occurred for the range of time }[0,t]\le k-1} [/ilmath]


Lastly,

  • If [ilmath]\lambda[/ilmath] is the rate of events per unit time, then for [ilmath]t[/ilmath] units of time [ilmath]t\lambda[/ilmath] is the rate of events per [ilmath]t[/ilmath]-units of time, so we define:
    • [ilmath]X_t\sim\text{Poi}(t\lambda) [/ilmath]
  • And we observe:
    • [ilmath]\P{\text{the number of events that occurred for the range of time }[0,t]\le k-1} [/ilmath]
      [ilmath]\eq \P{X_t\le k-1} [/ilmath]


We have now discovered:

  • [ilmath]F(t)\eq\P{T\le t}\eq 1-\P{X_t\le k-1} [/ilmath], for [ilmath]k\in\mathbb{N}_{\ge 1} [/ilmath] remember

Evaluation

We now compute [ilmath]\P{T\le t} [/ilmath][ilmath]\newcommand{\d}[0]{\mathrm{d} } [/ilmath][ilmath]\newcommand{\ddt}[1]{\frac{\d}{\d t}\left[{#1}\middle]\right\vert_{t} } [/ilmath]

  • Let's start with [ilmath]\P{T\le t} \eq 1-\P{X_t\le k-1} [/ilmath]
    • [ilmath]\P{T\le t} [/ilmath]
      [math]\eq 1-\left(\sum^{k-1}_{i\eq 0}\P{X_t\eq i}\right)[/math] - notice the sum starts at [ilmath]i\eq 0[/ilmath], as [ilmath]k\ge 1[/ilmath] we must at least have one term, the [ilmath](i\eq 0)^\text{th} [/ilmath] one.
      [math]\eq 1-\left(\sum^{k-1}_{i\eq 0}e^{-t\lambda}\frac{(t\lambda)^i}{i!}\right)[/math]
      [math]\eq 1-e^{-t\lambda}-e^{-t\lambda}\sum^{k-1}_{i\eq 1}\frac{(t\lambda)^i}{i!} [/math] - note the sum now may be zero if [ilmath]k\eq 1[/ilmath] otherwise it will have terms.
    • However we will write it as:
      • [math]\P{T\le t}\eq 1-e^{-\lambda t}+\sum^{k-1}_{i\eq 1}\frac{-\lambda^i}{i!}\big(t^i\cdot e^{-\lambda t}\big)[/math] which will help greatly with the next step
  • We now must differentiate this to find the pdf, [math]f(t)\eq F'(t)\eq \frac{\mathrm{d} }{\mathrm{d} t}\Big[F(t)\Big]\Big\vert_{t} [/math]
    • [math]f(t)\eq 0-\ddt{e^{-\lambda t} }+\sum^{k-1}_{i\eq 1}\frac{-\lambda^i}{i!}\left(\ddt{t^i\cdot e^{-\lambda t} }\right) [/math]
      • Let us look at the components
        • First, [ilmath]\ddt{e^{-\lambda t} } \eq -\lambda e^{-\lambda t} [/ilmath] by
          TODO: link thing here that talks about differentiation of e raised to a power of a function of the variable
          - involves chain rule
        • Next we apply the product rule to [ilmath]\ddt{t^i\cdot e^{-\lambda t} } [/ilmath]
          [ilmath]\eq t^i\ddt{e^{-\lambda t} }+e^{-\lambda t}\ddt{t^i} [/ilmath]
          [ilmath]\eq -\lambda t^i e^{-\lambda t}+ie^{-\lambda t}t^{i-1} [/ilmath] - this uses the first result
          [ilmath]\eq e^{-\lambda t}\big(it^{i-1}-\lambda t^i\big)[/ilmath]
      • thus: [ilmath]f(t)[/ilmath]
        [math]\eq \lambda e^{-\lambda t}+\sum^{k-1}_{i\eq 1}\frac{-\lambda^i}{i!}e^{-\lambda t}(it^{i-1}-\lambda t^i) [/math]

Notes

  1. Standard cdf stuff