Parameters are uncertain too
One question runs through this course: how do we reason and predict when the parameters of a model are themselves uncertain, and what do we do when the exact computation is out of reach? The first half answers the first part exactly. The second half builds approximations and scales them to big data and neural networks. This topic sets up the vocabulary on the smallest example there is.
A friend tosses a coin three times and gets three heads. Let be the outcome of toss , with for heads, and let be the probability of heads. The model says the tosses are and independent given . A sequence with heads in tosses then has probability
The frequentist reading treats as a fixed unknown constant. Only the data are random, and an estimate is judged by how it would behave over many imagined repetitions of the experiment. The standard estimate is the maximum likelihood estimate (MLE): the that maximizes the log-likelihood
The logarithm does not move the maximum and turns products into sums. For our three heads out of three, keeps growing all the way to , so . The model is now certain that tails is impossible. Three tosses do not justify that.
The Bayesian reading uses probability for a degree of belief given the available information. Then nothing stops us from giving itself a distribution: it describes what we know and do not know about this coin. The rules of probability are the same in both readings; what changes is which quantities get distributions. Two people with different information may reasonably hold different probabilities for the same event: someone who has seen the coin's previous hundred tosses knows more than we do.
With plenty of data and a correct model the two readings mostly agree. They differ most on small samples like ours.