I am trying to compute the MLE for a sample $X_1, \ldots, X_n$ where $$ f(x,\theta) = (\theta + 1)\theta^x, 0 \leq x \leq 1 $$

I have defined the likelihood as: $$ \begin{align} L(\theta|x) &= \prod_{i=1}^n (\theta+1)\theta^{x_i}\mathbb{1}_{[0,1]}(x_i) \\ &= (\theta+1)^n \theta^{\sum x_i}\prod_{i=1}^n 1_{[0,1]}(x_i)\\ \end{align} $$ But I am having trouble on the computation of the log likelihood: $$ \log L(\theta|x) = n \log(\theta +1) + \log(\theta)\sum_{i=1}^nx_i + \sum_{i=1}^n \log 1_{[0,1]}(x_i) $$

I see that I can take the derivative of this and compute the estimator for $\theta$ since the second derivative is <0. However, I am not sure what happens on the log likelihood with the term with the indicator function: if $x_i$ is outside the support, then the logarithm is undefined. Is this allowed, or should I somehow take this into account?

  • 7
    $\begingroup$ You might find the identity $$\prod_{i=1}^n 1_{[0,1]}(x_i)=1_{\min_i\{x_i\}}1_{\max_i\{x_i\}}$$ to be useful. You should also consider what you're actually doing: the log likelihood is viewed as a function of $\theta$, not of the $x_i$; moreover, if your model is at all appropriate, then certainly every $x_i$ is in $[0,1]$. (If they weren't, you would know for sure this is a bad model and you would switch to a more appropriate one.) There doesn't seem to be any issue to resolve... . $\endgroup$
    – whuber
    Commented Jan 6, 2017 at 19:27
  • 3
    $\begingroup$ If we assume that the model is appropriate (for the support of x), then why is there still the need to include the indicator function on the likelihood? Is it just a formality? I can see how the indicator function is useful for example for a piecewise function, but for a continuous support which is the case here, is it really needed? $\endgroup$
    – drgxfs
    Commented Jan 6, 2017 at 19:35
  • 2
    $\begingroup$ Keep in mind that the density has to integrate to 1 over 0<=x<=1. Does this put restrictions on theta? $\endgroup$ Commented Jan 6, 2017 at 20:08
  • 3
    $\begingroup$ What is needed is to include an indicator for $\theta \gt -1$! $\endgroup$
    – whuber
    Commented Jan 6, 2017 at 20:25
  • 3
    $\begingroup$ Note when theta equals 1 the density is 0 for all x [0,1]. So like whuber is saying there has to be some restriction on theta. $\endgroup$ Commented Jan 6, 2017 at 23:18

1 Answer 1


If $x_i$ is outside the unit interval, the log-likelihood is negative infinity. That's defined. It's not like this is an expectation or something, where we say it isn't defined if it's infinite.

You might prefer writing this as a piecewise function, or just restricting your attention/assuming your data are all on the unit interval.

  • 1
    $\begingroup$ I do not think this answers the question: the unit interval indicator on the datapoints (a) does not bring information on the parameter values and (b) is always equal to one for actual observations, since the data is generated from this model. $\endgroup$
    – Xi'an
    Commented Jan 7, 2017 at 8:39
  • $\begingroup$ @Xi'an I say "assuming your data are all on the unit interval." Should I change this to something else? $\endgroup$
    – Taylor
    Commented Jan 7, 2017 at 14:33
  • $\begingroup$ I worded it like this because I don't see it as logically necessary. The data could come from anywhere and this could be a poor model choice. Maybe I should mention the parameter constraint as well? $\endgroup$
    – Taylor
    Commented Jan 7, 2017 at 14:40
  • 3
    $\begingroup$ If the data does not stand within $(0,1)$ then the model is rejected by the data. And there is no argument for looking at this likelihood. If the data does stand in $(0,1)$ then all indicators are equal to one and the last term in the sum vanishes. In either case, this sum of indicators does not contribute to the likelihood of $\theta$. $\endgroup$
    – Xi'an
    Commented Jan 7, 2017 at 14:49

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.