5
$\begingroup$

The lifetime of computer monitors has a exponential distribution where the expected value can be written as: $\mu(s) = \frac{\beta}{s}$

Where $s$ is how bright the monitor is and both $s$ and $\beta$ are >0

How do I estimate the maximum-likelihood of parameter $\beta$?

I know that the log-likelihood for a exponential distribution is:

$l(\lambda) = n(\ln(\lambda) - \lambda\bar{t})$

And taking the derivative and equals it to zero yields:

$\frac{dl(\lambda)}{d\lambda} = n(\frac{1}{\lambda} - \bar{t}) = 0$

$\bar{t} = \frac{1}{\lambda}$

Here is where I get stuck.

EDIT 1

I have data for both the lifetime of the computer monitors and their brightness.

$\endgroup$
7
  • 1
    $\begingroup$ You need data about s. $\endgroup$
    – utobi
    Commented Nov 24, 2022 at 17:49
  • 1
    $\begingroup$ Yes i have data, i will make that clear in the question. Thanks. $\endgroup$
    – 0xcc
    Commented Nov 24, 2022 at 17:50
  • $\begingroup$ Is the sample independent? $\endgroup$
    – utobi
    Commented Nov 24, 2022 at 17:52
  • $\begingroup$ Yes, I assume it is. $\endgroup$
    – 0xcc
    Commented Nov 24, 2022 at 17:52
  • $\begingroup$ I still should come up with some expression for the likelihood of $\beta$? $\endgroup$
    – 0xcc
    Commented Nov 24, 2022 at 17:53

3 Answers 3

9
$\begingroup$

To estimate the $\beta$ by the maximum likelihood method, let $Y_1,\ldots, Y_n$ be the sample of lifetimes, with $Y_i\sim \text{Exp}(\beta/s_i)$, s.t. $E(Y_i) = \beta/s_i$ and independently for each $i$, where $s_i$ is the monitor brightness.

Then the likelihood function for $\beta$ is given by

$$ L(\beta) = \prod_{i=1}^n (s_i/\beta) e^{-\frac{1}{\beta}s_i Y_i} \propto \beta^{-n} e^{-\frac{1}{\beta}\sum_is_iY_i}. $$

I leave the rest to you...

$\endgroup$
6
  • 1
    $\begingroup$ Thank you, but there is something i don't understand, first, you plug in that $\lambda = \frac{\beta}{s}$, should it not be the inverse? That is $\lambda = \frac{s}{\beta}$ since the mean of a exponential distribution is: $\frac{1}{\lambda}$ Also if i continue with your calculations i get that the log-likelihood is : $l(\beta) = n \ln(\beta) \sum_i{\frac{Y_i}{s_i}}$ Taking it's derivative and setting it equal it to zero yields: $l'(\beta) = \frac{1}{\beta} n\sum_i{\frac{Y_i}{s_i}} = 0 $, which seems wrong? $\endgroup$
    – 0xcc
    Commented Nov 24, 2022 at 18:23
  • $\begingroup$ You are right @0xcc, I was using a different reparametrization, not the one you are working with. See the updated answer. $\endgroup$
    – utobi
    Commented Nov 24, 2022 at 18:43
  • 1
    $\begingroup$ Ok so i think i got it, the expression for the log-likelihood is: $-\ln(\beta) - \frac{\sum_i{Y_i s_i}}{\beta}$ So i want to try maximize that with respect to $\beta$ given my data? $\endgroup$
    – 0xcc
    Commented Nov 24, 2022 at 19:46
  • $\begingroup$ almost...its $-n\ln\beta-\cdots$ $\endgroup$
    – utobi
    Commented Nov 24, 2022 at 19:47
  • 1
    $\begingroup$ Wow now i got it, @utobi you are fantastic! Thank you. $\endgroup$
    – 0xcc
    Commented Nov 24, 2022 at 19:48
4
$\begingroup$

$ L(\beta) = P(\mathrm{Data} \mid \beta) = \prod_i f(x_i) $ and $\lambda = \frac{1}{\mu} = \frac{s}{\beta}$

Log is increasing so maximizing log is same as maximizing likelihood: $\ell(\beta) = \sum \log f(x_i).$

$ \log f(x_i) = \log \lambda e^{-\lambda x_i} = \log s - \log \beta - \frac{s}{\beta}x_i$

and

\frac{d}{d \beta} \log f = -\frac{1}{\beta} - \frac{s}{\beta^2}x_i.

So,

\frac{d}{d \beta}\ell(\beta) = -\frac{n}{\beta} - \frac{s}{\beta^2}\sum x_i = 0

gives

\hat{\beta} = \frac{s}{n}\sum x_i = s \bar{x}.

Note: the second derivative of $\ell$ is positive since $x_i, s, \beta>0$ so LL is concave.

$\endgroup$
3
  • 1
    $\begingroup$ Note that this is a question tagged [self-study] and our policy is to not provide full answers but only hints. $\endgroup$
    – utobi
    Commented Nov 24, 2022 at 19:27
  • $\begingroup$ Thank you, I was not aware of that policy. $\endgroup$
    – Hunaphu
    Commented Nov 24, 2022 at 19:31
  • 1
    $\begingroup$ You are welcome! see here $\endgroup$
    – utobi
    Commented Nov 24, 2022 at 19:34
3
$\begingroup$

Assise from using a direct derivation, leading to a closed form expression, you can do this with a generalized linear model a description is given in the question

Fitting exponential (regression) model by MLE?

With that approach you have more flexibility (e.g. change the function $\mu(s)$)

Example

In R you would use the function glm with the family gamma and specify a dispersion parameter dispersion=1 (the exponential distribution is a special case of the gamma distribution for which the dispersion parameter is equal to 1).

### generate and plot data 

set.seed(1)
n = 100
x = runif(n,0,10)
mu = 2/x
rate = 1/mu
y = rexp(n,rate)
plot(x,y)

#### fit glm model with Gamma distribution that has k=1 (ie. the exponential distribution)

fit = glm(y ~ 0+x, family = Gamma())
summary(fit,dispersion=1)

# This gives as result 
# a rate parameter of lambda = 0.49868 x
# which relates to
# a mean that is mu = 1/lambda = 2.005294/x
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.