# Likelihood Function is a random variable

I am taking my first statistics course and we are talking about finding a good estimate to unknown parameter $\theta$ given a sample $X_{1},...X_{n}\sim F_{\theta}$, and we talked about the likelihood function $L(\theta)$ and he claimed the maximum of likelihood function $L(\theta)$ is a random variable and the lecturer gave the example of two consecutive coin tosses. So we have $(T,T),(T,H),(H,T),(H,H)$. Assuming the probability of getting $T$ is an unknown parameter $p$. Then we will have to maximize $p^2,p(1-p),(1-p)^2$ respectively to find which $p$ is more likely to give us the given sample space and as a result we had

$\hat{p}=\begin{cases} 1 & \left(T,T\right)\\ \frac{1}{2} & (H,T)\,or\,(T,H)\\ 0 & \left(H,H\right) \end{cases}$

But I didn't really understand how to see this as random variable. I mean if I look at $P(\hat{p}=1)=p^2$, it doesn't really makes sense since p is an unknow parameter. Now we are talking about given two estimations (two random variables), which gives a better estimation (Mean Squarred Error etc.) and we are usng the fact that the estimations are random variables, but since I don't get why it's a random variable it creates a problem for my understanding. Can someone explain why this is a random variable, or if I am misunderstanding something? Thanks

A random variable $\displaystyle X\colon \Omega \to \mathbb R$ is a measurable function from the set of possible outcomes $\displaystyle \Omega$ to the real line.

So we every result of your random experiment (within the sample space $\Omega$) is mapped to a real-valued estimate of the unknown parameter $\theta$ through the optimization of the likelihood function.

• Hey, Thanks for replying! Now I do understand why it's a random variable, I don't know why I didn't look at it this way. But I still don't understand what $P(\hat{p}=1)=P({\omega | \hat{p}(\omega)=1})=P({(T,T)})$ gives, since I don't know what p is and I am trying to estimate it. Maybe I am misunderstanding something? – Charles Carmichael Dec 9 '16 at 21:13
• OK. You have already accepted an answer, though. It's not a problem, but sometimes it's worth holding off for a little while to see better answers cropping up - I'm guilty of doing the same many times... I would read the equalities you wrote along the lines of "if I see two tails in the outcome of a single experiment, the estimated assessment of the probability of head that maximizes the outcome I have just witnessed is $\Pr(T)=1.$ – Antoni Parellada Dec 9 '16 at 21:19
• This answer may help you, although there is another one more apropos in CV. – Antoni Parellada Dec 9 '16 at 21:29
• Yes, you are right, I just appreciate every person that takes their time to answer questions, although they don't have to. Your answer helped me a lot and thanks for the link as well, it helped me understand more. Thanks! – Charles Carmichael Dec 9 '16 at 21:40
• oh, now I understand what you meant by accepting an answer, I thought I could do that for every answer I get, my bad. – Charles Carmichael Dec 9 '16 at 21:43

Since $\theta$ is a parameter (unknown), any function (non constant) of $\theta$ is a random variable.

$L(\theta)$ is just a function of $\theta$ !