**These are draft notes extracted from subtitles. Feel free to improve them. Contributions are most welcome. Thank you!**

Contents

- 1 19A. Central Limit Theorem
- 1.1 01 Introduction
- 1.2 02 Counting Outcomes 1
- 1.3 03 Counting Outcomes 1 Solution
- 1.4 04 Counting Outcomes 2
- 1.5 05 Counting Outcomes 2 Solution
- 1.6 06 Counting Outcomes 3
- 1.7 07 Counting Outcomes 3 Solution
- 1.8 08 Counting Outcomes 4
- 1.9 09 Counting Outcomes 4 Solution
- 1.10 10 Shape
- 1.11 11 Shape Solution
- 1.12 12 Number of Outcomes
- 1.13 13 Number of Outcomes
- 1.14 14 Counting Outcomes 5
- 1.15 15 Counting Outcomes 5
- 1.16 16 Counting Outcomes 6
- 1.17 17 Counting Outcomes 7
- 1.18 18 Counting Outcomes 7
- 1.19 19 Counting Outcomes 8
- 1.20 20 Counting Outcomes 8
- 1.21 21 Conclusion

So today, you’re in for a treat. You’re goingto learn a theorem and I won't prove anythingto you, you learn it by doing but this theoremis really important for all of statistics. So let’s dive in.And what this theorem really is about many coinflips. Almost generally it’s about thedistribution of the sum of many things.So let’s study many things.

So let’s look at a coin. It has outcome 0-1 andwe’ve already learned that the probabilityof the sum equals exactly K for N coin flips;; looks like this cryptic formula over here:N factorial divided by N minus K factorial andK factorial. And then we had some other term here,if the coin is fair, it is like 2 to the minusN. Right now, I’m just going to care about thesecoins over here. I won't care about the probabilityfor the time being. I want you to help meconstruct a table for these counts as N gets larger.So we start with N equals 1, go all the way to Nequals 4, obviously outcomes range from zeroall the way to 4 at 4 coin flips. So here’s ourtable. It’s also quite obvious that these guysover here can never occur: if you flip the coinonly once, the outcome can’t be 2. So we’re goingto fill out this table over here together for thecoin over here. Tell me, for N equals 1, what arethe two values that go right over here,just those two values.

And the answer is 1 and 1,N factorial over N minus K factorial,K factorial - they are all ones,just 1, 1, 1. That was easy.

Let’s go to equal 2 and ask for the sum,what are these coefficients for an equal 2?

And the answer is 1, 211. Let’s plug-in zero.2 factorial is 2 divided by 2 factorial givesus 1 and zero factorial is 1. So that’s 1 overhere. But if you plug-in 1SK we get 2 factorialover here which is 2 divided by and another1 stays 2. So this is the correct answer.

Let’s go N equals 3. Now, it gets interesting.

The correct answer for this formula is 1, 3, 3, 1and you plug them in, you can see it’s correct.This is actually called a Pascal Triangle. If youhave never seen this before, you can check it onWikipedia. It’s actually quite easily calculated.

Each element over here is the sum of the valueabove plus the value on the left. This guy overhere, sum of the value above, be zero plus valueon the left. So let’s fill in the same for N equals 4.

The answer is 1, 4, 6, 4, 1. I used the Pascaltrick but when you plug it in, you get exactlythe same number over here.

So let’s look at these distributions over here.They are really interesting. In the first case,you get something like this: just the counts . In thesecond case, it looks more like this. In thethird case and in the fourth case, we getsomething that looks really interesting, likethis form over here. So here is a questionfor you. What happens when N equals10,000? When I draw it like a diagram likethis, will it look like that, like that, like that?Check the one that looks most plausible.

And it so turns out it looks like this over here.You can see it over here. It looks pretty muchlike a function that’s very high in the centerand flattens out to the sides. So how doesthis relate to anything of interest?

So let’s look at a more complicated case. Say wehave a three-sided die and it can come up withthe outcomes 0, 1 or 2. And again I just wantto count, I don’t want to work in probabilitiesjust like before, I’m going to help you a little bit.First, I’d like to know what’s the possiblelargest sum, the largest number I put over herefor anything that’s four tosses if eachoutcome can be between 0, 1 and 2. Just writein the box over here.

And if that outcome is eight, if I toss itfour times, the largest value is two everysingle time. Two times four is eight.

So, let’s now go all the way to eight and computethose numbers, and it just the counts, not theprobabilities. Give me the first threenumbers right over here.

When we throw this die exactly once,what do you get is one, one and one.

Now the tricky part starts at n equals two andI will construct this for you, you can take overfor three and four. For the one of the leftto have the sum equal to one, we stay at one,which is we add up the value above and the twoon the left because there’s no three outcomes.This guy over here is two, it’s the one aboveand the two in the left, there’s nothing overhere but there is something over here.This guy here is three, it’s a sum over the oneabove and the two on the left gives us three.We go down to two, which is a one above zeroand the two on the left, all the way back to one.And this already looks very much like thetype distribution we talked about like this.

Now, it’s your turn. Give me all those valuesover here. There’s six of them and just to helpyou a little I give you one of them. This overhere is a six. Please fill them in.

And we would do just like before, we take thevalue from above, plus the two left ones. So one,two plus one is three, three plus two plus one issix, two, three and two with seven, six, threeand one.

So now for the final question, there’s nine totalvalues to be filled in, I give you two of them,four over here and there is a sixteen over here,so please fill in the seven remaining values.

And as before we take the one above plus thetwo left, one here, these two are four, six, three,one is ten, six, seven, three is sixteen, six,seven, six is nineteen, sixteen, back to ten,four and one.

And when we graph this, it looks about likethis. It’s a big function that has the highestvalue at the center, nineteen and then fallsdown in some interesting way that looks awfullymuch like the way the previous exercise fell down.So even for this different experiment withthe die, we get about the same phenomenon thatthe sum of those seems to have a distinct highprobability for what’s the most likely outcomefour and then it falls off in some interesting way.So this is effectively what’s called the centrallimit theorem. And this sounds complicated andin fact it is, but here is the simple versionto remember. Suppose you’re doing manyexperiments. Each of these experiments overhere have some distribution, we don’t care,it has to just be reasonable and you sum thoseall up for some very large number and if N islarge then the joint distribution of the sum ofthose with approach a function it looks like this.That’s called a Gaussian. We discuss theGaussian in depth. It has its own formula andtypically if N is as big as thirty that is maybeyour test thirty people whether they havecancer or not, that’s usually good enough toapproximate this really complicated binomialover here with this relatively simple Gaussianfunction. We’ll learn more about this later,but the key thing to remember is we take manyexperiments, you add them up and outcomes afunction just like this. That’s called thecentral limit theorem.