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.