IniziaInizia gratis

Smartphone battery example

One of the most important things to consider when buying a smartphone is how long the battery will last.

Suppose the period of time between charges can be modeled with a normal distribution with a mean of 5 hours and a standard deviation of 1.5 hours.

A friend wants to buy a smartphone and is asking you the following questions.

norm is already imported from scipy.stats.

Questo esercizio fa parte del corso

Foundations of Probability in Python

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Probability that battery will last less than 3 hours
less_than_3h = norm.____(____, loc=____, scale=____)
print(less_than_3h)
Modifica ed esegui il codice