The Bayesian view of model parameters
10 questions on priors over parameters, the posterior, MAP estimates, why regularisation is a prior and why full Bayes is hard for deep networks.
- 10 questions
- Stopwatch
- Instant feedback
Sample questions
Play now ↑Answers stay hidden. Start the quiz to play them.
Sample 1
A coin that looks ordinary is tossed three times and lands heads each time. What does maximum likelihood estimate as the probability of heads?
- Exactly 50%
- 100%, which would mean every future toss is heads
- Nothing: it can't give an estimate from three tosses
Sample 2
How is the posterior over the parameters obtained from the prior and the data?
- By multiplying the prior by the likelihood and rescaling so that it adds up to one
- By adding the prior to the likelihood
- By discarding the prior
How it works
- One question per screen. An answer is final once sent.
- You see right away whether you were right, with a short explanation.
- The stopwatch runs: on equal scores, the faster player ranks first.
- Only your best attempt counts, so replaying is never risky.
About this quiz
A coin that looks perfectly ordinary lands heads three times in a row. What should you believe about its next toss? One school of thought says the best estimate of the chance of heads is simply the share of heads you saw. Almost nobody believes that, and the reason shows that you were using prior knowledge all along. The Bayesian view of statistics makes that knowledge explicit, and it changes how you think about training a machine learning model: not as the search for one best set of parameters, but as the gradual narrowing of your belief about what the parameters might be.
This quiz introduces that way of thinking in terms of a model's parameters. You start with a belief, called the prior, about which parameter values are plausible. The data speak through the likelihood. Bayes' theorem combines the two to give a new belief, the posterior. You will see how this differs from the frequentist picture, where parameters are fixed unknown numbers and uncertainty comes from imagining other data sets, and why the distinction matters in practice.
One of the most useful results in the quiz connects the Bayesian view to a technique you may already know. If you believe beforehand that the weights of a model are probably small, then finding the most probable weights after seeing the data is exactly the same as fitting with a penalty on large weights. Regularisation, which looks like a trick for reducing overfitting, turns out to be a prior in disguise. A fully Bayesian treatment goes a step further and averages the predictions over all plausible weights instead of picking one set.
Several misconceptions are worth testing. People think the likelihood is a probability distribution over the parameters, which it is not. They think that a point estimate with a penalty is already fully Bayesian, when the whole point of the full treatment is to average rather than to choose. And they assume that being principled means being practical: the full calculation is out of reach for networks with billions of parameters, which is why most large models are trained by maximum likelihood with regularisation. Even if you never use a Bayesian toolkit, the habit of asking what you already believe, and how strongly, before looking at the data is a good safeguard against reading too much into a small sample. The same habit is useful when you read about models that report a probability along with their answer, because it prompts you to ask where that number came from and what it assumes.
The quiz suits students in machine learning and statistics, and practitioners who want to know what people mean by « Bayesian » beyond a theorem. No mathematics is needed. There are 10 questions, each with an explanation, and the quiz takes about four minutes.
Questions and answers
›How long does the quiz take?
About 3 to 4 minutes for 10 questions, at roughly 20 seconds each. An explanation appears after every answer.
›Do I need to know Bayes' theorem first?
It helps to have seen it, and the quiz on Bayes' theorem and medical screening is a good warm-up. But the questions here are framed in words. If you know that evidence updates a prior belief into a posterior one, you can follow everything.
›What is the difference between the Bayesian and frequentist views?
In the frequentist view, probability is the long-run frequency of repeatable events and the parameters of a model are fixed but unknown. In the Bayesian view, probability expresses uncertainty, so parameters can have a probability distribution. The Bayesian view includes the frequentist one as a special case.
›What is a prior over parameters?
It is a probability distribution describing which parameter values you consider plausible before seeing the data. For example, you might believe that weights are probably small and centred on zero. The prior is combined with the data to give the posterior.
›What is a MAP estimate?
MAP stands for maximum a posteriori. It is the single set of parameter values with the highest posterior probability. It differs from maximum likelihood because it includes the prior, and it differs from a fully Bayesian treatment because it still picks just one answer.
›Why is regularisation a kind of prior?
Because a penalty on large weights has the same effect as a prior belief that weights are small. When the prior is a bell-shaped distribution centred on zero, finding the most probable weights gives the familiar penalised squared error. The strength of the penalty reflects how strongly you hold that belief.
›What does a fully Bayesian prediction do?
It averages the predictions of every possible parameter setting, weighting each by its posterior probability. The prediction therefore reflects the uncertainty about the parameters, not only the single best guess. Overfitting in particular tends to disappear, because no single over-tuned setting dominates the average. A practical way to see the difference is to imagine training the same model twice on slightly different data. A single best-fit estimate may change a lot from one run to the next, while a distribution over parameters shows directly how much room remains, and which predictions are shaky because many different settings fit the evidence about equally well.
›Why isn't every model trained in a fully Bayesian way?
The averaging needs an integral over all the parameters, and for models with millions or billions of them even approximations are usually infeasible. With limited computing, it is often better to use a very large model trained by maximum likelihood with regularisation than to treat a much smaller model in a fully Bayesian way. In practice, many everyday techniques can be read as Bayesian ideas in disguise: penalised fitting, averaging several trained models and reporting a range instead of a single value all express, in different ways, that the parameters are not known exactly.