Challenge
Opgave
Swipe to start coding
Imagine you posted something to your favorite social network and decided to calculate the number of likes and decide to calculate the probability receive 990990
likes. Follow the algorithm:
- Import
poisson
object. - Calculate the probability of receiving exactly
990990
likes with the mean value1000000
.
Look to the graph that corresponds to the distribution:
Løsning
9
1
2
3
4
5
6
7
# Import 'poisson' object
from scipy.stats import poisson
# Calculate the probability
prob = poisson.pmf(k = 990990, mu = 1000000)
print("The probability is", prob)
Var alt klart?
Tak for dine kommentarer!
Sektion 4. Kapitel 7
9
1
2
3
4
5
6
7
# Import 'poisson' object
___
# Calculate the probability
prob = ___.___(k = ___, mu = ___)
print("The probability is", prob)
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat