00:01
So we're looking at some data here, which is a list of the number of hours between breakdowns for four different machines.
00:09
Machine one, machine two, machine three, and machine four.
00:12
And these are the hours between breakdowns.
00:15
So 6 .5 hours between breakdowns.
00:17
Breakdown times 8 .1 hours between breakdowns, and so on and so forth.
00:22
And what we're going to do is test for any difference in the mean number of hours between them.
00:27
So our null hypothesis will be that the mean of one is equal to the mean of two is equal to three is equal to the mean of four.
00:36
And then the alternative hypothesis is that the mean, the means are not all equal, because the null hypothesis says they're all equal.
00:43
The alternative is that they're not all equal.
00:48
The means are not.
00:57
And i know it's tempting, because i did this too when i was a young lad learning this stuff for the first time.
01:04
It was tempting for me to just go like this for the alternative.
01:07
But we can't, because this means they're all different.
01:10
When we say the means are not all equal, it means some of them could be equal, right? you could have that one is equal to two is equal to three, but that one's not equal to four.
01:18
So these three could be equal, but four would be the odd one out.
01:22
Or maybe it's one and two aren't equal, but the others are.
01:24
So some combination of equality and inequality.
01:27
So that's why we just say we have to write out the means are not.
01:31
And we're going to test this hypothesis, set of the alpha of 0 .05 level of significance.
01:38
And we're going to get an f statistic, because we're going to run an anova on this, a one -way anova.
01:47
And we're going to f statistic.
01:49
And the f statistic will give us a p -value.
01:51
And if the p -value falls below this alpha, we're going to reject it.
01:56
So let's go ahead and do that.
01:56
And i've done it in r.
01:58
It just makes working with statistics really nice and easy.
02:02
So here's the breakdown times listed as one vector.
02:04
So if you can imagine, it's like a list of all 24 times, all 24 hours, because there's six times per machine.
02:14
So we're told 24.
02:15
And this is just a list of all 24.
02:17
So breakdowns, c parentheses.
02:19
So let me show you what it looks like.
02:23
Breakdowns, all it is, it's just the list of those things.
02:25
And i've ordered it so that machine one is here, machine two is here, and three is here, and four is here.
02:32
And we need to do that because we're going to coordinate each of these values.
02:36
So for example, since we're in four, 9 .6 needs to be connected with machine four.
02:42
Same thing with 12 .4, it needs to be machine four.
02:44
And so this other vector, machines, c parentheses, and then rep means repeat this thing six times because we're going to coordinate 6 .5 with m1, machine one.
02:56
And we're going to do this six times.
02:58
So let me show what that looks like.
03:01
Oops.
03:02
Do machines.
03:08
So it's m1 six times, right? like i said, and then one, two, three, four, five, six, and then m2 six times, one, two, three, four, five, six, and then for three and four and so forth.
03:17
And what that does, it creates, it's a vector that is coordinating this list, this vector with the machines.
03:24
And then we're going to make a model and we're going to use this aov function.
03:29
And what we're going to do is we're going to see do breakdowns, breakdowns depend on the variable machines.
03:37
So that's how that works.
03:38
You set that up and then you get your model.
03:42
Here's the summary.
03:43
And then you'll see a table like this, and you'll oftentimes see it written, i'm going to paste this here.
03:52
So this is what we're given.
03:54
But when in minova, oftentimes, you see it like this.
03:58
You'll see your source, you see your degrees of freedom, your sum of squares, your mean square, your f and then your p value, right? and so the source, you have the between groups and your within groups.
04:22
This is also called the error.
04:28
And then your degrees of freedom.
04:29
So you see it as three, which is k minus one, right? k minus four groups.
04:35
That's why k four minus one is three.
04:37
The within is, and then you have your total, i forgot that.
04:40
And then your within is 20.
04:42
And you get that by doing n, big n minus k.
04:46
So 24 total minus four, you get 20.
04:50
And then the total degrees of freedom is going to be 23, because it's calculated as n, big n minus one, the sample size 24 minus one is 23.
04:59
And your sum of squares, this is where that you're, this is the big thing.
05:02
You're letting the computer do all the work for us.
05:04
And so we get the sum of squares to be 40, 40 .43 and 20 .93.
05:13
And then this total sum of squares is where you add these together.
05:16
So 61 .36, add those together.
05:22
Same thing with three and 20, make 23...