The normal distribution is the most important probability distribution in statistics because it fits many natural phenomena.

In this article we will cover some distributions that I have found useful while analysing data. I have split them based on whether they are for a continuous or a discrete random variable. First I give a small theoretical introduction about the distribution, its probability density function, and then how to use python to represent it graphically.

Continuous Distributions:

- Uniform distribution
- Normal Distribution, also known as Gaussian distribution
- Standard Normal Distribution — case of normal distribution where loc or mean = 0 and scale or sd = 1
- Gamma distribution — exponential, chi-squared, erlang distributions are special cases of the gamma distribution
- Erlang distribution — special form of Gamma distribution when a is an integer ?
- Exponential distribution — special form of Gamma distribution with a=1
- Lognormal — not covered
- Chi-Squared — not covered
- Weibull — not covered
- t Distribution — not covered
- F Distribution — not covered

Discrete Distributions:

- Poisson distribution is a limiting case of a binomial distribution under the following conditions: n tends to infinity, p tends to zero and np is finite
- Binomial Distribution
- Negative Binomial — not covered
- Bernoulli Distribution is a special case of the binomial distribution where a single trial is conducted n=1
- Geometric — not covered

Lets import some basic libraries that we will be using:

`import numpy `**as** np

import pandas **as** pd

import scipy.stats **as** spss

import plotly.express **as** px

import seaborn **as** sns

1.Write Your First AI Project in 15 Minutes

2. Generating neural speech synthesis voice acting using xVASynth

3. Top 5 Artificial Intelligence (AI) Trends for 2021

4. Why You’re Using Spotify Wrong

## Uniform distribution

As the name suggests, in uniform distribution the probability of all outcomes is same. The shape of this distribution is a rectange. Now, lets plot this using python. First we will generate an array of random variables using scipy. We will specifically use scipy.stats.uniform.rvs function with following three inputs:

- size specifies number of random variates
- loc corresponds to mean
- scale corresponds to standard deviation

`rv_array = spss.uniform.rvs(size=10000, loc = 10, scale=20)`

Now we can plot this using the plotly library or the seaborn library. Infact seaborn has a couple of different function, namely the distplot and the histplot, both of which can be used to visually view the unoform data. Lets see the examples one by one: