00:01
We're looking at the results of a study where there were 21 children with adhd that were placed into one of three groups, a placebo group, a 10 milligram ritalin group, and a 17 .5 milligram ritalin group.
00:14
And they were given instructions to accomplish a task and were given a score corresponding to how well they followed instructions.
00:19
And a higher score means they followed the directions better.
00:24
And we're going to use an anova to test if there's a difference between the means.
00:31
So we have these three groups.
00:32
Is the mean score between three groups the same? so the null hypothesis would be that the mean of, we'll call the placebo group one, this 10 milligram group two, and then this 17 .5 milligram, that'll be group three.
00:47
So is the mean of group one equal to the mean of group three? the mu one equal to mu two equal to mu three.
00:55
All the means are the same.
00:56
Against the alternative, the means are not all equal.
00:59
And you can't just toss the inequality sign on those between the means.
01:05
Because one could be equal to two, or one could be equal to three, but not equal to two.
01:10
So you can't just toss the inequality symbol.
01:12
You have to write out the means are not all equal.
01:16
All right.
01:16
So like i said, this is going to be an anova.
01:20
And we're going to look at the probability of seeing this result that we observed given the null hypothesis is true.
01:29
And that's essentially what we're doing.
01:30
We're getting a p -value from the f -statistic, which the f -statistic comes from the ratio of the mean square of the between groups divided by the mean square of the within groups.
01:43
So we need the mean squares.
01:44
The mean squares are found by taking the sum of squares divided by the corresponding degrees of freedom of the group.
01:51
And then, so this is where the work comes in, the sum of squares and the degrees of freedom.
01:56
So let's go ahead and start this out.
01:59
So the degrees of freedom, this is where it's a little more straightforward.
02:03
It's a little easier to start with.
02:05
The between group degrees of freedom is k minus one, where k is the number of groups.
02:10
So there's three groups.
02:11
Three minus one is two.
02:13
The total degrees of freedom is given as n minus one.
02:19
And there's 21 total children in the study with adhd.
02:24
So 21 minus one is 20.
02:28
And then the within degrees of freedom is n minus k.
02:32
So if n is 20, or excuse me, 21, and then k is three, 21 minus three is 18.
02:44
And notice the two plus 18 is 20.
02:46
That's not a coincidence.
02:47
And that's actually the relationship between the sum of squares as well.
02:51
So the sum of squares of the total is equal to the sum of squares of the between plus the sum of squares of the within.
03:05
And that's, penn was just giving me a little issue here.
03:10
All right.
03:11
So if we find the total and the between, we can get the within by just taking the difference.
03:15
And we're actually going to do just that.
03:16
We're going to find the total and the between.
03:18
So let's do the total first.
03:20
The sum of squares of the total is equal to the sum of each x value in our study, which is all 21 values here.
03:31
And we're going to subtract the grand mean, x bar sub g, and square it.
03:39
So we're going to go ahead and get that.
03:43
We need to get our means.
03:44
And the between sum of squares, we'll do that second.
03:47
But i'm just going to show the general formula, is the sum of each group's mean.
03:54
I'm going to do x bar sub k to denote that it's each group's mean minus the grand mean squared.
04:03
And then we're going to take that difference and multiply it by the sample size of the group.
04:07
And so, okay.
04:12
All right.
04:12
So let's go ahead and do this.
04:15
So here is what we need for the sum of squares, total sum of squares.
04:29
So right here, this is each x value, 47, 20, 34, et cetera, minus the mean.
04:37
And the mean, the grand mean is this, 59 .7.
04:39
And what i did here for the means of each group, i just used the average function in the spreadsheet.
04:45
Do this, you put in your data, and then out will pop the average.
04:55
You could also just add them all up and divide by how many there are...