00:01
So the question today is, is your desire to ride a bicycle dependent on your age? and so researchers asked 220 people randomly, 220 randomly selected people, and these four age ranges, whether or not they wanted to ride a bicycle, yes or no, and these are the counts.
00:19
And we're going to run a chi -squared test for independence to see if age matters in this context.
00:25
So the null hypothesis would be the two variables, age and interest in riding a bicycle are independent, so age does not affect the desire to ride a bike.
00:36
Or against the alternative, two variables are dependent, so age does affect.
00:41
And we're going to test this at the alpha of 0 .01 level of significance.
00:46
And let's go ahead and get our chi -squared statistic, which is found by taking the sum of the observed values, which we have, minus the expected values, which we'll get, divided by the expected values.
00:59
And that'll give us our chi -squared statistic.
01:01
Our expected values are the total in the row times the total in the column divided by the total in the table.
01:11
So these are the observed, i mean, to get the expected.
01:14
Here are the expecteds.
01:19
And so for example, to get this 26 .5, we take the total in the row, which is 55, times the total in the column, which is 106, and then we divide it by 220.
01:30
That's how we get 26 .5.
01:31
And just so happens, because there's 55 in each row, that the yeses are all the same, as are the nos, for the expected table.
01:39
So it's kind of interesting.
01:41
So now we're going to do the calculation, observe minus expected squared over expected, and this is what it's going to look like.
01:49
So this is the 17 to 24 yes, right here, observed minus expected squared over expected.
01:56
Then you do the nos, 18 over minus 28 .5 squared over 25, which is 28 .5.
02:04
Now we go down to the 25, 35, and then you go down the line.
02:09
That's the calculation.
02:11
As you can see, it's very repetitive.
02:12
That's why it's nice to have a computer do it for you...