0:01

Well, it can be described by its mean and its variance.

Â And this is true for at least a couple of reasons.

Â One is that we did make an assumption that the underlying population is normal, and

Â so we could guess that the derived

Â 0:15

distribution of T bar minus S bar is normal as well.

Â We could also argue by the Central Limit Theorem that

Â no matter what the distribution is as long as we have enough samples,

Â it will tend to be described accurately by a normal distribution.

Â Which has these two parameters, mean and variance.

Â So what is the mean of the statistic that we're interested in?

Â Well, it's the mean of the T sample,

Â minus the mean of the S sample, so you can really write this just T bar minus S bar.

Â That one's pretty straightforward.

Â The variance of t bar minus s bar is the variance of

Â our mean t bar plus the variance of our mean s bar.

Â I'm emphasizing that.

Â That is the variance of the mean of T, not the variance of the sample itself of T.

Â If you repeat the experiment over and over again, what you'll,

Â say 10,000 times, what you'll end up with is ten thousand

Â means for the patients who were subject to the new treatment.

Â And the variance of those estimates is what this refers to.

Â So it's not the variance of the population, nor

Â is it the variance of the sample itself.

Â It's the variance of that values of the mean over many, many experiments.

Â 1:38

So why does the variance of the difference of means, bar t minus bar s equal to

Â the variance of bar T plus the variance of bar S.

Â Well, it's derived from the definition of variance,

Â but it's somewhat intuitive if you think about it.

Â There's two populations, there's two samples that we're taking, and

Â the increase in variance of the means, the more they the wider the interval in which

Â we have, the difference between those things is also going to get wider, right?

Â We could get the maximum number of green jelly beans and

Â the minimum number of red jelly beans.

Â And so the difference in means could get bigger, and bigger, and

Â bigger the more they vary, okay?

Â So whether we're adding the variable together, whether we're subtracting this,

Â you always add the variances.

Â I'll also point out there's another place where we've had to assume that these

Â are Independent samples as we did assume.

Â 2:31

Okay, so where are we?

Â Well, we're looking for the sampling distribution of bar T minus bar S, and

Â we know it's described by its mean and variance by the central limit theorem and

Â due to an assumption of normality for the underlying population.

Â And we've re-expressed the variance of this statistic that we're interested in,

Â in terms of this sum.

Â 2:50

But we can't compute this value, directly.

Â We don't know the variance of the means repeated over many experiments.

Â We don't have access to those many experiments

Â in which to compute this value.

Â So, we have to estimate it somehow.

Â Well, by the central limit theorem, we can rewrite this in terms of

Â the population variance divided by the sample size.

Â 3:16

I'll refer to the central limit theorem to see that.

Â Then we can estimate the sample, the population variance by the sample

Â variance, which I've denoted by this sigma hat, and so we can do that from both

Â values, and now we have this re-express in terms that we actually have access to.

Â We can compute the sample variance for s, and we know the size of the sample,

Â and we compute the sample variance for t and we know the size of that sample.

Â 3:40

Okay.

Â So we need sampling distribution of the difference in means.

Â We have the mean, the variance,

Â we've rexpressed in terms of quantities that we actually have access to.

Â I guess I shouldn't have the bar there anymore, it should be just the T and S.

Â 3:58

So back to our original question.

Â What is the estimated standard error?

Â Remember that was the denominator of this t-statistic that we need in order to

Â see how significant this difference is.

Â All right, remember we're counting sort of in terms of the number of standard errors

Â away from normal.

Â So, remember the estimated standard error is the same thing as the estimated

Â standard deviation of this sampling distribution that we've now described in

Â terms of a mean and variance.

Â And so we just take the square root of this side and

Â the standard deviation of bar T- bas S is the square root of this thing.

Â All right, so we're getting closer, almost there.

Â Now the t-test is the statistic we're interested in,

Â bar t minus bar s, minus the hypothesized value, which in this case is just zero, so

Â we drop it, divided by the standard error which we just derived.

Â And, do you remember the mean from a few slides back?

Â We can now also compute this value and we get this t value.

Â 4:54

If you've done this kind of process before, you might see this is as a fairly

Â low number of standard errors away from, this is a fairly low critical value,

Â which means it's probably not particularly significant.

Â But we can't judge that right away, we have to go look it up.

Â We also need the notion of degrees of freedom, and I'm not going to walk through

Â that process, but I'll show an estimate for the number of degrees in freedom for

Â this T-distribution.

Â And the t distribution, if you're not familiar with it, it basically looks

Â exactly like the Gaussian, but it's got sort of heavier tails, but

Â the crucial thing is that it depends on the sample size, so it becomes more and

Â more, closer and closer to the normal distribution as the sample size increases.

Â And it was designed to be sensitive to issues of sample size.

Â So, if we compute the degrees of freedom using this monstrosity and

Â we have our critical value, we then can choose

Â a significance level that we're interested in and use one of these and

Â the tables in the back of a statistics text book, or of course now online,

Â and the degrees of freedom is actually pretty high in this case.

Â So we're way down here and we look at this value of 2.660, and

Â we compare that to our t-statistic.

Â So we find that 2.660 is greater, so

Â we do not have evidence to reject the null hypothesis at significance level 0.05.

Â This result could have been by chance and

Â the difference between the two treatments does not seem to be significant.

Â So, my opinion of that process is that it's pretty painful.

Â And I want to show you a different way that is just as rigorous, but can be done

Â in ten lines of code just anyone who has a little bit of programming experience.

Â