# Tag Archives: Frequency Models

## Frequency Models

Frequency models count the number of times an event occurs.

1. The number of customers to arrive each hour.
2. The number of coins lucky Tom finds on his way home from school.
3. How many scientists a Tyrannosaur eats on a certain day.
4. Etc.
This is in contrast to a severity model which measures the magnitude of an event.
1. How much a customer spends.
2. The value of a coin that lucky Tom finds.
3. The number of calories each scientist provides.
4. Etc.
The following distributions are used to model event frequency.  For notation, $p_n$ means $Pr(N=n)$.

## Poisson:

$\begin{array}{lr}\displaystyle p_n = e^{-\lambda} \frac{\lambda^n}{n!} & \lambda > 0 \end{array}$
Properties:
1. Parameter is $\lambda$.
2. Mean is $\lambda$.
3. Variance is $\lambda$.
4. If $N_1, N_2, ..., N_i$ are Poisson with parameters $\lambda_1, \lambda_2, ..., \lambda_i$, then $N = N_1 + N_2 + ... + N_i$ is Poisson with parameter $\lambda = \lambda_1 + \lambda_2 + ... + \lambda_i$.

## Negative Binomial:

$\begin{array}{lr} \displaystyle p_n = {{n+r-1}\choose{n}}\left(\frac{1}{1+\beta}\right)^r\left(\frac{\beta}{1+\beta}\right)^n & \beta>0, r>0 \end{array}$
Properties:
1. Parameters are $r$ and $\beta$.
2. Mean is $r\beta$.
3. Variance is $r\beta\left(1+\beta\right)$.
4. Variance is always greater than the mean.
5. Is equal to a Geometric distribution when $r=1$.
6. If $N_1, N_2, ..., N_i$ are negative binomial with parameters $\beta_1 = \beta_2 = ... = \beta_i$ and $r_1, r_2, ..., r_i$, then the sum $N = N_1 + N_2 + ... + N_i$ is negative binomial and has parameters $\beta = \beta_1$ and $r = r_1+r_2+...+r_i$.  Note: $\beta$‘s must be the same.

## Geometric:

$\begin{array}{lr} \displaystyle p_n = \frac{\beta^n}{\left(1+\beta\right)^{n+1}} & \beta>0 \end{array}$
Properties:
1. Parameter is $\beta$.
2. Mean is $\beta$.
3. Variance is $\beta\left(1+\beta\right)$.
4. If $N_1, N_2, ..., N_i$ are geometric with parameter $\beta$, then the sum $N = N_1+N_2+...+N_i$ is negative binomial with parameters $\beta$ and $r = i$.

## Binomial:

$\displaystyle p_n = {{m} \choose {n}}q^n\left(1-q\right)^{m-n}$
where $m$ is a positive integer, $0.
Properties:
1. Parameters are $m$ and $q$.
2. Mean is $mq$.
3. Variance is $mq\left(1-q\right)$.
4. Variance is always less than mean.
5. If $N_1, N_2, ..., N_i$ is binomial with parameters $q$ and $m_1, m_2, ..., m_i$, then the sum $N=N_1+N_2+...+N_i$ is binomial with parameters $q$ and $m = m_1+m_2+...+m_i$.

## The (a,b,0) recursion:

These distributions can be reparameterized into a recursive formula with parameters $a$ and $b$.  When reparameterized, they all have the same recursive format.
$\displaystyle p_k = \left(a+ \frac{b}{k}\right)p_{k-1}$
It is more common to write
$\displaystyle \frac{p_k}{p_k-1} = a+\frac{b}{k}$
The parameters $a$ and $b$ are different for each distribution.
1. Poisson:
$a = 0$ and $b =\lambda$.
2. Negative Binomial:
$\displaystyle a = \frac{\beta}{1+\beta}$ and $\displaystyle b = \left(r-1\right)\frac{\beta}{1+\beta}$.
3. Geometric:
$\displaystyle a = \frac{\beta}{1+\beta}$ and $\displaystyle b = 0$.
4. Binomial:
$\displaystyle a = -\frac{q}{1-q}$ and $\displaystyle b = \left(m+1\right)\frac{q}{1-q}$.
Pop Quiz!
1. A frequency distribution has a = 0.8 and b = 1.2.  What distribution is this?
Answer: Negative Binomial because both parameters are positive.
2. A frequency distribution has mean 1 and variance 0.5.  What distribution is this?
Answer: Binomial because the variance is less than the mean.