Difference between revisions of "Notes:Poisson and Gamma distribution"

From Maths
Jump to: navigation, search
(Changing computer, so saving work)
 
(Saving work, want a second set of eyes before proceeding)
 
Line 24: Line 24:
 
* {{M|F(t)\eq\P{T\le t}\eq 1-\P{X_t\le k-1} }}, for {{M|k\in\mathbb{N}_{\ge 1} }} remember
 
* {{M|F(t)\eq\P{T\le t}\eq 1-\P{X_t\le k-1} }}, for {{M|k\in\mathbb{N}_{\ge 1} }} remember
 
==Evaluation==
 
==Evaluation==
We now compute {{M|\P{T\le t} }}
+
We now compute {{M|\P{T\le t} }}{{M|\newcommand{\d}[0]{\mathrm{d} } }}{{M|\newcommand{\ddt}[1]{\frac{\d}{\d t}\left[{#1}\middle]\right\vert_{t} } }}
 
* Let's start with {{M|\P{T\le t} \eq 1-\P{X_t\le k-1} }}
 
* Let's start with {{M|\P{T\le t} \eq 1-\P{X_t\le k-1} }}
*: {{MM|\eq 1-\left(\sum^{k-1}_{i\eq 0}\P{X_t\eq i}\right)}} - notice the sum starts at {{M|i\eq 0}}, as {{M|k\ge 1}} we must at least have one term, the {{M|(i\eq 0)^\text{th} }} one.
+
** {{M|\P{T\le t} }}
*: {{MM|\eq 1-\left(\sum^{k-1}_{i\eq 0}e^{-t\lambda}\frac{(t\lambda)^i}{i!}\right)}}
+
**: {{MM|\eq 1-\left(\sum^{k-1}_{i\eq 0}\P{X_t\eq i}\right)}} - notice the sum starts at {{M|i\eq 0}}, as {{M|k\ge 1}} we must at least have one term, the {{M|(i\eq 0)^\text{th} }} one.
 +
**: {{MM|\eq 1-\left(\sum^{k-1}_{i\eq 0}e^{-t\lambda}\frac{(t\lambda)^i}{i!}\right)}}
 +
**: {{MM|\eq 1-e^{-t\lambda}-e^{-t\lambda}\sum^{k-1}_{i\eq 1}\frac{(t\lambda)^i}{i!} }} - note the sum now may be zero if {{M|k\eq 1}} otherwise it will have terms.
 +
** However we will write it as:
 +
*** {{MM|\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)}} which will help greatly with the next step
 +
* We now must [[differentiate]] this to find the [[pdf]], {{MM|f(t)\eq F'(t)\eq \frac{\mathrm{d} }{\mathrm{d} t}\Big[F(t)\Big]\Big\vert_{t} }}
 +
** {{MM|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) }}
 +
*** Let us look at the components
 +
**** First, {{M|\ddt{e^{-\lambda t} } \eq -\lambda e^{-\lambda t} }} by {{XXX|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 {{M|\ddt{t^i\cdot e^{-\lambda t} } }}
 +
****: {{M|\eq t^i\ddt{e^{-\lambda t} }+e^{-\lambda t}\ddt{t^i} }}
 +
****: {{M|\eq -\lambda t^i e^{-\lambda t}+ie^{-\lambda t}t^{i-1} }} - this uses the first result
 +
****: {{M|\eq e^{-\lambda t}\big(it^{i-1}-\lambda t^i\big)}}
 +
*** thus: {{M|f(t)}}
 +
***: {{MM|\eq \lambda e^{-\lambda t}+\sum^{k-1}_{i\eq 1}\frac{-\lambda^i}{i!}e^{-\lambda t}(it^{i-1}-\lambda t^i) }}
 
==Notes==
 
==Notes==
 
<references group="Note"/>
 
<references group="Note"/>

Latest revision as of 18:58, 19 January 2018

These are PRELIMINARY NOTES: I got somewhere and don't want to lose the work on paper.
\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} }
\newcommand{\E}[1]{ {\mathbb{E}{\left[{#1}\right]} } } \newcommand{\Mdm}[1]{\text{Mdm}{\left({#1}\right) } } \newcommand{\Var}[1]{\text{Var}{\left({#1}\right) } } \newcommand{\ncr}[2]{ \vphantom{C}^{#1}\!C_{#2} }

Initial notes

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


Lastly,

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


We have now discovered:

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

Evaluation

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

  • Let's start with \P{T\le t} \eq 1-\P{X_t\le k-1}
    • \P{T\le t}
      \eq 1-\left(\sum^{k-1}_{i\eq 0}\P{X_t\eq i}\right) - notice the sum starts at i\eq 0, as k\ge 1 we must at least have one term, the (i\eq 0)^\text{th} one.
      \eq 1-\left(\sum^{k-1}_{i\eq 0}e^{-t\lambda}\frac{(t\lambda)^i}{i!}\right)
      \eq 1-e^{-t\lambda}-e^{-t\lambda}\sum^{k-1}_{i\eq 1}\frac{(t\lambda)^i}{i!} - note the sum now may be zero if k\eq 1 otherwise it will have terms.
    • However we will write it as:
      • \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) which will help greatly with the next step
  • We now must differentiate this to find the pdf, f(t)\eq F'(t)\eq \frac{\mathrm{d} }{\mathrm{d} t}\Big[F(t)\Big]\Big\vert_{t}
    • 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)
      • Let us look at the components
        • First, \ddt{e^{-\lambda t} } \eq -\lambda e^{-\lambda t} 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 \ddt{t^i\cdot e^{-\lambda t} }
          \eq t^i\ddt{e^{-\lambda t} }+e^{-\lambda t}\ddt{t^i}
          \eq -\lambda t^i e^{-\lambda t}+ie^{-\lambda t}t^{i-1} - this uses the first result
          \eq e^{-\lambda t}\big(it^{i-1}-\lambda t^i\big)
      • thus: f(t)
        \eq \lambda e^{-\lambda t}+\sum^{k-1}_{i\eq 1}\frac{-\lambda^i}{i!}e^{-\lambda t}(it^{i-1}-\lambda t^i)

Notes

  1. Jump up Standard cdf stuff