0:00
Hi everyone.
00:01
Today i'm going to do a really wide review of the basics of hypothesis testing, where it comes from and why we have to do the methods that we use.
00:12
So to start with, i want to talk about the normal distribution.
00:15
So you're probably thinking of a curve that looks a little bit like this.
00:18
This is called the bell curve.
00:20
It's beautiful.
00:21
It's nice.
00:22
It makes sense.
00:23
And this is what we think of when we think about the normal distribution.
00:26
And that's entirely right.
00:27
This is the standardized normal curve.
00:30
This we would describe as being the normal curve where we have a mean at zero and a standard deviation of one, right? nice curve.
00:42
Now, the difficulty is that there's actually a lot of normal distributions that look, you know, kind of weird and they have different heights and different means.
00:52
And so it's hard to, it's difficult to imagine this sometimes.
00:57
And it takes a little while to get your head around.
00:59
But every, question that you do will have a different looking curve because of the standard deviation and the mean, right? if you had a big old number line, you would have where some means are like three and some means of five hundred and seven all the way over here.
01:17
There's so many different ones.
01:19
And so in order to make that compact and readable and usable, we do a thing called standardising.
01:25
And that's where the formula at fours, that star comes from.
01:28
This one wide here.
01:31
So this is doing something called standardising.
01:36
And what that essentially does is it says, okay, so in this situation to do with airlines or stocks or something, we have a population which has this mean and this standard deviation.
01:50
And we took a sample and we got this sample mean and we used this many data points.
01:57
And what this essentially does is it converts that, that sample and says, okay, what if we did a sample under this distribution, under the 0 -1 distribution, and we got those same results? you know, we got this value.
02:16
You know, it's not saying, okay, well, the mean here was 200 and we got 190.
02:22
So what would happen if we got 190 on this curve, it's not that.
02:27
It's saying, okay, well, what value would we have got such that the probability of getting 190 when the mean is 200 is the same as getting, say, you know, seven when the mean is zero, for example.
02:42
And so we get this value z -star using that formula, which we've standardized with.
02:50
And so what z -star is representing is the test statistic.
02:56
Right? and so what we're really interested in is the probability that we've got that test statistic.
03:02
So we take that z start as the most extreme point and we say, okay, so here's the deal.
03:10
We've got this, we've got this curve, we standardized it.
03:14
In this situation, how rare is it that we would have got this result? if we think the mean is zero, how rare is it that we would have got minus three, right? how, and is that rare enough for us to be worried or for us to think that something has changed? and so we take the most extreme point, which is this z star value, and we say, well, what's the probability that we had a value that was less than or equal to that extreme point? and we say that because we can't really do single probabilities.
03:50
We can't say what's probability that it's equal to z star.
03:54
We don't do that in continuous distribution.
03:55
This.
03:57
And so we say, okay, well, what's the probability it was less than or equal to that? you know, what's the property it did this or it did something even wilder, you know, that we got minus 70.
04:07
And so that is what we call our p value.
04:14
And the p value is massively useful and you'll calculate loads of them while doing stats, right? now, the other important thing is alpha or our significance level.
04:30
Now, what alpha tells us is how rare do we need something to be in order for it to concern us? so if we're, an example that might be kind of easier to picture is say a casino, right? the probability of someone winning a game might be like 0 .5, let's say, right? i'll say it's not point five just for this example because i don't anything about casinos really.
05:05
And then you have someone come in and they play a bunch of games and their probability is 0 .7, right? so it's normally here and then suddenly it's here.
05:17
Now, this wouldn't actually be on this curve...