Skip to main content

Posts

Showing posts from 2023

Standard Normal Distribution with examples using Python

Standard Normal Distribution with examples using Python

Standard Normal Distribution with examples In our previous post, we talked about Normal Distribution and its properties . In this post, we extend those ideas and discuss about Standard Normal Distribution in detail. What is a Standard Normal Distribution? A Normal Distribution with mean 0 and standard deviation 1 is called a Standard Normal Distribution . Mathematicallty, it is given as below. Fig 1:Standard Normal Probability Distribution Function For comparison, have a look at the Normal Probability Distribution Function. If you substitute mean as 0 ,standard deviation as 1, you derive the standard normal probability distribution function Fig 2: Normal Probability Distribution Function Need for a standard normal probability distribution function We need to extract probability information about events that we are interested in. For this, first we need to convert any normal random variable

Understanding Normal Distribution and its Properties using Python

Understanding Normal Distribution and its Properties using Python A Normal or Gaussian distribution is used to represent continuous random variables. BMI of people, height of people amongst other phenomena tend to follow a Normal distribution. It is generally used to describe a lot of natural phenomena around us. A normal distribution generally follows a bell curve. Let's see this in action. A normal distribution is defined by 2 parameters viz. Mean and Standard Deviation . This is how you can define this distribution using the Stats functionality from Scipy . import numpy as np from matplotlib import pyplot as plt from scipy.stats import norm import scipy x= np.linspace(0,700,1000000)##Create evenly spaced numbers from 0 to 400 r1 = norm.rvs(loc=350,scale=50,size=1000000) ###Create samples with mean=350 and stdev=50 Notice the rvs attribute of norm . We will talk about it in a while. Let's see how the plot for this distribution look

Continuous Uniform Probability Distribution with Python

Continuous Uniform Probability Distribution In an earlier post , we had discussed about Random Variables and what is a continuous random variable. An extension of those ideas comes in the form of a distribution called a Continuous Uniform Probability Distribution . In a continuous probability distribution, we are not interested in exact events. As an example of this, we would not be so bothered to know the chances of a duration of flight to be exactly 180 minutes or 177 minutes. We would be more keen in knowing the chances of a flight duration being between 150 minutes to 185 minutes. Time intervals are more important to extract probability information in this case. The simplest form of continuous probability distribution function is a unform probability distribution function. It is also called a rectangular distribution function due to its inherent rectangular shape. Let's assume that the flight duration from Bangalore to Delhi roughly takes

Difference between Discrete and Continuous Random variables

Difference between Discrete and Continuous Random variables What is a Random Variable? Let's say you want to observe the number of goals scored in any football match in the English Premier League season. You record the number of goals scored in each match in a set S--> (3,1,4,0,6,8,...2). We just conducted a series of random experiments of observing goals in each match. Every random experiment had a numerical outcome which we call as a random variable . In our case, it was the number of goals in each match (3,1,4,...2). The reason we call this as random is because we do not know until the end of the match about the number of goals which would be scored. What is a Discrete Random Variable? In our example of observing number of goals scored , we saw the set S--> (3,1,4,0,6,8,...2). A match can end in a draw (0 goals), or the number of goals could be 1 or 2 or n goals. The n goals will be finite and sensible. In some sense, we can cou