# Solving a Maximum Likelihood Estimation with an exponential distribution

I need someone's insight on applying a MLE for an exponential distribution. In a finance paper, I have the following:

$\displaystyle d_i \sim \frac{\epsilon_i}{\lambda_i}$ where $\epsilon_i$ is i.i.d. exponentially distributed with parameter $= 1$.

and $i=1,\ldots,n$.

$d_i$ are duration time values like time between two events. The $\epsilon$ are not observed. $\lambda_i$ are not observed and must be replaced with estimates from an optimal filter under a $2^k$ states where $k$ can take value $2 \ldots 10$.

Conditional on $\lambda_i$ the $d_i$ have an exponential distribution of $\lambda_i$ with density $p(d_i|\lambda_i) = \lambda_i \exp[-\lambda_i d_i]$

The $\epsilon_i$ in $\displaystyle d_i \sim \frac{\epsilon_i}{\lambda_i}$ confuses me in the MLE application. First, is the $\epsilon_i$ relevant in the MLE computation? If yes, how does it influence the likelihood fucntion below:

$$\mathcal{L}(\lambda,d_1,\dots,d_n)=\prod_{i=1}^n f(d_i,\lambda)=\prod_{i=1}^n \lambda e^{-\lambda d}=\lambda^ne^{-\lambda\sum_{i=1}^nd_i}$$

-
If I were writing the question, I'd explicitly state that what is observed is $d_1,\ldots,d_n$ and what you want to estimate is $\lambda_1,\ldots,\lambda_n$, if that's what is meant. You don't say explicitly whether the values of $\varepsilon_i$ are observed, but I'm guessing you mean they're not. Or maybe part of your question expresses some uncertainty about that. –  Michael Hardy Jul 13 '12 at 20:40
Ok, I will clarify this in my question. Thank you –  ChuckM Jul 13 '12 at 20:45
You seem to be mixing up two different ideas. The $n$ random variables are independent but not identically distributed. If your observation is $(d_1, d_2, \ldots, d_n)$, then the likelihood function is the product $$\prod_{i=1}^n \lambda_i \exp(-\lambda_i d_i)$$ which is a function of $n$ unknown parameters $\lambda_1, \lambda_2, \ldots, \lambda_n$. This likelihood function has maximum value at $(\lambda_1, \lambda_2, \ldots, \lambda_n) = (d_1^{-1}, d_2^{-1}, \ldots, d_n^{-1})$.
More likely, your model is that of $n$ independent samples of an exponential random variable with unknown parameter $\lambda$. If your observation is $(d_1, d_2, \ldots, d_n)$, then the likelihood function is the product $$\prod_{i=1}^n \lambda \exp(-\lambda d_i) = \lambda^n\exp\left (-\lambda \sum_{i=1}^n d_i \right)$$ which is a function of the single unknown parameter $\lambda$. The maximum value of this likelihood occurs at $\displaystyle \lambda = \frac{n}{\sum_{i=1}^n d_i } = \frac{1}{\bar{d}}$ where $\bar{d}$ is the sample mean $\displaystyle \frac{1}{n}\sum_{i=1}^n d_i$.
Ok I understand! So let's say I implement my data in Matlab and I wish to compute the MLE. Should I take the reverse of each data $d_i$ to get $(d_1^{-1}, d_2^{-1}, \ldots, d_n^{-1})$ and implement in $$\prod_{i=1}^n \lambda_i \exp(-\lambda_i d_i)$$? –  ChuckM Jul 13 '12 at 20:44
If I know all the possible values that $\lambda_i$ can take, do then I have a closed-form log likelihood? Also, how can this impact the implementation of my likelihood?..if any impact.. –  ChuckM Jul 14 '12 at 6:43