---
title: "Estimate of the mean number of events per period, lambda"
canonical: "https://modelassist.epixanalytics.com/space/EA/26574982/Estimate%20of%20the%20mean%20number%20of%20events%20per%20period%2C%20lambda"
format: markdown
---
Like the binomial probability *p*, the mean events per period <span style="color: #222222">λ</span> is a fundamental property of the stochastic system in question. It can never be observed and it can never be exactly known. However, we can become progressively more certain about its value as more data are collected. Statistics provides us with a means of quantifying the state of our knowledge as we accumulate data.

  


We discuss two approaches: Bayesian and classical statistics

  


#### 1. [Bayesian inference](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575368/)

Assuming an [uninformed prior](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575372/) <span style="color: #222222">π</span>*(**<span style="color: #222222">λ</span>**)* = 1/ <span style="color: #222222">λ</span>  and the Poisson likelihood function for observing *a* events in period *t*:

![image](media://ea41c58d-1b5c-4f08-8330-731cd95cf42a)

  


> Macro (mathblock)

  


The proportional statement is acceptable because we can ignore terms that don't involve <span style="color: #222222">λ</span>, and we then get the posterior distribution:

![image](media://dabf5995-4e2d-43f7-bdef-06db72caaf79)

  


> Macro (mathblock)

  


which by comparison with a [Gamma density function](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575671/) is a Gamma(0,1/*t*,<span style="color: #222222">α</span>) distribution. The [Gamma distribution](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575231/) can also be used to describe our uncertainty about <span style="color: #222222">λ</span> if we start off with an informed opinion and then observe <span style="color: #222222">α</span> events in time *t*. If we can reasonably describe our prior belief with a Gamma(0,<span style="color: #222222">b</span>,<span style="color: #222222">a</span>) distribution, the posterior is given by a Gamma(0, <span style="color: #222222">b/</span> (1 + <span style="color: #222222">b</span> *t*),<span style="color: #222222">a</span> + <span style="color: #222222">α</span>) distribution.

  


##### More difficult: the effect of the prior

The following paragraph is fairly difficult (but interesting) and is not totally necessary to understand the use of the Gamma distribution in determining the mean number of events per period (<span style="color: #222222">λ</span>). The choice of <span style="color: #222222">π</span>*(**<span style="color: #222222">λ</span>**)* = 1/ <span style="color: #222222">λ</span> (which is equivalent to a Gamma(0,z,1/*z*) distribution where *z* is *extremely* large) as an uninformed prior is an uncomfortable one for many. We can get a feel for the importance of the prior with the following train of thought:

  


1. A <span style="color: #222222">π</span>*(**<span style="color: #222222">λ</span>**)* = 1/ <span style="color: #222222">λ</span> prior is equivalent to Gamma(0,z,1/*z*) where *z* approaches infinity. You can prove this by looking at the Gamma probability distribution function and setting <span style="color: #222222">α</span> to zero and <span style="color: #222222">β </span>to infinity.
2. A flat prior (the opposite extreme to the <span style="color: #222222">π</span>*(**<span style="color: #222222">λ</span>**)* = 1/ <span style="color: #222222">λ</span> prior) would be equivalent to a Gamma(0,*z,1*), where *z* approaches infinity, i.e. an infinitely drawn out Exponential distribution.
3. We have seen that for a Gamma(0,*b*,*a*) prior, the resultant posterior is Gamma(0, b/ (1 + <span style="color: #222222">α</span> *t*),*a* + <span style="color: #222222">α</span>) which means that the posterior for 1. would be Gamma(0, 1/*t*,*<span style="color: #222222">α</span>*) and for 2. would be Gamma(0, 1/*t*,*<span style="color: #222222">α</span>* +1).
4. Thus, the sensitivity of the Gamma distribution to the prior amounts to whether (*<span style="color: #222222">α</span>*+1) is approximately the same as *a*. Moreover, Gamma(0,<span style="color: #222222">β</span>*,**<span style="color: #222222">α</span>*) is the sum of *a* independent Exponential(1/<span style="color: #222222">β</span>) distributions so one can think of the choice of priors as being whether we add one extra Exponential distribution or not to the *a* Exponential distributions from the data. Thus, if *a* was 100 for example, the distribution would be roughly 1% influenced by the prior and 99% influenced by the data. In this model, the information contained in the quantity of data available always overpowers the prior.

  


#### 2. Classical statistics

Various classic statistics approaches to estimating <span style="color: #222222">λ</span> are discussed [here](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575359/).

  


  


#### 3. Comparison of classical and Bayesian methods

A comparison of the different approaches to estimating <span style="color: #222222">λ</span> are discussed [here](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575423/).

  


  


  


  


  


---