This article was published as a part of theÂ Data Science Blogathon

This article is based on the very famous and important rule, the rule of 68-95-99.7% rule or Empirical rule which is a very beautiful and powerful application of Normal Distribution or Gaussian Distribution. With the help of this rule, you can answer the data distribution without knowing too many things about the data. But before we start learning about this amazing concept we should know about the basic concept of probability and statistics such as what is distribution, mean, variance, pdf,Â CDF, and much more things. So without wasting our time let’s just start it.

One of the most important ideas in probability and statistics is the concept of Distributions. Distributions are shown us the nature of random data, it shows us how the data is spread in the given minimum and maximum value of a random variable called range. Data Distributions are nothing but the statical functions that give us the important intuitions about the data and give the various values that are very useful for making a crucial decision about the data. In other words, we can say that the probability distribution is a statical function that gives us all possible information and values that a random variable can consist of. The distribution of the data contains a range, the statical distribution functions produce the results between the range, the range is nothing but the minimum and maximum values of the random variable can have.

If we talk about the example of data distributions then we found that our nature is full of distributions any feature that exists in this nature is probably follows some type of distribution. Let’s talk about the heights of the human being if we just measure the heights of random 50 people then we found that the heights of random people follow some kind of distribution. and now if we want to gather information about the heights of people then we will use the probability distribution.

So the question is why we are using these distributions in probability and statistics. The intuition of using these distributions is very straightforward, we simply want to know the answer to various questions about the data or random variable. And here comes the two amazing fields of mathematics called probability and statistics. Probability and statistics have the strength to give the answers to our questions using some simple calculations.

Statistics and probability provide us the power to know about the data without even looking at the data. So probability and statistics provide us the various types of distributions such as Gaussian (aka Normal), Bernoulli, Binominal, Log-Normal, Perito distribution, etc. If we just know that the data or random variable follows any of the distribution available in probability and statistics we can answer tons of questions related to the data, that’s why we use distributions in probability and statistics.Â

Before we start learning about the Empirical rule we need to understand the concept of Mean, variance, pdf, and CDF because without knowing these terms we cant imagine the distributions so let’s learn about these topics:

**Mean:** Mean is nothing but the average of all data points. We simply calculate the mean by dividing the sum of all data points by the number of all data points and it is denoted by **Î¼**. Mean it gives us the central tendency of data points.

Â Â Â Â Â Â Â Â The formula of Mean is as follows:

created in paint

Where **x _{i}** is each dada point in random variable

**Variance: **Variance is nothing but the average squared distance between each data point to the mean value.Â variance tells about the spread of our distribution. in other words the variance tells us how far the data point is spread from the mean value. the variance is denoted by the symbolÂ **Ïƒ ^{2}**.

Â Â Â Â Â Â Â Â The formula of Variance is as follows:

https://getcalc.com/formula/statistics/variance-population-data.png

Â Â Â Â and if we take the square root of the varianceÂ **Ïƒ ^{2}Â **Then it’s become a Standard Deviation which is denoted byÂ

**Pdf ( Probability Density Function ): **Pdf is the smooth form of**Â **histograms which, pdf is defined as the density of data points on the particular value of the random variable.Â in other words, pdf is the measure of the density of data points in the given range of the data.

In the above figure, the density of points or the counts of the points between the range a and b. By looking at the figure we literally can say that there are more data points of random variable lies between the range of a and b.

**CDF ( Cumulative Distribution Function ): **The cumulative distribution function is the method to describe the random variable. This function shows us that how much % of data points lie in the range of 0 to a given point. Or in other words, it tells us what is the location of our given data point on the 100% distribution of data.

In the above figure, the blue line is called Pdf and the orange line is called CDF, the value of CDF is always lie between 0 to 1. if we draw the perpendicular on the x-axis then there is a point that exists on the graph somewhere cut the CDF function, and if we perpendicularly join the cross point of CDF to the y axis then you find the probability of data point of the x-axis on the y axis. for example, if your value of the x-axis is 1.5, then if you follow the above method of drawing perpendicular, then you will find that there are 60% of points exist in the distribution which value is less than or equal to 1.5.

We get to see this rule under the Normal or Gaussian distribution. whenever a data or random variable follows the normal distribution, then we can apply this rule to the data. So let’s get to know a little bit about the Gaussian distribution.

Gaussian distribution is symmetric distribution. This means if we draw the Probability Density Function ( Pdf ) of normal distribution then the Pdf of both sides of the mean value will be the mirror image of each other. The Pdf of the Gaussian distribution is a bell-shaped curve that is symmetric.

Let’s assume that X is a random variable and follows Gaussian distribution with some mean (Î¼) and Standard deviation (Ïƒ)

created in paint

So in the gaussian distribution, inside the bell curve the central point is our mean value, and if we just add standard deviation to the mean (Î¼ + Ïƒ) and subtract standard deviation to the meanÂ (Î¼ – Ïƒ), then the range we get is called the range of first standard deviation. similarly, if we add 2 * standard deviation to the mean (**Â **Î¼ + 2Ïƒ) and subtract 2 * standard deviation to the mean (Î¼ – 2Ïƒ) then we got the range of second standard deviation.

So according to the Empirical rule, if a random variable follows Gaussian distribution then it has also three properties, and these properties are also called the Empirical formula or 68-95-99.8 % formula, and the three properties of the Empirical formula are as follows:

So the first formula basically says that the probability of a variable that falls within the range of Î¼ – Ïƒ and Î¼ + Ïƒ is 68 %. which means 68 % of the data points belonging to the random variable X fall within the range of the first standard deviation.Â

So the second formula basically says that the probability of a variable that falls within the range of Î¼ – 2Ïƒ and Î¼ + 2Ïƒ is 95 %. which means 95% of the data points belonging to the random variable X fall within the range of the second standard deviation.

So the second formula basically says that the probability of a variable that falls within the range of Î¼ – 3Ïƒ and Î¼ + 3Ïƒ is 99.8 %. which means 99.8% of the data points belonging to the random variable X fall within the range of the third standard deviation.

So I hope you understand the idea of Empirical rule,

Thank you.

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

Become a full stack data scientist##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

Understanding Cost Function
Understanding Gradient Descent
Math Behind Gradient Descent
Assumptions of Linear Regression
Implement Linear Regression from Scratch
Train Linear Regression in Python
Implementing Linear Regression in R
Diagnosing Residual Plots in Linear Regression Models
Generalized Linear Models
Introduction to Logistic Regression
Odds Ratio
Implementing Logistic Regression from Scratch
Introduction to Scikit-learn in Python
Train Logistic Regression in python
Multiclass using Logistic Regression
How to use Multinomial and Ordinal Logistic Regression in R ?
Challenges with Linear Regression
Introduction to Regularisation
Implementing Regularisation
Ridge Regression
Lasso Regression

Introduction to Stacking
Implementing Stacking
Variants of Stacking
Implementing Variants of Stacking
Introduction to Blending
Bootstrap Sampling
Introduction to Random Sampling
Hyper-parameters of Random Forest
Implementing Random Forest
Out-of-Bag (OOB) Score in the Random Forest
IPL Team Win Prediction Project Using Machine Learning
Introduction to Boosting
Gradient Boosting Algorithm
Math behind GBM
Implementing GBM in python
Regularized Greedy Forests
Extreme Gradient Boosting
Implementing XGBM in python
Tuning Hyperparameters of XGBoost in Python
Implement XGBM in R/H2O
Adaptive Boosting
Implementing Adaptive Boosing
LightGBM
Implementing LightGBM in Python
Catboost
Implementing Catboost in Python

Introduction to Clustering
Applications of Clustering
Evaluation Metrics for Clustering
Understanding K-Means
Implementation of K-Means in Python
Implementation of K-Means in R
Choosing Right Value for K
Profiling Market Segments using K-Means Clustering
Hierarchical Clustering
Implementation of Hierarchial Clustering
DBSCAN
Defining Similarity between clusters
Build Better and Accurate Clusters with Gaussian Mixture Models

Introduction to Machine Learning Interpretability
Framework and Interpretable Models
model Agnostic Methods for Interpretability
Implementing Interpretable Model
Understanding SHAP
Out-of-Core ML
Introduction to Interpretable Machine Learning Models
Model Agnostic Methods for Interpretability
Game Theory & Shapley Values

Deploying Machine Learning Model using Streamlit
Deploying ML Models in Docker
Deploy Using Streamlit
Deploy on Heroku
Deploy Using Netlify
Introduction to Amazon Sagemaker
Setting up Amazon SageMaker
Using SageMaker Endpoint to Generate Inference
Deploy on Microsoft Azure Cloud
Introduction to Flask for Model
Deploying ML model using Flask