Likelihood
The likelihood function of a sample, the log-likelihood and the maximum likelihood method on four distributions (Bernoulli, Poisson, exponential, normal): write, take the logarithm, differentiate, set to zero.
- 21 cards
- 7 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- The numbers
- The curves
- Scenarios
- Understand
A few cards from the deck
Likelihood function: what is it?
Show the answer
The probability (or density) of observing exactly the data collected, seen as a function of the unknown parameter, with the data held fixed.
For independent observations, it is the product of the probabilities of each observation. It is not a probability distribution of the parameter: its area is not 1.
What does this program print?
```python
import math
x = [1, 1, 0, 1]
p = 0.75
print(round(sum(math.log(p if v else 1 - p) for v in x), 3))`-2.2490.1052.249-0.105
Show the answer
-2.249Each 1 contributes ln 0.75 and the 0 contributes ln 0.25; the sum is ln 0.10547 ≈ -2.249. A log-likelihood is negative, because a probability is below 1.
To find the maximum of the log-likelihood, … with respect to the parameter then … the derivative to zero.
Show the answer
To find the maximum of the log-likelihood, differentiate with respect to the parameter then set the derivative to zero.
A maximum is a point where the slope vanishes. One still checks that it is a maximum and not a minimum, for instance because the derivative goes from positive to negative.