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 matplotlib or seaborn for visualization

  • The bell curve is symmetric and widely applicable in statistics


🎯 Practice Task

  1. Generate 1000 numbers with μ=100 and σ=15

  2. Plot histogram with KDE

  3. Verify mean and standard deviation of the generated data

  4. Plot the corresponding PDF curve

You may also like...