Parameter estimation of exponential distribution with biased sampling I want to calculate the parameter $\lambda$ of the exponential distribution $e^{-\lambda x}$ from a sample population taken out of this distribution under biased conditions. As far as I know, for a sample of n values, the usual estimator is $\hat{\lambda} = \frac{n}{\sum x_i}$. However my sample is biased as follows:
From a complete population of m elements drawn i.i.d from the exponential distribution, only the n smallest elements are known. How can I estimate the parameter $\lambda$ in this scenario?
A bit more formaly, if $\{x_1,x_2,x_3,...,x_m \}$ are iid samples drawn from $e^{-\lambda x}$, such that for every $i < j$ we have $x_i \leq x_j$, then how can I estimate $\lambda$ from the set $\{x_1,x_2,x_3,...,x_n\}$ where $n < m$.
Thanks a lot!
Michael
 A: The maximum likelihood estimator for the parameter of the exponential distribution under type II censoring can be derived as follows.  I assume the sample size is $m$, of which the $n < m$ smallest are observed and the $m - n$ largest are unobserved (but known to exist.)
Let us assume (for notational simplicity) that the observed $x_i$ are ordered: $0 \leq x_1 \leq x_2 \leq \cdots \leq x_n$.  Then the joint probability density of $x_1, \dots, x_n$ is:
$f(x_1, \dots, x_n) = {m!\lambda^n \over {(m-n)!}}\exp\left\{-\lambda\sum_{i=1}^nx_i\right\}\exp\left\{-\lambda(m-n)x_n\right\}$
where the first exponential relates to the probabilities of the $n$ observed $x_i$ and the second to the probabilities of the $m-n$ unobserved $x_i$ that are greater than $x_n$ (which is just 1 - the CDF at $x_n$.)  Rearranging terms leads to:
$f(x_1, \dots, x_n) = {m!\lambda^n \over {(m-n)!}}\exp\left\{-\lambda\left[\sum_{i=1}^{n-1}x_i+(m-n+1)x_n\right]\right\}$
(Note the sum runs to $n-1$ as there is a "$+1$" in the coefficient of $x_n$.)  Taking the log, then the derivative w.r.t. $\lambda$ and so on leads to the maximum likelihood estimator:
$\hat{\lambda} = n / \left[\sum_{i=1}^{n-1}x_i+(m-n+1)x_n\right]$
A: This links @jbowman's answer to my comment. Namely, under common working assumptions, one can use the 'standard survival likelihood' under type II censoring.
> #------seed------
> set.seed(1907)
> #----------------
> 
> #------some data------
> t <- sort(rexp(n=20, rate=2))        #true sample
> t[16:20] <- t[15]                    #observed sample
> delta <- c(rep(1, 15), rep(0, 5))    #censoring indicator
> data <- data.frame(t, delta)         #observed data
> #---------------------
> 
> #-----using @jbowman's formula------
> 15 / (sum(t[1:14]) + (5 + 1)*t[15])
[1] 2.131323
> #-----------------------------------
> 
> #------using the usual survival likelihood------
> library(survival)
> fit <- survreg(Surv(t, delta)~1, dist="exponential", data=data)
> exp(-fit$coef)
(Intercept) 
   2.131323 
> #-----------------------------------------------


PS1: Note that this is not restricted to the exponential distribution.
PS2: Details can be found in Section 2.2 of the book by Lawless.
A: Assuming $n$ is known, an estimate can be obtained via
$ \Phi(x_k)=1-e^{-\lambda x_k} \approx (k/n)$
where $x_k$, $0<k<m$, refers to the $k$'th smallest value in your reduced data set. 
The logic is: if you had the entire set of $n$ samples, you could construct the empirical CDF, $\Phi$, from this sample.  Then if you took item $k$ of this sorted array, it would correspond to the CDF value $k/n$.  In many cases, $k=n/2$ is a useful choice.
