ATM example

If you know how many specific events occurred per unit of measure, you can assume that the distribution of the random variable follows a Poisson distribution to study the phenomenon.

Consider an ATM (automatic teller machine) at a very busy shopping mall. The bank wants to avoid making customers wait in line to use the ATM. It has been observed that the average number of customers making withdrawals between 10:00 a.m. and 10:05 a.m. on any given day is 1.

As a data analyst at the bank, you are asked what the probability is that the bank will need to install another ATM to handle the load.

To answer the question, you need to calculate the probability of getting more than one customer during that time period.

This exercise is part of the course

Foundations of Probability in Python

View Course

Exercise instructions

  • Import poisson from scipy.stats.
  • Calculate the probability of having more than one customer visiting the ATM in this 5-minute period.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Import poisson from scipy.stats
from ____

# Probability of more than 1 customer
probability = ____.____(k=____, mu=____)

# Print the result
print(probability)