Statistics

Distributions, estimation, hypothesis testing

In this chapter, you will learn to

Tools: NumPy

10 exercises

Each exercise is graded automatically, in your browser. The full statements are available once you have an account.

  1. What this is for in real life

    Every measurement is noisy: statistics tells you what you can conclude from it, and how confident you can be. - A brewery. In the early 1900s, William Gosset, a chemist at Guinness in Dublin, had to judge the…

  2. Las Vegas

    On a stopover in Monaco, you push open the doors of the Casino de Monte-Carlo. The dealer offers the simplest game in the room: you roll n dice at once. Each die has m faces numbered 1 to m and earns you as many…

  3. The Monte-Carlo jackpot

    Flush with excitement from the first game, you move to the next table. Same n dice with m faces, same base rules (you win the sum of the dice, playing costs cost). But the dealer adds a rule: if the same value…

  4. The rigged die

    The casino hires you as a detective. Your mission: examine dice and say whether they are rigged or fair. Implement the function detect(lancers) which takes an array of rolls (values 1 to 6) and returns "truque" or…

  5. The bettor

    You discover the casino's secret room: machines whose every draw follows a stable but unknown distribution. Each round, you are shown a history of past draws, then you bet on an interval [a,b][a, b] where the…

  6. Dispersion

    Two cities have the same average temperature (15°C). But one is placid (14, 15, 16) and the other extreme (−5, 15, 35). The mean, on its own, says nothing about this difference. Invent a single number that…

  7. The more you measure, the surer you are

    A thermometer is noisy: each measurement deviates from the true temperature by random noise with standard deviation sigma. To estimate the temperature, you take the mean of n measurements. Intuitively, the more…

  8. The suspicious dice

    Your exploits at the tables are the talk of Monaco. A manufacturer that supplies the dice for the Casino de Monte-Carlo hires you as a quality controller. With each delivery, the workshop sends you a batch of dice…

  9. The thermometer's precision

    Still in the workshop, your foundryman friend shows you the step before: the dice are cast in a furnace whose consistency depends on the temperature. But the thermometer is imprecise: each measurement differs a little.…

  10. The relationship detector

    You are given two series of measurements x and y. Are these two variables related, or completely independent? Implement detect_link(x, y) which returns a score between -1 and 1: - +1: when x increases…