Course Content
Probability Theory
Probability Theory
Discrete Uniform Distribution
Let's talk about discrete distributions.
What is it?
Discrete distribution is a distribution that has a finite number of possible outcomes.
To dive deeper into this definition, it is better to look at the first example, uniform distribution.
To work with this distribution, we should import the uniform
object from scipy.stats
, and then we can apply numerous functions to this distribution.
Key characteristics:
Each outcome is equally likely to happen.
Example:
When we roll a dice, it is always an equal probability for each event. As we remember from this chapter, the probability is a fraction where the amount of the desired outcome is the numerator and the amount of all outcomes is the denominator.
Some theory:
Mean of the distribution, also called the expected value, defines the sample's average value. Standard deviation expresses how much the random value from the sample differs from the mean.
There is no point in talking about mean and standard deviation here; the reason is that all outcomes are equally likely to happen. There are no deviations or outliers. By the way, we even can not make a prediction based on uniform distribution.
We are not going to work with this distribution a lot because we will deal with the distributions that have more predictive power.
But we must get acquainted with it! Try to build a random sample of the uniform distribution. We can do it with the uniform
object from scipy.stats
, the syntax is uniform.rvs(size)
, where we should define the size.
Task
Try to build the uniform distribution following this algorithm:
- Import
seaborn
library withsns
alias. - Import
uniform
object fromscipy.stats
. - Import
matplotlib.pyplot
withplt
alias. - Create
uniform
distribution with the size20000
. - Create the histplot from Seaborn based on
uniform
distribution.
Thanks for your feedback!
Discrete Uniform Distribution
Let's talk about discrete distributions.
What is it?
Discrete distribution is a distribution that has a finite number of possible outcomes.
To dive deeper into this definition, it is better to look at the first example, uniform distribution.
To work with this distribution, we should import the uniform
object from scipy.stats
, and then we can apply numerous functions to this distribution.
Key characteristics:
Each outcome is equally likely to happen.
Example:
When we roll a dice, it is always an equal probability for each event. As we remember from this chapter, the probability is a fraction where the amount of the desired outcome is the numerator and the amount of all outcomes is the denominator.
Some theory:
Mean of the distribution, also called the expected value, defines the sample's average value. Standard deviation expresses how much the random value from the sample differs from the mean.
There is no point in talking about mean and standard deviation here; the reason is that all outcomes are equally likely to happen. There are no deviations or outliers. By the way, we even can not make a prediction based on uniform distribution.
We are not going to work with this distribution a lot because we will deal with the distributions that have more predictive power.
But we must get acquainted with it! Try to build a random sample of the uniform distribution. We can do it with the uniform
object from scipy.stats
, the syntax is uniform.rvs(size)
, where we should define the size.
Task
Try to build the uniform distribution following this algorithm:
- Import
seaborn
library withsns
alias. - Import
uniform
object fromscipy.stats
. - Import
matplotlib.pyplot
withplt
alias. - Create
uniform
distribution with the size20000
. - Create the histplot from Seaborn based on
uniform
distribution.
Thanks for your feedback!
Discrete Uniform Distribution
Let's talk about discrete distributions.
What is it?
Discrete distribution is a distribution that has a finite number of possible outcomes.
To dive deeper into this definition, it is better to look at the first example, uniform distribution.
To work with this distribution, we should import the uniform
object from scipy.stats
, and then we can apply numerous functions to this distribution.
Key characteristics:
Each outcome is equally likely to happen.
Example:
When we roll a dice, it is always an equal probability for each event. As we remember from this chapter, the probability is a fraction where the amount of the desired outcome is the numerator and the amount of all outcomes is the denominator.
Some theory:
Mean of the distribution, also called the expected value, defines the sample's average value. Standard deviation expresses how much the random value from the sample differs from the mean.
There is no point in talking about mean and standard deviation here; the reason is that all outcomes are equally likely to happen. There are no deviations or outliers. By the way, we even can not make a prediction based on uniform distribution.
We are not going to work with this distribution a lot because we will deal with the distributions that have more predictive power.
But we must get acquainted with it! Try to build a random sample of the uniform distribution. We can do it with the uniform
object from scipy.stats
, the syntax is uniform.rvs(size)
, where we should define the size.
Task
Try to build the uniform distribution following this algorithm:
- Import
seaborn
library withsns
alias. - Import
uniform
object fromscipy.stats
. - Import
matplotlib.pyplot
withplt
alias. - Create
uniform
distribution with the size20000
. - Create the histplot from Seaborn based on
uniform
distribution.
Thanks for your feedback!
Let's talk about discrete distributions.
What is it?
Discrete distribution is a distribution that has a finite number of possible outcomes.
To dive deeper into this definition, it is better to look at the first example, uniform distribution.
To work with this distribution, we should import the uniform
object from scipy.stats
, and then we can apply numerous functions to this distribution.
Key characteristics:
Each outcome is equally likely to happen.
Example:
When we roll a dice, it is always an equal probability for each event. As we remember from this chapter, the probability is a fraction where the amount of the desired outcome is the numerator and the amount of all outcomes is the denominator.
Some theory:
Mean of the distribution, also called the expected value, defines the sample's average value. Standard deviation expresses how much the random value from the sample differs from the mean.
There is no point in talking about mean and standard deviation here; the reason is that all outcomes are equally likely to happen. There are no deviations or outliers. By the way, we even can not make a prediction based on uniform distribution.
We are not going to work with this distribution a lot because we will deal with the distributions that have more predictive power.
But we must get acquainted with it! Try to build a random sample of the uniform distribution. We can do it with the uniform
object from scipy.stats
, the syntax is uniform.rvs(size)
, where we should define the size.
Task
Try to build the uniform distribution following this algorithm:
- Import
seaborn
library withsns
alias. - Import
uniform
object fromscipy.stats
. - Import
matplotlib.pyplot
withplt
alias. - Create
uniform
distribution with the size20000
. - Create the histplot from Seaborn based on
uniform
distribution.