DeepLLM Quiz
Statistics and Probability

Plates, observed and latent variables, and inference as reversing an arrow

10 questions on plates, deterministic parameters, shaded observed nodes, latent variables, predicting with a posterior, MAP estimates and Bayes' theorem on a graph.

  • 10 questions
  • Stopwatch
  • Instant feedback

Shown publicly with your score. Don’t use your full real name.

Sample questions

Play now ↑

Answers stay hidden. Start the quiz to play them.

  1. Sample 1

    In a model where the targets of a training set are observed and the weights have a prior distribution, which variable is latent?

    • The training targets
    • The noise level, which is a fixed setting
    • The weight vector, which is random but not observed

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

Drawing a model of a hundred thousand training examples with a hundred thousand nodes would be silly, so graphical models come with a small piece of notation that says: here is one example, and there are N of them. That box is called a plate, and it is one of a handful of conventions that make the diagrams readable. Others tell you which quantities are random and which are fixed settings, which values have been seen and which remain hidden. Once you know these conventions, a diagram of a model reads like a short paragraph.

This quiz teaches the conventions through a familiar model, a classifier whose weights have a prior distribution, and then moves from drawing to reasoning. You will see how the diagram changes when the parameters of the model, such as a noise level or a prior strength, are made explicit and how the observed targets are marked. You will see why the weights are called latent, and how a prediction for a new input is made: in principle by averaging over all weight values that the data allow, in practice by choosing the single most probable set of weights.

The second theme is inference, the updating of beliefs about hidden variables when others are observed. The simplest example is Bayes' theorem itself, which turns out to be a statement about reversing an arrow: a graph in which a hidden cause gives rise to an observation can be redrawn with the arrow turned round, so that it describes the hidden cause given the observation. The quiz closes by looking at how such computations can be organised on the graph itself, exactly for graphs shaped like trees and approximately when there are loops.

A few distinctions are often missed. Variables that are observed and variables that are fixed parameters are not the same thing, even though neither is uncertain at the time of inference. A latent variable is not necessarily something with a physical meaning. And a fully Bayesian prediction is the textbook ideal but is rarely carried out for large neural networks, for reasons of cost.

The quiz suits learners who have met Bayes' theorem and want to see it applied to structured models, and practitioners who read papers with plates and shaded nodes in their figures. It needs no calculus. There are 10 questions, each with an explanation, and it takes about four minutes. Notation matters because it is how ideas travel. A diagram with a plate, a shaded node and a floating parameter can convey in one glance what would take paragraphs to say, and learning to read such diagrams is a quick route into the research literature on probabilistic models, from classical regression to modern deep generative models. It also builds a useful habit: asking, for every quantity in a model, whether it is random, observed or fixed, because the answer decides what inference has to compute and what it can safely treat as given.

Questions and answers

›How long does the quiz take?

About 3 to 4 minutes for 10 questions, at roughly 20 seconds each. An explanation follows every answer, so the notation is gradually explained as you go.

›Do I need to know directed graphs already?

A basic idea of nodes and arrows is enough, and the quiz on directed graphical models explains them in detail. The questions here describe each convention in words, so you can take them in either order.

›What is a plate?

It is a box drawn around a node, labelled with a number, indicating that the node is repeated that many times. Drawing one representative node inside the box instead of all N copies makes models of data sets compact and readable, as with the targets of N training examples that share the same weights.

›How are parameters, observed variables and latent variables drawn?

Random variables are drawn as open circles. Variables that are observed, set to specific known values, are drawn with the circle shaded. Deterministic parameters, which are not random, are shown as small floating symbols without a circle. A random variable that is not observed is called latent or hidden.

›Why are the weights of a model called latent variables?

When the weights are given a prior distribution, they become random variables, and since their values are not observed, they are hidden. They are typically of little interest in themselves, because the aim is to predict new outputs. The graph makes clear that the training targets depend on them and that predictions can be made through them.

›How is a prediction made from such a model?

In a fully Bayesian treatment, you average the prediction over the posterior distribution of the weights, which means integrating them out using the sum rule. This is rarely done for deep networks. Instead, the most probable weights are found, giving what is called the MAP solution, and a single prediction is made with them.

›What is inference?

It is the process of calculating updated distributions over unobserved variables once some of the other variables have been set to observed values. In principle it only needs repeated use of the sum and product rules, or equivalently Bayes' theorem, but managing it efficiently benefits greatly from the structure of the graph.

›How does Bayes' theorem look on a graph?

A hidden variable with an arrow to an observed one represents a prior over the hidden variable and a distribution of the observation given it. After observing the second variable, Bayes' theorem gives the distribution of the first given the second, which is the same joint distribution drawn with the arrow reversed. It is the simplest example of inference.

More quizzes