# In maximum likelihood estimation, can you maximize $p(x|\theta)$ rather than $L(\theta)$? [duplicate]

Why do you have to define a likelihood function then say you are maximising the likelihood function? Why can't you just maximize $p(x|\theta)$, which is an expression in $\theta$ ? What is technically wrong with doing that?

## marked as duplicate by Tim♦Oct 16 '17 at 11:57

• @liyuan both linked threads (especially second one) answer your question. You can't maximize $p(x|\theta)$ because $\theta$ is not a random variable, so you cannot condition on it and such conditional probability does not exist. You could maximize it only if you assumes $\theta$ to be a random variable, but then you would need to assume a probability distribution (prior) for it and use Bayesian approach rather then MLE. – Tim Oct 16 '17 at 12:25
• Have you looked at this answer: stats.stackexchange.com/a/224623/2116? Likelihood function treats $p(x|\theta)$ as a function of $\theta$, with $x$ fixed, whereas probability densitye function treats $p(x|\theta)$ as a function of $x$ with $\theta$ fixed. Hence maximisation in both cases gives a different result. – mpiktas Oct 16 '17 at 12:33