DeepLLM Quiz
Statistics and Probability

Bernoulli, binomial and multinomial distributions

10 questions on Bernoulli, binomial and multinomial distributions, one-hot encoding, maximum likelihood estimates and sufficient statistics.

  • 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

    A biased coin lands heads with probability 0.25. About how many heads do you expect in 100 independent flips?

    • 50
    • 25
    • 75
  2. Sample 2

    In a survey of 200 people, 120 prefer option A, 50 prefer B and 30 prefer C. What does maximum likelihood estimate as the probability of C?

    • 0.15
    • 0.25
    • 0.30

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

Flip a coin, click an advert, pass or fail a test, spam or not spam: a huge share of the questions that data science answers are about outcomes that fall into a small number of categories. The simplest models for them are three distributions that every practitioner meets in the first week. One describes a single yes-or-no trial. One describes how many times «yes» turns up in a number of trials. And one extends the idea to categories with more than two possible outcomes, such as the faces of a die or the labels of a classifier.

This quiz introduces all three in a practical way. You will see what the single parameter of a yes-or-no trial means, and how the count of successes in repeated trials is built from the single case. You will use the basic facts about averages and spread of such counts in small examples, and learn the standard way of writing a categorical outcome as a list of zeros with one single one, often called one-hot encoding. That encoding appears everywhere in machine learning, from labels to the outputs of classification networks.

The second theme is estimation. Given a record of outcomes, what is the best guess for the underlying probabilities? The method of maximum likelihood gives a very natural answer, which the quiz asks you to apply to a coin and to a survey. You will also meet the idea of a sufficient statistic, a short summary that carries everything the data can tell you about the parameter, so that the raw data no longer has to be stored. It is a small idea with large practical consequences for how much information a system has to keep.

Typical errors in this area are easy to make. People mix up the probability of a single trial with the number of successes in many trials. They forget that the probabilities of all categories must add up to one. They assume that a small sample gives a reliable estimate, though a handful of tosses can suggest wildly extreme probabilities. And they overlook that a two-outcome variable can be treated either as a count of successes or as a one-hot pair, which gives the same answers. Because these three distributions sit underneath so many larger models, a firm grasp of them makes later topics, such as logistic regression and classification networks, far easier to follow. The same counting ideas also explain why click-through rates, defect rates and survey shares are always reported together with the number of cases behind them.

The quiz suits students in statistics and machine learning, and anyone who works with click rates, pass rates or classification labels. It needs only simple arithmetic. There are 10 questions, each with an explanation shown straight after you answer, 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 any formulas?

No. The questions use small round numbers, and the explanations show the reasoning in words. You don't have to remember any formula to answer, although the answers are consistent with the standard ones.

›What is a Bernoulli distribution?

It is the distribution of a single trial with two possible outcomes, usually written as zero and one. A single number, the probability of the outcome one, describes it completely, and the probability of zero is whatever is left over. A damaged coin that favours heads is a typical example.

›What is a binomial distribution?

It describes how many of a fixed number of independent trials end in the outcome one. Each trial behaves as a Bernoulli trial with the same probability. The count can be anything from none of the trials to all of them, and the likeliest counts cluster around the expected number, which grows in proportion to the number of trials.

›What is a multinomial distribution?

It generalises the binomial to a variable that can fall in one of several categories. It describes how many of the trials land in each category. The probabilities of the categories are non-negative and add up to one, which is why a die with six faces needs five free numbers to describe it, not six.

›What is one-hot encoding?

It is a way of writing a categorical value as a list with one position per category, with a one in the position of the category that occurred and zeros elsewhere. It is also called the one-of-K scheme. It makes categorical data easy to handle mathematically, and it is the usual target format for classification networks.

›How are the probabilities estimated by maximum likelihood?

For all three distributions, the answer is the intuitive one: the estimated probability of an outcome is the fraction of the observations in which it occurred. The strength of the method is that it works for any distribution. Its weakness shows with very small samples, where the fractions can be extreme.

›What is a sufficient statistic?

It is a summary of the data that contains everything the data say about the parameters of a distribution. For a series of yes-or-no trials the summary is just the count of yeses and the number of trials. After computing it, the individual records can be discarded without affecting the estimate. In practice this also means that a long log of events can be replaced by a handful of counters, one per category, without losing anything the model could use. That is a big saving for systems that monitor millions of clicks or transactions, and it is why streaming analytics so often start by counting.

More quizzes