MulaiMulai sekarang secara gratis

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.

Latihan ini adalah bagian dari kursus

Foundations of Probability in Python

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Probability of spending $3 or less
spending = ____.____(____, loc=____, scale=____)
print(spending)
Edit dan Jalankan Kode