Notes:Poisson and Gamma distribution
From Maths
- These are PRELIMINARY NOTES: I got somewhere and don't want to lose the work on paper.
Contents
[hide]Initial notes
Here we will use X∼Poi(λ)
for λ∈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∈N≥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):=P[T≤t]=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]=P[the number of events that occurred for the range of time [0,t]<k]
- =P[the number of events that occurred for the range of time [0,t]≤k−1]
- P[T>t]=P[the number of events that occurred for the range of time [0,t]<k]
- F(t):=P[T≤t]=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:
Lastly,
- If λ is the rate of events per unit time, then for t units of time tλ is the rate of events per t-units of time, so we define:
- Xt∼Poi(tλ)
- And we observe:
- P[the number of events that occurred for the range of time [0,t]≤k−1]
- =P[Xt≤k−1]
- P[the number of events that occurred for the range of time [0,t]≤k−1]
We have now discovered:
- F(t)=P[T≤t]=1−P[Xt≤k−1], for k∈N≥1 remember
Evaluation
We now compute P[T≤t]
- Let's start with P[T≤t]=1−P[Xt≤k−1]
- P[T≤t]
- =1−(k−1∑i=0P[Xt=i])- notice the sum starts at i=0, as k≥1 we must at least have one term, the (i=0)th one.
- =1−(k−1∑i=0e−tλ(tλ)ii!)
- =1−e−tλ−e−tλk−1∑i=1(tλ)ii!- note the sum now may be zero if k=1 otherwise it will have terms.
- =1−(k−1∑i=0P[Xt=i])
- However we will write it as:
- P[T≤t]=1−e−λt+k−1∑i=1−λii!(ti⋅e−λt)which will help greatly with the next step
- P[T≤t]=1−e−λt+k−1∑i=1−λii!(ti⋅e−λt)
- P[T≤t]
- We now must differentiate this to find the pdf, f(t)=F′(t)=ddt[F(t)]|t
- f(t)=0−ddt[e−λt]|t+k−1∑i=1−λii!(ddt[ti⋅e−λt]|t)
- Let us look at the components
- First, ddt[e−λt]|t=−λe−λ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[ti⋅e−λt]|t
- =tiddt[e−λt]|t+e−λtddt[ti]|t
- =−λtie−λt+ie−λtti−1 - this uses the first result
- =e−λt(iti−1−λti)
- First, ddt[e−λt]|t=−λe−λt by
- thus: f(t)
- =λe−λt+k−1∑i=1−λii!e−λt(iti−1−λti)
- =λe−λt+k−1∑i=1−λii!e−λt(iti−1−λti)
- Let us look at the components
- f(t)=0−ddt[e−λt]|t+k−1∑i=1−λii!(ddt[ti⋅e−λt]|t)