<p align="justify">
A <b>normal distribution</b>, sometimes called the bell curve, is a distribution that occurs naturally in many situations. For example, the bell curve is seen in tests like the SAT and GRE. The bulk of students will score the average (C), while smaller numbers of students will score a B or D. An even smaller percentage of students score an F or an A. This creates a distribution that resembles a bell (hence the nickname). The bell curve is symmetrical. Half of the data will fall to the left of the mean; half will fall to the right.
Many groups follow this type of pattern. That’s why it’s widely used in business, statistics and in government bodies like the FDA:
</p>
<ul>
<li>Heights of people.</li>
<li>Measurement errors.</li>
<li>Blood pressure.</li>
<li>Points on a test.</li>
<li>IQ scores.</li>
<li>Salaries.</li>
</ul>

The standard deviation controls the spread of the distribution. 
A smaller standard deviation indicates that the data is tightly clustered around the mean; the normal distribution will be taller. A larger standard deviation indicates that the data is spread out around the mean; the normal distribution will be flatter and wider.

<b>Properties of a normal distribution</b>
<ol>
<li>The mean, mode and median are all equal.</li>
<li>The curve is symmetric at the center (i.e. around the mean, μ).</li>
<li>Exactly half of the values are to the left of center and exactly half the values are to the right.</li>
<li>The total area under the curve is 1.</li>
</ol>

The <b>Gaussian distribution</b> is a continuous family of curves, all shaped like a bell. In other words, there are endless possibilities for the number of possible distributions, given the limitless possibilities for standard deviation measurements (which could be from 0 to infinity). The <b>standard Gaussian distribution </b> has a mean of 0 and a standard deviation of 1. The larger the standard deviation, the flatter the curve. The smaller the standard deviation, the higher the peak of the curve.

A Gaussian distribution function can be used to describe physical events if the number of events is very large (Central Limit Theorem(CLT)). In simple terms, the CLT says that while you may not be able to predict what one item will do, if you have a whole ton of items, you can predict what they will do as a whole. For example, if you have a jar of gas at a constant temperature, the Gaussian distribution will enable you to figure out the probability that one particle will move at a certain velocity.

The Probability Distribution Function (PDF) of Normal or Gaussian or Bell Shaped Distribution is given by:

\begin{equation}
P(X=k) = \frac{1}{\sqrt{2\pi}\sigma} \mathrm{e}^{\frac{-(k-\mu)^2}{2\sigma^2}}\
\end{equation}

Also called Normal PDF


```python
import scipy.stats as S
import numpy as np
import seaborn as sns
```

We are going to withdraw some numbers from Normal Distribution having mean = 65 and standard deviation, sigma = 10

The concept of probability being limiting case of relative frequency can be demonstrated here also. Let's first calculate the true probability (theoretical value) of probability of Random Variable, X taking value k=45 calculated from the Normal PDF given mean = 60 and sigma = 10. So, the theoretical value of probability of Random Variable, X taking value k=45 is given by:

\begin{equation}
P(X=45) = \frac{1}{\sqrt{2\pi} 10} \mathrm{e}^{\frac{-(45-60)^2}{2*10^2}}\ = 0.0129
\end{equation}

Which means that the frequency of value 45 is 1.29 % of the size of population. 

Let's calculate the value of probability of value 60. 

\begin{equation}
P(X=60) = \frac{1}{\sqrt{2\pi} 10} = 0.0399
\end{equation}

Which means that the frequency of value 60 is 3.99 % of the size of population. 

Let's generate a sample size of 100 observations. 


```python
sigma = 10
mean = 60
sample = np.random.normal(loc=mean,scale=sigma,size=100)
```


```python
sample.shape
```




    (100,)




```python
sns.distplot(sample,bins='rice',kde=True)
```

Let's generate a sample size of 1000 observations. 


```python
sample = np.random.normal(loc=mean,scale=sigma,size=1000)
```


```python
sns.distplot(sample,bins='rice',kde=True)
```

Now, let's generate a sample size of 10000 observations. 


```python
sample = np.random.normal(loc=mean,scale=sigma,size=10000)
```


```python
sns.distplot(sample,bins='rice',kde=True)
```

Now, for one more last time, let's generate a sample size of 100000 observations.


```python
sample = np.random.normal(loc=mean,scale=sigma,size=100000)
```


```python
sns.distplot(sample,bins='rice',kde=True)
```

All of the plots which we can see above are frequency distributions. In the first plot of frequency distribution, the bulge is coming is coming nearby 60, approximately 55. 

In the second frequency distribution where sample size is increased with respect to the previous case i.e. 1000, the distribution is approaching towards the Normal Distribution with the mean of 60. Although, the bulge is still at the value of 55, approximately but this time it's more refined in shape. 

In the third frequency distribution where the sample size is further increased i.e. 10000, the distribution is approaching more closely towards actual normal probability distribution with the mean=60 and sigma=10, getting finer. 

Finally, if we look at the last plotted frequency distribution with the sample size of 100000, we see that it's not that much different from the previous plotted frequency distribution and so, we can say that the frequency of each of the observation is stablizing and stopped changing much and hence approaching towards probability but how ????

We know that the relative frequency of Random Variable value, X=60 is:

According to First Frequency Distribution, it's approximately 13/100 = 0.13. 

According to Second Frequency Distribution, It's approximately 260/1000 = 0.26. 

According to Third Frequency Distribution, it's approximately 3250/10000 = 0.3250. 

According to Fourth Frequency Distribution, it's approximately 35000/100000 = 0.35.

86ccf7f010fa41e5ab9c5db75eee6b69e1d48eb1
ipynb
Jupyter Notebook
4. Normal or Gaussian Distribution.ipynb
rarpit1994/Probability-and-Statistics
1ae8b7428ec9a3072fce3089d7951b9f7bd06c26
Apache-2.0
2019-03-24T10:29:56.000Z
2019-03-24T10:29:56.000Z
4. Normal or Gaussian Distribution.ipynb
rarpit1994/Probability-and-Statistics
1ae8b7428ec9a3072fce3089d7951b9f7bd06c26
Apache-2.0
4. Normal or Gaussian Distribution.ipynb
rarpit1994/Probability-and-Statistics
1ae8b7428ec9a3072fce3089d7951b9f7bd06c26
Apache-2.0
Qwen/Qwen-72B
1. YES
2. YES