Normal (Gaussian) Distribution
π Normal (Gaussian) Distribution in Python
The Normal Distribution (also called Gaussian distribution) is a bell-shaped curve where most of the data points cluster around the mean. Itβs widely used in statistics, machine learning, and natural phenomena modeling.
β 1. Characteristics of Normal Distribution
-
Symmetric about the mean
-
Mean, median, and mode are equal
-
Defined by mean (ΞΌ) and standard deviation (Ο)
-
Probability Density Function (PDF):
f(x)=1Ο2Οeβ(xβΞΌ)22Ο2f(x) = \frac{1}{\sigma \sqrt{2\pi}} e^{-\frac{(x-\mu)^2}{2\sigma^2}}
β 2. Generate Normal Distribution Using NumPy
β 3. Visualize Normal Distribution
Histogram
Using Seaborn
-
kde=Trueβ plots the smooth density curve
β 4. Generate Normal Distribution with Different Mean & Std
β 5. Check Mean and Standard Deviation
β 6. Probability Density Function (PDF)
π§ Summary
| Parameter | Meaning |
|---|---|
mu / loc |
Mean (center of the distribution) |
sigma / scale |
Standard deviation (spread) |
size |
Number of random samples |
-
Use
numpy.random.normal()for generating data -
Use
matplotliborseabornfor visualization -
The bell curve is symmetric and widely applicable in statistics
π― Practice Task
-
Generate 1000 numbers with
ΞΌ=100andΟ=15 -
Plot histogram with KDE
-
Verify mean and standard deviation of the generated data
-
Plot the corresponding PDF curve
