00:01
Here you have some data which are the number, is a random sample of 100 bicycle accidents.
00:07
And this is the number of accidents that occurred on a given day of the week, sunday, monday through saturday.
00:13
So 14 on sunday, 13 on monday, and so on and so forth.
00:16
And there's a total of 100.
00:17
So if we add all those up, we see we get 100.
00:20
And what we want to know, if based on these data, is it reasonable to include that the proportion of accidents is not the same for all days of the week? so they're not equal.
00:31
So we can see there's some difference, right? so tuesday has 12, whereas friday has 17.
00:37
And so they're different, but is it significant enough to say they're not all the difference? so this is going to be a perfect chi -squared test for goodness of fit.
00:47
So chi -squared goodness of fit test.
00:51
And we're going to test this at the alpha of 0 .05 level of significance.
01:03
And what that means is we have to set up our hypotheses, but we're going to reject the null hypothesis if our p -value is less than this alpha.
01:10
So our null hypothesis would be that, essentially, this is going to be uniform distribution, that it's uniform.
01:17
So a uniform would be a good fit.
01:20
So all equally likely, all days equally likely.
01:23
All days distribution is a uniform distribution.
01:38
The alternative, all days are not equally likely, not equally likely.
01:48
In other words, not a good fit.
01:49
That's why it's called a goodness of fit test.
01:52
So we get our chi -squared statistic, which is found by taking the sum of all the observed values minus the expected values squared all over the expected values.
02:05
And we have the observed values here.
02:07
Those are our expected counts.
02:08
Or excuse me, those are observed counts right here.
02:11
Observed.
02:12
Now we need the expected counts.
02:15
And the expected counts will be, all right, if it is evenly distributed, if they are all equally likely, then we'd evenly split the 100 across the seven days.
02:26
So what we do is we take 100 divided by seven and assign that to each day.
02:30
And that is our expected amount.
02:35
So there we go.
02:35
Those are the expected counts.
02:36
They're all the same.
02:37
That would mean uniformly distributed, which is what we want to see.
02:42
Now we get our statistic by taking the observed minus the expected squared divided by the expected value.
02:50
So that's what this column of our spreadsheet is filled up with.
02:54
So just to give you a little idea of how this works...