Contenido del Curso
Probability Theory Basics
Probability Theory Basics
Gaussian Distribution
The Gaussian distribution, also known as the normal distribution, is a continuous probability distribution widely used in statistics and probability theory.
Gaussian distribution applications
We can use this distribution to describe the following values:
- Physical Measurements: Many physical measurements, such as height, weight, blood pressure, and body temperature, can be reasonably approximated by a Gaussian distribution. For example, the height of adult men or women in a population often follows a Gaussian distribution;
- Errors and Residuals: In statistical analysis or regression modeling, errors or residuals (the difference between observed and predicted values) are usually assumed to be normally distributed;
- Test Scores: Standardized test scores such as the SAT or ACT are often modeled using a Gaussian distribution in educational testing;
- Environmental measurements: A Gaussian distribution can often describe variables such as air pollution, noise levels, and water quality measurements.
Python implementation
We can also use .cdf()
method of scipy.stats.norm
class to work with Gaussian distribution in Python. It has two main parameters: loc
determines the mean value of the experiment's result, and scale
determines the average deviation from the mean.
Example
Calculate the probability that the height of a randomly chosen man will be less than 160
or more than 190
. Assume that the mean value of men's height is 170,
and the average deviation is 20
.
from scipy.stats import norm # Calculate probability that man has height between 160 and 190 proba_160_190 = norm.cdf(190, loc=170, scale=20) - norm.cdf(160, loc=170, scale=20) # Calculate the probability of complemented event prob_not_160_190 = 1 - proba_160_190 print(f'Result probability is {prob_not_160_190:.4f}')
The Gaussian distribution is one of the most popular and commonly used distributions. Its properties are discussed in more detail in the Probability Theory Mastering course.
¡Gracias por tus comentarios!