Current location - Training Enrollment Network - Mathematics courses - How to realize these five powerful probability distributions in Python?
How to realize these five powerful probability distributions in Python?
R programming language has become the de facto standard in statistical analysis. But in this article, I will tell you how easy it is to implement statistical concepts in Python. I want to use Python to realize some discrete and continuous probability distributions. Although I won't discuss the mathematical details of these distributions, I will give you some good materials to learn these statistical concepts through links. Before discussing these probability distributions, I want to briefly talk about what random variables are. Random variables are the quantification of experimental results.

For example, a random variable representing the result of coin toss can be expressed as

computer programming language

1

2

X = {1 If the face is up,

If the reverse side is up}

A random variable is a variable that takes a set of possible values (discrete or continuous) and obeys some randomness. Every possible value of a random variable is associated with a probability. All possible values of a random variable and the probabilities associated with them are called probability distributions.

I encourage you to study the scipy.stats module carefully.

There are two types of probability distribution: discrete probability distribution and continuous probability distribution.

Discrete probability distribution is also called probability quality function. Examples of discrete probability distributions are Bernoulli distribution, binomial distribution, Poisson distribution and geometric distribution.

Continuous probability distribution, also known as probability density function, is a function with continuous values (such as a function on the real line). Normal distribution, exponential distribution and beta distribution all belong to continuous probability distribution.

If you want to know more about discrete and continuous random variables, you can watch the video of Khan Academy about probability distribution.