# Undefined term in log likelihood

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?

• 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... . – whuber Jan 6 '17 at 19:27
• 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? – drgxfs Jan 6 '17 at 19:35
• Keep in mind that the density has to integrate to 1 over 0<=x<=1. Does this put restrictions on theta? – Michael R. Chernick Jan 6 '17 at 20:08
• What is needed is to include an indicator for $\theta \gt -1$! – whuber Jan 6 '17 at 20:25
• 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. – Michael R. Chernick Jan 6 '17 at 23:18

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.
• 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$. – Xi'an Jan 7 '17 at 14:49