Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Poisson Distribution | Discrete Distributions
Probability Theory
course content

Course Content

Probability Theory

Probability Theory

1. Learn Basic Rules
2. Probabilities of Several Events
3. Conducting Fascinating Experiments
4. Discrete Distributions
5. Normal Distribution

bookPoisson Distribution

Here, we are going to make the task more complicated; let's talk about Poisson distribution.

To work with this distribution, we should import the poisson object from scipy.stats, and we you can apply numerous functions to this distribution like pmf, sf, and cdf that were already learned.

Key characteristics:

It measures the frequency over a specific time interval.

Example:

The data on how often your application had a certain number of users during its entire existence.

Explanation:

It seems to me that you know a lot now, so in this chapter, we are going to create and explain the Poisson distribution. Here is the code:

123456789
from scipy.stats import poisson import matplotlib.pyplot as plt fig, ax = plt.subplots() dist = poisson.rvs(mu = 50, size = 10000) plt.xlabel("The Amount of User") plt.ylabel("Frequency") plt.title("Poisson Distribution") ax.hist(dist, bins = 60) plt.show()
copy

We are going to talk about it a little bit, you already know the .rvs() function, but let's clarify something for this case poisson.rvs(mu = 50, size = 10000):

  • mu means mean (here, it was defined randomly).
  • size is the number inverted by the sum of all values ​​of the frequencies of the columns

Let's recall some functions, but for Poisson distribution (they are a little bit different):

For calculating the probability of receiving exactly k events: norm.pmf(k, mu).

For calculating the probability of receiving k or more events: norm.sf(k, mu).

For calculating the probability of receiving k or less events: norm.cdf(k, mu).

  • mu is the mean value of the distribution.

Task

You are going to work with the same distribution as you can see in the theory. As you know, the mean, in this case, is equal to 50, but let's figure out two probabilities. Follow the algorithm:

  1. Import poisson object.
  2. Calculate the probability that your site has more than 80 visitors with the mean value 50.
  3. Calculate the probability that your site has less than 20 visitors with the mean 50.
  4. Calculate the whole probability - the probability that your site has more than 80 or less than 20 visitors.

This task is a real-life challenge due to the reason that you calculate the probability of coping with a small or large amount of users.

Note

So, the probability that your app will visit an extremely small or large amount of people is extremely small. By the way, if the probability is too small, you can just drop it :)

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 4. Chapter 6
toggle bottom row

bookPoisson Distribution

Here, we are going to make the task more complicated; let's talk about Poisson distribution.

To work with this distribution, we should import the poisson object from scipy.stats, and we you can apply numerous functions to this distribution like pmf, sf, and cdf that were already learned.

Key characteristics:

It measures the frequency over a specific time interval.

Example:

The data on how often your application had a certain number of users during its entire existence.

Explanation:

It seems to me that you know a lot now, so in this chapter, we are going to create and explain the Poisson distribution. Here is the code:

123456789
from scipy.stats import poisson import matplotlib.pyplot as plt fig, ax = plt.subplots() dist = poisson.rvs(mu = 50, size = 10000) plt.xlabel("The Amount of User") plt.ylabel("Frequency") plt.title("Poisson Distribution") ax.hist(dist, bins = 60) plt.show()
copy

We are going to talk about it a little bit, you already know the .rvs() function, but let's clarify something for this case poisson.rvs(mu = 50, size = 10000):

  • mu means mean (here, it was defined randomly).
  • size is the number inverted by the sum of all values ​​of the frequencies of the columns

Let's recall some functions, but for Poisson distribution (they are a little bit different):

For calculating the probability of receiving exactly k events: norm.pmf(k, mu).

For calculating the probability of receiving k or more events: norm.sf(k, mu).

For calculating the probability of receiving k or less events: norm.cdf(k, mu).

  • mu is the mean value of the distribution.

Task

You are going to work with the same distribution as you can see in the theory. As you know, the mean, in this case, is equal to 50, but let's figure out two probabilities. Follow the algorithm:

  1. Import poisson object.
  2. Calculate the probability that your site has more than 80 visitors with the mean value 50.
  3. Calculate the probability that your site has less than 20 visitors with the mean 50.
  4. Calculate the whole probability - the probability that your site has more than 80 or less than 20 visitors.

This task is a real-life challenge due to the reason that you calculate the probability of coping with a small or large amount of users.

Note

So, the probability that your app will visit an extremely small or large amount of people is extremely small. By the way, if the probability is too small, you can just drop it :)

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 4. Chapter 6
toggle bottom row

bookPoisson Distribution

Here, we are going to make the task more complicated; let's talk about Poisson distribution.

To work with this distribution, we should import the poisson object from scipy.stats, and we you can apply numerous functions to this distribution like pmf, sf, and cdf that were already learned.

Key characteristics:

It measures the frequency over a specific time interval.

Example:

The data on how often your application had a certain number of users during its entire existence.

Explanation:

It seems to me that you know a lot now, so in this chapter, we are going to create and explain the Poisson distribution. Here is the code:

123456789
from scipy.stats import poisson import matplotlib.pyplot as plt fig, ax = plt.subplots() dist = poisson.rvs(mu = 50, size = 10000) plt.xlabel("The Amount of User") plt.ylabel("Frequency") plt.title("Poisson Distribution") ax.hist(dist, bins = 60) plt.show()
copy

We are going to talk about it a little bit, you already know the .rvs() function, but let's clarify something for this case poisson.rvs(mu = 50, size = 10000):

  • mu means mean (here, it was defined randomly).
  • size is the number inverted by the sum of all values ​​of the frequencies of the columns

Let's recall some functions, but for Poisson distribution (they are a little bit different):

For calculating the probability of receiving exactly k events: norm.pmf(k, mu).

For calculating the probability of receiving k or more events: norm.sf(k, mu).

For calculating the probability of receiving k or less events: norm.cdf(k, mu).

  • mu is the mean value of the distribution.

Task

You are going to work with the same distribution as you can see in the theory. As you know, the mean, in this case, is equal to 50, but let's figure out two probabilities. Follow the algorithm:

  1. Import poisson object.
  2. Calculate the probability that your site has more than 80 visitors with the mean value 50.
  3. Calculate the probability that your site has less than 20 visitors with the mean 50.
  4. Calculate the whole probability - the probability that your site has more than 80 or less than 20 visitors.

This task is a real-life challenge due to the reason that you calculate the probability of coping with a small or large amount of users.

Note

So, the probability that your app will visit an extremely small or large amount of people is extremely small. By the way, if the probability is too small, you can just drop it :)

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Here, we are going to make the task more complicated; let's talk about Poisson distribution.

To work with this distribution, we should import the poisson object from scipy.stats, and we you can apply numerous functions to this distribution like pmf, sf, and cdf that were already learned.

Key characteristics:

It measures the frequency over a specific time interval.

Example:

The data on how often your application had a certain number of users during its entire existence.

Explanation:

It seems to me that you know a lot now, so in this chapter, we are going to create and explain the Poisson distribution. Here is the code:

123456789
from scipy.stats import poisson import matplotlib.pyplot as plt fig, ax = plt.subplots() dist = poisson.rvs(mu = 50, size = 10000) plt.xlabel("The Amount of User") plt.ylabel("Frequency") plt.title("Poisson Distribution") ax.hist(dist, bins = 60) plt.show()
copy

We are going to talk about it a little bit, you already know the .rvs() function, but let's clarify something for this case poisson.rvs(mu = 50, size = 10000):

  • mu means mean (here, it was defined randomly).
  • size is the number inverted by the sum of all values ​​of the frequencies of the columns

Let's recall some functions, but for Poisson distribution (they are a little bit different):

For calculating the probability of receiving exactly k events: norm.pmf(k, mu).

For calculating the probability of receiving k or more events: norm.sf(k, mu).

For calculating the probability of receiving k or less events: norm.cdf(k, mu).

  • mu is the mean value of the distribution.

Task

You are going to work with the same distribution as you can see in the theory. As you know, the mean, in this case, is equal to 50, but let's figure out two probabilities. Follow the algorithm:

  1. Import poisson object.
  2. Calculate the probability that your site has more than 80 visitors with the mean value 50.
  3. Calculate the probability that your site has less than 20 visitors with the mean 50.
  4. Calculate the whole probability - the probability that your site has more than 80 or less than 20 visitors.

This task is a real-life challenge due to the reason that you calculate the probability of coping with a small or large amount of users.

Note

So, the probability that your app will visit an extremely small or large amount of people is extremely small. By the way, if the probability is too small, you can just drop it :)

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 4. Chapter 6
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt