 the course on dealing with materials data. We are going to continue our sessions from the previous few sessions on special random variables. Let us review what we have done in the past. We first considered the discrete random variables which have a very special distribution. The first one we considered was the uniform discrete uniform random variable. Then we considered a Bernoulli trial. I see that there is a spelling mistake in Bernoulli trial. It is should be this way. Let me just correct it. It should be Bernoulli trials. Then we found that there are three distributions which come out of repeated Bernoulli trials. The first one is a binomial distribution which has over here. So first is a binomial distribution where you carry out n independent Bernoulli trials and look for the number of successes or number of trials which has resulted in success. Then comes the geometric distribution in which you wait till the first success occurs in your trial. So you carry out number of trials till the first success is encountered. Negative binomial is a rather a generalization of geometric distribution in which you try to get the x. You want to get a probability of conducting x successive trials to get exactly n number of successes. So you have to conduct x independent Bernoulli trials until you get the nth successful trial. Then we came to Poisson distribution and we showed that Poisson distribution occurs in the case where the probability of any occurrence is very small when the sample value is very large. So when a binomial distribution has a very large n but a small probability of success in such a way that n multiplied by p that is the number of trials multiplied by the probability of success remains constant, it tends to Poisson distribution. You will see or you might have already seen in the tutorials and the R sessions that are being conducted that Poisson occurs also well during the nucleation of atoms in the physics in the field of physics. So there also the Poisson distribution is useful. We also saw then the distribution which is called hypergeometric distribution in which we have, we understand that there are m items of which n items are have a special characteristic, maybe they are defective or they are certain kind of atoms or they are certain kind of elements. So it has a special characteristic. So there are m number of total items of which n number has a special characteristic and you are drawing a sample of size x and you want to estimate a probability that exactly k of them will have those characteristics. In that case x follows hypergeometric distribution and we gave an example of 3D atom probe field ion microscopy in which most of this except for Poisson, most of the distributions are covered. Poisson as I said before it has been given separately in the R session giving you certain examples in material science and materials engineering for Poisson distribution. It is very interesting that even in that R session this the same 3D atom probe field ion microscopy example is discussed in more details. Then we moved on to continuous distribution and we introduced first continuous uniform distribution and we mentioned that it has a very special importance when it comes to generating random numbers from different distributions using pseudo random number generator and pseudo random number generator actually tries to generate the uniform distribution, the variants of uniform distribution. Then we introduced a normal distribution and we gave some distributions which I derived from the normal distribution which are chi square, which are chi square t distribution and f distribution. When we move on and we look into the inference in statistics these distributions are going to play a very significant role. So, we come to the our present session we want to cover the importance of normal distribution, the central limit theorem and steps to demonstrate central limit theorem. So, where is the importance of central limit theorem? Well many years ago when Galileo was taking observations from the out in the space and he was observing stars and constellation under the exactly same circumstances he found that the observations did not have were not exactly identical. He was actually unhappy with this fact but it took 200 years for Gauss to come and establish that such an error which can be attributed to human error or to machine error is a common factor and these errors are generally distributed as a normal distribution. We call this normal distribution also as a Gaussian distribution to give a respect to Gauss who realize this particular distribution. Now what is central limit theorem? Central limit theorem actually says that when you have large number of random variables observed independently from nearly identical distributions nearly in the sense that the parameter value may not be the same but the distributions are same then the mean of these largely observed random variable also follows no matter what is the original distribution of the random variable the mean of these observations follow normal distribution. So, here it is exactly stated let us read it. It states that if independently distributed random variables x1, x2, x3, xn with a finite mean and a finite variance for all the values of i then as n tends to infinity sum of these variables sum of these independent random variable follows a normal distribution with a mean as sum of mean and variance as sum of variances. Let us try to understand this. We are not saying that x1, x2, x3, xn follow normal distribution we are saying that it may come from any distribution only condition we are putting is that it has a finite mean and a finite variance particularly finite variance. Yes there are distributions which have infinite mean or infinite variance. So, we are ruling out all such distributions and then we are saying that if you take sum of all these independently distributed random variables xi and if the sample size become extremely large in that case this summation of the variable random variable which is also a random variable let us call it x then x follows a normal distribution. Here is what we have to realize that it follows a normal distribution with a mean mu and variance sigma square mu is a summation of all the mu i's and sigma square is summation of all the sigma i's squares. Now let us look into the proof as to generally how it goes. The central limit theorem is proved using characteristic function and Taylor series expansion. Characteristic function so far in our course we have not introduced however we have introduced what is called moment generating function. Do you recall the moment generating function of any distribution we had introduced and this is a another version sort of another version of a moment generating function and it is called characteristic function. It has the same property as moment generating function that is its first derivative with the limiting value at t is equal to 0 will give you the first moment the second derivative will give you the second moment these are all the raw moments these are not central moments. Only difference is that this particular distribution is has an imaginary part in it which is i which is a square root of minus 1. If you use this expansion for any random variable summation of any random variable and use this expected value and use the Taylor series expansion and then let n go to infinity you will find that all of them follow normal distribution. I am going to skip the proof. Proof is available in variety of textbooks you can go through it. The people who would like to pursue this kind of mathematical statistics further they should go through the proof because taking a characteristic function and using a Taylor series expansion before letting n tend to infinity is a very common technique used for proving many theorems in mathematical statistics. So, here it is repeated again that no matter what may be the original distribution of the random variable some of the independent random variables when n is large is distributed as normal random variate with mean as some of its mean and variance as some of it variance with only one assumption that underlying distribution has a finite variance. So, this also has a very specific version which is a simpler version which you might have come across in your other courses of statistics and this is it states that x1, x2, x3, xn are n independent and identically distributed random variables. Remember that that time we did not say they are identically distributed they were independent and they all had a mean mu i and variance sigma i square. Here we are saying that they are identically distributed random variable with mean mu and finite variance sigma square then as n tends to infinity the standardized normal variate of the mean of x, x bar minus mu divided by sigma square root n. Let us do some revision here as well before we say that it tends to normal distribution. Please recall that expected value of x bar is mu and the variance of x bar in such situation is sigma square by n and therefore, a standard normal variate z would be defined as x bar minus mu divided by square root of sigma sorry sigma square by n. So, this is what is written here that x bar minus mu divided by sigma divided by square root of n the probability that this variate is less than t is approximately equal to probability that a z which is normal 0 1 distributed random variable. So, z is less than t where z is normal standard normal variate. This can be easily demonstrated also by using r which will be done in your r sessions or even using excel which is what I would like to show you here that quickly without using r even by using excel and generating random numbers you can carry out the same, you can work out the sort of a demonstration proof of this particular version of central limit theorem. So, let us see how that happens. So, here I have given the step by step method to follow. So, here what I am trying to show is that I am taking x 1, x 2, x 3, x n as a chi square random variable with k degrees of freedom. Why am I taking chi square? Chi square is a skewed distribution and remember normal is a symmetric distribution. So, we want to show that we take a skewed distribution and when the central limit theorem applies how it comes very close to the normal distribution how it actually turns into a symmetric distribution. So, we want to show that if x 1, x 2, x n follow chi square distribution with k degrees of freedom then the probability of the standardized variable for x bar that is x bar minus mu divided by sigma over square root n is less than t, t is same as probability of z is less than or equal to t as n tends to infinity where z is a standard normal variate. So, to demonstrate for timing we will take n to be 500 and k degrees of freedom of chi square to be 5 and then we take the following steps. We first generate uniform random variables using random function 500 of them. Then we copy the value and value paste it here because with every operation on the excel sheet these number tend to change, these number tend to change if you do not continue with these function, these values tend to change. So, we will copy and value paste it then we apply the chi square inverse function. You please recall what we did, what we said about generating a random variate, random variate distributed by any distribution. So, if you recall we said that if x is distributed as any random variable any random variable then f of x is distributed as uniform 0 1 random variate. So, if you call this y then you can generate x by saying that it is f inverse of y. So, if you have y you can find x and this is exactly what we are doing. Here we have generated sort of y's u 1, u 2, u 3, u 500 then we apply chi square inverse function. So, our f is actually chi square function. So, f inverse is chi square inverse function and therefore I am applying chi square inverse function with a probability this is now a probability remember it is coming from uniform random variable uniform 0 to 1. So, this is probability and this is the what we have taken as degrees of freedom of chi square distribution and we generate chi square phi random variables xi. So, this if I had said that this is xi chi square phi then I am generating x 1, x 2, x 3, x 500 for x 5. Now, I calculate x bar and I also calculate z is equal to x bar minus 5. Remember that expected value of x in this case will be k which is 5 and the variance of x is equal to 2 k which is 10 when x sorry x is distributed as chi square phi. So, when that happens this is the your expected value which is mu and this is sigma square. So, I am taking exactly this ratio I am carrying it out here. So, if this is a this is what I am calculating here repeat the steps 1 to 500 times. So, this 500 data point is n this we are doing 100 times. So, that we can have a nice histogram for to generate z 1, z 2, z 3, z 100 and then plot the histogram and let us see how does it look like. So, you see here I have shown 1, 2 and 3 sample histograms out of 100 we generated 100 histograms actually 100 histograms of chi square phi. So, I have taken the sample of 1, 2 and 3 and you can see that how skewed they look you see the distributions are all skewed. Please note that distribution is heavily skewed I have not drawn it beautifully let me correct it myself. So, that it looks better let us do it again this is better. So, this is a typically skewed chi square distribution same is true here, but when you take the z variable which is summation sorry which is summation or which is x bar minus mu over square root sigma square n then this z variable this is a plot of a z 1, 2, z 100 and this distribution is looks very much of a normal distribution. You see how the skewness has slowly here also I have not drawn it well let me do that. So, if you draw it bit carefully. So, this skewed distribution this skewed distribution as well as this skewed distribution are turning into a normal distribution which is not skewed. You can carry out this exercise further when you learn different graphical ways of testing the two distributions are same. So, you can plot this particular graph which is what is known as a PP plot or a QQ plot. I believe you might have already been introduced to this in your R sessions during descriptive statistics if you have then you can generate this data and plot it like one of those QQ or PP plots and you will see how close it is to normal. So, let us summarize. We started this session by saying that why normal distribution plays a very central and important role because it we encounter it very commonly under many circumstances. It was first discovered to explain the error in observations in the experiments performed under identical condition and we still observe that. The central limit theorem for a large sample made it almost all pervading distribution because as far as the underlying distribution had a finite variance and you had a large number of observations coming from the underlying distribution which are identical in nature, independent in nature. In that case if you take either the mean value or the summation of it, it tends to follow standard normal variate with a common mean, the mean as a summation of mean and standard deviation as a summation of standard deviation. The question is how large should be an n because when we think about it practically, mathematically it is wonderful to say n tends to infinity and you show the or you prove the theorem. But in reality the question comes what is really a large n? Well, the answer is that for generally the naturally less skewed distributions if n is 30 or more it is considered large enough. But if your distribution is heavily skewed in that case convergence to distribution could be slow and you may need very large number of samples. So, that time 30 may not be a good large enough, it may go even further to something like 50, 75, 100 you have to find out how fast it converges. So, with this we complete this session on normal distribution and next we want to take all those distributions which we encounter most commonly in the engineering data and in particular for materials engineering and material science metallurgical data. So, with this we end this session. Thank you.