1. Learn
  2. /
  3. Courses
  4. /
  5. Foundations of Probability in Python

Connected

Exercise

Restaurant spending example

Let's go back to the example of the restaurant chain that has been collecting data about customer spending. Recall that the data shows that the spending is approximately normally distributed, with a mean of 3.15 and a standard deviation of 1.5 per customer, as pictured in the plot.

Spending distribution

We can use the already imported norm object from scipy.stats to answer several questions about customer spending at this restaurant chain.

Instructions 1/4

undefined XP
  • 1

    What is the probability that a customer will spend $3 or less?

  • 2

    What is the probability that a customer will spend more than $5?

  • 3

    What is the probability that a customer will spend more than $2.15 and $4.15 or less?

  • 4

    What is the probability that a customer will spend $2.15 or less or more than $4.15?