# Homework 2

Let y_1, y_2, ..., y_I be independent and identically distributed as an exponential with rate parameter lambda. See wiki for the density function.

1. Draw a graph of the density for a few values of lambda

2. What is an expression for the mean:

3. The exponential might be used to model the time between firings of a neuron. If so, what are some plausible values of lambda (say that cells fire from every 5 ms to every half second or so? What unit is lambda in?

Assume a gamma prior for lambda with shape alpha and rate beta. What are the units of alpha and beta?

4. What is the prior mean and SD in terms of alpha and beta?

5. Try to pick a very uninformative prior by adjusting alpha and beta so that the prior is broad. Try to pick a more informative prior knowing that you are modeling neural firing rates.

6. What is the posterior distribution of lambda? Use Bayes rule

7. What is the posterior mean.

Suppose the times in between the last six action potentials are 12.67 ms, 9.78 ms, 4.48 ms, 19.58 ms, 27.01 ms, 3.44 ms)

8. Plot your posterior and prior beliefs and the updating factor for a reasonable range of lambda.