3

Let $(X_1,X_2,...,X_n)$ be a random sample from a uniform distribution on the interval $(-\theta,\theta)$, where $\theta$ is an unknown positive number.

A particular sample of size $5$ gives values $0.87,-0.43,0.12,-0.92$ and $0.58$.

How can I draw a graph of the likelihood function $L(\theta)$ against $\theta$ for this sample?

Taylor
  • 18,278
  • 2
  • 31
  • 66
Mathxx
  • 475
  • 2
  • 7

1 Answers1

7

Recall that the likelihood function is

$$ L(\theta) = \prod_{i=1}^n f_\theta(X_i) $$

where $f_\theta$ is a probability density function (or probability mass function) parametrized by $\theta$. So your homework excercise asks you to evaluate the likelihood function with using different values of $\theta$ and plot $\theta$ vs $L(\theta)$. Check Maximum Likelihood Estimation (MLE) in layman terms to learn more on maximum likelihood.

Tim
  • 108,699
  • 20
  • 212
  • 390
  • I manage to get $L( \theta )=c(\frac{1}{\theta})^n$ for $-\theta – Mathxx Oct 25 '17 at 08:00
  • @Mathxx you need to choose some range for possible values of $\theta$, an then plot those values on x-axis and the likelihood function evaluated on those values on y-axis. – Tim Oct 25 '17 at 08:08
  • Can you show me how to as I don't really understand the solution given by? Thanks in advance. – Mathxx Oct 26 '17 at 05:06