2015年8月6日 星期四

8.6 Coursera Biostat Quiz 2 Question 6

Let X be a uniform random variable with support of length 1, but where we don't know where it starts. So that the density is f(x)=1 for x(θ,θ+1) and 0 otherwise. We observe a random variable from this distribution, say x1. What does the likelihood look like?
  • A horizontal line between x1 and x1 - 1
  • A parabola
  • A diagonal line from x1 to x1 + 1
  • A point at x1
Thoughts after getting the right answer: do some coding and plotting will help so much in making the concept intuitive. The point is: the likelihood function is just another way to see probability density function, when fixing the variable and then see how the function changes when theta (just another parameter) change.

Discussion Forum posts:
Eric:
You don't need F(x).  I think of the likelyhood function (L(θ)) as a probability density function for the parameter θ given the data X¯={x1,x2,}.

Often, you can use Bayes' theorem to go from f(x|θ) to f(θ|x)=L(θ). (still hard to see how Bayes' theorem relate with this content) For this problem though, I think it just takes wrapping your head around the likelyhood function concept. Only one of the multiple choice answers makes sense.

I'll post the answer explanation on Monday, after the deadline. 
 


Michelle:
You don't need $$F(x)$$. You can think of the ordinary density function $$f(x)$$ as actually a function of $$f(x,\theta)$$ (This is perfect, to look at the function with an extra parameter). Usually we treat $$\theta$$ as known and then ask what the density is at different values of $$x$$. A normal density plot has $$x$$ on the horizontal axis and $$f(x,\theta)$$ on the vertical axis, for a single, constant value of $$\theta$$ .

For this problem instead think of the plot with $$\theta$$ on the horizontal axis and $$f(x,\theta)$$ on the vertical axis, for a single constant value of $$x$$.

My approach was that I just assigned a value to x, such as $$x=2.5$$. Then I made a table with different values of $$\theta$$ in one column and then $$f(x,\theta)$$ in another column. I calculated half a dozen values, then made my plot of $$f(x,\theta)$$ vs. $$\theta$$.

沒有留言:

張貼留言