# Show that MLE of $\lambda = \frac{n-T_n}{S_n+cT_n}$

$X_i$ are i.i.d exponential, mean $\lambda^{-1}$ for $1 \leq i \leq n$ and, the values are measured such that $X_i = c$ if $X_i \geq c$ and $X_i$ otherwise. Show that MLE of $\lambda = \frac{n-T_n}{S_n+cT_n}$ where $S_n= \sum_{j=1}^n X_jI(X_j < c)$ and $T_n = \sum_{j=1}^n I(X_j \geq c)$

Attempt:

The likelihood function is given by $L(\lambda | x_i, x_2, \ldots x_n) = \lambda^n e^{-\lambda \sum x_i} = \lambda^n e^{-\lambda(S_n+cT_n)}$ $\implies$ $log L = n log \lambda -\lambda(S_n+cT_n)$

and hence $\hat\lambda=\frac{n}{S_n+cT_n}$ which is different from the expected answer.

Indicator variables to the rescue.

Few observations:

$P(X_i < x) = 1 - \lambda e^{-x}$ if $0 \leq x < c$

$P(X_i = c) = P(X_i \geq c) = e^{-\lambda c}$ (This one looks counter intuitive at first look, but that is what the $X_i=c$ if $X_i \geq c$ returns)

Now,

\begin{align}L( \lambda| x_i) &= \prod_{i=1}^{n} (\lambda e^{-\lambda x_i}) I(0 \leq x_i < c) \times (e^{-\lambda c})I( x_i \geq c) \\&= \lambda^{\sum_{i=1}^n I(0 \leq x_i < c)}e^{-\lambda(\sum_{i=1}^n x_iI(0 \leq x_i < c)} \times e^{-\lambda c \sum_{i=1}^n I(x_i \geq c)} \\&= \lambda^{n-T_n}e^{-\lambda S_n} \times e^{-\lambda c T_n}\end{align}

$\log L= (n-T_n) \log \lambda -\lambda(S_n+cT_n)$

$\frac{\partial \log L}{\partial \lambda} = \frac{n-T_n}{\lambda}-(S_n+cT_n)$

which gives $\hat \lambda = \frac{n-T_n}{S_n+cT_n}$

• Thanks for including your attempt at this question as it will help people to get you "unstuck" - Please add the [self-study] tag & read its wiki. – Silverfish May 13 '15 at 11:07
• Your likelihood function might need some reconsideration since the measured $X_i$ are not continuous random variables but mixed random variables, with nonzero probability of taking on the fixed value $c$ and continuous on $(0,c)$. – Dilip Sarwate May 13 '15 at 13:01
• So $f(x_i) = e^{-\lambda x_i}$ for $x_i < c$ and $P(X_i=c)=e^{-\lambda c}$ I cannot figure out how should I write the likelihood function – user239438 May 13 '15 at 17:14
• Asked simultaneously on math.SE where the OP has already accepted an answer. I am flagging this one for deletion from this site. – Dilip Sarwate May 14 '15 at 1:53
• Please post the answer you accepted on the math site, so that this question has an answer too. – whuber May 14 '15 at 2:14