1. Äú”ÄÎ»ÖĂ > ÊŚÒł > ÉÌÒ”ÖÇÄÜ > Statistics 101: Introduction to the Central Limit Theorem (with implementation i ...

Statistics 101: Introduction to the Central Limit Theorem (with implementation i ...

ÀŽÔŽŁș·ÖÎöŽóÊŠ | 2019-05-03 | ·ąČŒŁșŸ­čÜÖźŒÒ

What is one of the most important and core concepts of statistics that enables us to do predictive modeling, and yet it often confuses aspiring data scientists? Yes, IĄŻm talking about the central limit theorem.It is a powerful statistical concept that every data scientist MUST know. Now, why is that?Well, the central limit theorem (CLT) is at the heart of hypothesis testing šC a critical component of the data science lifecycle.ThatĄŻs right, the idea that lets us explore the vast possibilities of the data we are given springs from CLT. ItĄŻs actually a simple notion to understand, yet most data scientists flounder at this question during interviews. We will understand the concept of Central Limit Theorem (CLT) in this article. WeĄŻll see why itĄŻs important, where itĄŻs used and then learn how to apply it in R.I recommend going through the below article if you need a quick refresher on distribution and its various types: LetĄŻs understand the central limit theorem with the help of an example. This will help you intuitively grasp how CLT works underneath.Consider that there are 15 sections in the science department of a university and each section hosts around 100 students. Our task is to calculate the average weight of students in the science department. Sounds simple, right?The approach I get from aspiring data scientists is to simply calculate the average:But what if the size of the data is humongous? Does this approach make sense? Not really šC measuring the weight of all the students will be a very tiresome and long process. So, what can we do instead? LetĄŻs look at an alternate approach. Source: http://www.123rf.comThis, in a nutshell, is what the central limit theorem is all about. If you take your learning through videos, check out the below introduction to the central limit theorem. This is part of the comprehensive statistics module in the ĄźIntroduction to Data ScienceĄŻ course:LetĄŻs put a formal definition to CLT:Given a dataset with unknown distribution (it could be uniform, binomial or completely random), the sample means will approximate the normal distribution.These samples should be sufficient in size. The distribution of sample means, calculated from repeated sampling, will tend to normality as the size of your samples gets larger. Source: corporatefinanceinstitute.comThe central limit theorem has a wide variety of applications in many fields. Let us look at them in the next section.The central limit theorem has both statistical significance as well as practical applications. IsnĄŻt that the sweet spot we aim for when weĄŻre learning a new concept?WeĄŻll look at both aspects to gauge where we can use them.Source: http://srjcstaff.santarosa.edu Source: projects.fivethirtyeight.comThe central limit theorem has many applications in different fields. Can you think of more examples? Let me know in the comments section below the article šC I will include them here.Before we dive into the implementation of the central limit theorem, itĄŻs important to understand the assumptions behind this technique:In general, a sample size of 30 is considered sufficient when the population is symmetric.The mean of the sample means is denoted as: X = where,And, the standard deviation of the sample mean is denoted as: X = /sqrt(n)where,And thatĄŻs it for the concept behind central limit theorem. Time to fire up RStudio and dig into CLTĄŻs implementation!Excited to see how we can code the central limit theorem in R? LetĄŻs dig in then.A pipe manufacturing organization produces different kinds of pipes. We are given the monthly data of the wall thickness of certain types of pipes. You can download the data here.The organization wants to analyze the data by performing hypothesis testing and constructing confidence intervals to implement some strategies in the future.The challenge is that the distribution of the data is not normal.Note: This analysis works on a few assumptions and one of them is that the data should be normally distributed.The central limit theorem will help us get around the problem of this data where the population is not normal. Therefore, we will simulate the central limit theorem on the given dataset in R step-by-step. So, lets get started.First, import the CSV file in R and then validate the data for correctness:Output:Next,calculate the population mean and plot all the observations of the data:Output:
±ŸÎÄÒŃŸ­čęÓĆ»ŻÏÔÊŸŁŹČéżŽÔ­ÎÄÇë”ă»śÒÔÏÂÁŽœÓŁș
ČéżŽÔ­ÎÄŁșhttps://www.analyticsvidhya.com/blog/2019/05/statistics-101-introduction-central-limit-theorem/