WEBVTT Kind: captions; language: en-us NOTE Treffsikkerhet: 86% (H?Y) 00:00:00.000 --> 00:00:08.850 In this video we will work with contingency tables, or contingency matrices as they're often termed. 00:00:08.850 --> 00:00:17.400 Contingency table and contingency Matrix is the same thing. We will first see how to tabulate counts 00:00:17.400 --> 00:00:25.800 for two variables in one table, and we will talk about indices of Association among the two variables 00:00:25.800 --> 00:00:29.950 that are cross tabulated, and test of equality of NOTE Treffsikkerhet: 84% (H?Y) 00:00:29.950 --> 00:00:38.700 proportions between the two variables, which are tests of relatedness between the two variables. Our 00:00:38.700 --> 00:00:47.100 example will use real data from a study on language screening, in this study there were teachers who 00:00:47.100 --> 00:00:54.500 completed a checklist called the children's communication checklist, aimed to detect language 00:00:54.500 --> 00:00:56.200 difficulties. NOTE Treffsikkerhet: 88% (H?Y) 00:00:56.200 --> 00:01:03.400 And children were also assessed by clinicians using the clinical evaluation of language fundamentals, 00:01:03.400 --> 00:01:11.300 this is a well-known assessment test used to detect children with developmental language disorder NOTE Treffsikkerhet: 86% (H?Y) 00:01:11.900 --> 00:01:20.000 In each case each child is classified as language impaired or not impaired So based on the teacher 00:01:20.000 --> 00:01:26.500 checklist we can have a classification as impaired or not impaired, and based on the clinical 00:01:26.500 --> 00:01:32.800 evaluation we also get a classification as language impaired or not impaired. NOTE Treffsikkerhet: 91% (H?Y) 00:01:32.800 --> 00:01:42.000 So we can cross tabulate these two variables so that each child finds itself in one of these four 00:01:42.000 --> 00:01:43.200 cells. NOTE Treffsikkerhet: 91% (H?Y) 00:01:43.200 --> 00:01:51.200 So a child that is classified as language impaired both by the clinical evaluation and by the 00:01:51.200 --> 00:01:59.800 teacher checklist would come to this cell. A child that would be classified as not impaired by the 00:01:59.800 --> 00:02:06.600 clinical evaluation, but as impaired by the teacher checklist would be in this cell. NOTE Treffsikkerhet: 89% (H?Y) 00:02:06.600 --> 00:02:15.300 And in this study the actual numbers of children were these. So there were 13 children who were 00:02:15.300 --> 00:02:23.200 classified as language impaired by both the clinical evaluation and the teacher rating scale NOTE Treffsikkerhet: 91% (H?Y) 00:02:23.500 --> 00:02:32.400 And there were 32 children who were classified as not impaired based on the clinical evaluation, but 00:02:32.400 --> 00:02:37.800 were classified as impaired on the basis of the teacher checklist NOTE Treffsikkerhet: 91% (H?Y) 00:02:39.300 --> 00:02:48.500 The total number of children that were identified as impaired by the teacher checklist is 13 plus 32 00:02:48.500 --> 00:02:50.950 is 45. NOTE Treffsikkerhet: 90% (H?Y) 00:02:50.950 --> 00:02:57.700 Accordingly the total number of children that were classified as not impaired on the basis of the 00:02:57.700 --> 00:03:08.000 teacher checklist was 124. We can do the same for the columns, so there were 32 children that were 00:03:08.000 --> 00:03:18.300 classified as language impaired based on the clinical evaluation, and 117 children classified as not 00:03:18.300 --> 00:03:21.400 impaired in total based on the NOTE Treffsikkerhet: 80% (H?Y) 00:03:21.400 --> 00:03:32.700 the clinical evaluation. And the grand total is the overall sum of cases so they were 149 children in total. NOTE Treffsikkerhet: 85% (H?Y) 00:03:34.000 --> 00:03:42.100 How well did the teacher checklist agree with the results of the clinical evaluation ? NOTE Treffsikkerhet: 85% (H?Y) 00:03:42.100 --> 00:03:51.300 The teacher ratings agreed with the evaluation for 13 children they both classified as language 00:03:51.300 --> 00:04:02.050 impaired and for 85 children they both classified as not impaired, they disagreed for the children that 00:04:02.050 --> 00:04:08.649 only one of the two instruments classified as language impaired. NOTE Treffsikkerhet: 91% (H?Y) 00:04:08.649 --> 00:04:15.600 So the total agreement is the sum of these two numbers divided by the grand total NOTE Treffsikkerhet: 83% (H?Y) 00:04:15.600 --> 00:04:24.750 so 13 plus 85 divided over 149 is 66 percent. NOTE Treffsikkerhet: 84% (H?Y) 00:04:24.750 --> 00:04:36.000 Teachers ratings and the results of the clinical evaluation agreed for two-thirds of the children. We 00:04:36.000 --> 00:04:42.650 can formulate this problem as a question of equality of proportions. NOTE Treffsikkerhet: 76% (H?Y) 00:04:42.650 --> 00:04:45.350 What does this mean ? NOTE Treffsikkerhet: 91% (H?Y) 00:04:45.350 --> 00:04:56.400 Look at the proportion of children classified by the teacher checklist as impaired versus not 00:04:56.400 --> 00:04:59.250 impaired in each case. NOTE Treffsikkerhet: 77% (H?Y) 00:04:59.250 --> 00:05:06.350 For children who were deemed to be language impaired in the clinical evaluation NOTE Treffsikkerhet: 91% (H?Y) 00:05:06.350 --> 00:05:16.000 the teacher checklist resulted in more children being classified as non impaired than impaired. NOTE Treffsikkerhet: 91% (H?Y) 00:05:16.000 --> 00:05:25.000 For the children deemed to be not impaired by the clinical evaluation the teacher ratings resulted 00:05:25.000 --> 00:05:34.600 again in more children classified as non impaired than impaired. So in both cases the teachers 00:05:34.600 --> 00:05:41.400 classified more children as non-impaired than impaired, this makes a lot of sense in the general 00:05:41.400 --> 00:05:45.650 population but when we look at just the NOTE Treffsikkerhet: 83% (H?Y) 00:05:45.650 --> 00:05:53.000 children who are deemed to be language impaired by a relevant clinical evaluation then we would have 00:05:53.000 --> 00:05:56.900 expected this proportion to be very different. NOTE Treffsikkerhet: 88% (H?Y) 00:05:56.900 --> 00:06:05.800 If the teacher checklist was actually working as we wanted it to be working, if the teachers were 00:06:05.800 --> 00:06:13.800 doing a good job in screening children who might be language impaired, then we should see here a 00:06:13.800 --> 00:06:22.800 higher proportion of children deemed impaired on the basis of the checklist than deemed not impaired, 00:06:22.800 --> 00:06:27.200 because this column lists the children who are impaired NOTE Treffsikkerhet: 91% (H?Y) 00:06:27.200 --> 00:06:32.000 according to the clinical evaluation. In contrast NOTE Treffsikkerhet: 91% (H?Y) 00:06:32.000 --> 00:06:48.700 we see that the proportions of children are both less than 1, so 13 over 19 is 0.68. 32 over 85 is 00:06:48.700 --> 00:06:55.400 0.38. It's good that this proportion NOTE Treffsikkerhet: 89% (H?Y) 00:06:55.400 --> 00:07:06.400 is higher than this proportion because it suggests that there is a higher proportion of children in 00:07:06.400 --> 00:07:14.950 the clinically designated impaired category that are rated to be impaired by the teacher checklist 00:07:14.950 --> 00:07:23.500 than the proportion of children in the non-impaired category according to the clinical evaluation as 00:07:23.500 --> 00:07:26.100 it should be, so this number should be a NOTE Treffsikkerhet: 76% (H?Y) 00:07:26.100 --> 00:07:37.300 big one and this should be a big one if the two kinds of Assessments agreed well. That would lead to very 00:07:37.300 --> 00:07:48.400 different proportions, if on the other hand, the teacher checklist were irrelevant or the teachers 00:07:48.400 --> 00:07:51.750 were unable to make the correct judgments NOTE Treffsikkerhet: 91% (H?Y) 00:07:51.750 --> 00:08:02.900 then we would not expect these proportions to differ. Imagine as an extreme example, that the teachers 00:08:02.900 --> 00:08:10.500 were completing a checklist about something completely independent, that they weren't rating anything 00:08:10.500 --> 00:08:18.600 related to Children's language. Then we wouldn't expect the ratings of the teachers to be in 00:08:18.600 --> 00:08:21.600 agreement with the results of the clinical NOTE Treffsikkerhet: 91% (H?Y) 00:08:21.600 --> 00:08:31.350 evaluation of language. We would expect these proportions to be equal if the two variables weren't related. NOTE Treffsikkerhet: 79% (H?Y) 00:08:31.350 --> 00:08:41.900 So a way to test whether it seems that the teacher ratings are reliably associated with the clinical 00:08:41.900 --> 00:08:51.100 evaluation is to test whether these proportions differ from even proportions. NOTE Treffsikkerhet: 89% (H?Y) 00:08:51.200 --> 00:09:01.600 In other words we need to run a test of equality of proportions based on these observed counts, NOTE Treffsikkerhet: 91% (H?Y) 00:09:01.600 --> 00:09:11.900 and to do that we need to derive some expected values. Note that all the marginal sums are fixed and 00:09:11.900 --> 00:09:20.800 cannot change, we cannot change the fact that there were 149 children in total. NOTE Treffsikkerhet: 86% (H?Y) 00:09:22.200 --> 00:09:33.000 We cannot change the fact that teacher ratings resulted in 45 classified as language impaired and 00:09:33.000 --> 00:09:42.300 104 classified as non impaired, and we cannot change the fact that the clinical evaluation resulted in 00:09:42.300 --> 00:09:49.550 32 classified as language impaired and 117 as non-impaired. NOTE Treffsikkerhet: 91% (H?Y) 00:09:49.550 --> 00:10:00.200 Still we want to derive expected values based on the Assumption from the null hypothesis that the 00:10:00.200 --> 00:10:09.700 proportions are equal, which amounts to the assumption that the two variables, namely the language 00:10:09.700 --> 00:10:17.700 evaluation by the clinical screening test and the teacher rating checklist, so these two variables 00:10:17.700 --> 00:10:19.200 are unrelated. The NOTE Treffsikkerhet: 82% (H?Y) 00:10:19.200 --> 00:10:30.099 null hypothesis says that this in this, the self and the CCC, are unrelated that's our null hypothesis. 00:10:30.099 --> 00:10:39.700 We're hoping they're not unrelated, that teacher ratings are related to self results. In other words 00:10:39.700 --> 00:10:46.300 that teacher ratings are useful indicators that can be used as early screening, NOTE Treffsikkerhet: 91% (H?Y) 00:10:46.300 --> 00:10:54.500 and to be able to conclude that we must be able to reject the null hypothesis: that the two variables 00:10:54.500 --> 00:11:02.550 are unrelated. Which is the same as the statement that the proportions are equal. NOTE Treffsikkerhet: 91% (H?Y) 00:11:02.550 --> 00:11:10.850 When i talk about equal proportions in a two by two table like this one with four values, so we have 00:11:10.850 --> 00:11:19.700 four cells four values, which is to say equal proportions which amounts to no relationship between the two 00:11:19.700 --> 00:11:29.650 variables. This means that the proportions are going to be equal over both rows and columns. So this 00:11:29.650 --> 00:11:33.650 over this should be equal to this over this, NOTE Treffsikkerhet: 91% (H?Y) 00:11:33.650 --> 00:11:37.150 that's the first line. As well as NOTE Treffsikkerhet: 91% (H?Y) 00:11:37.150 --> 00:11:44.200 this over this, should be equal to this over this, that's the second line. NOTE Treffsikkerhet: 91% (H?Y) 00:11:44.200 --> 00:11:52.850 That's because if the two variables are unrelated the relative proportions will be the same, if the 00:11:52.850 --> 00:12:01.900 row variable and the column variable are not related they will be an equal proportion of the second 00:12:01.900 --> 00:12:11.150 row over the first in the two columns. And an equal proportion of the second column over the first 00:12:11.150 --> 00:12:13.900 over the two rows. NOTE Treffsikkerhet: 77% (H?Y) 00:12:15.000 --> 00:12:19.650 How are you going to derive these expected values? NOTE Treffsikkerhet: 91% (H?Y) 00:12:19.650 --> 00:12:28.000 This is the trick that produces the correct values: let's say we need the expected value for this 00:12:28.000 --> 00:12:39.450 cell. So how many children would we have expected to be classified as language impaired by both 00:12:39.450 --> 00:12:47.800 instruments, so to be classified in the First Column and the first row. If there were no differences 00:12:47.800 --> 00:12:49.250 in proportions NOTE Treffsikkerhet: 91% (H?Y) 00:12:49.250 --> 00:12:53.000 over the categories of these two variables. NOTE Treffsikkerhet: 88% (H?Y) 00:12:53.000 --> 00:13:03.300 To find that we look to the marginal sums for the cell we are interested in, so for this cell the row 00:13:03.300 --> 00:13:11.300 marginal sum is the total number of children classified as impaired by teachers 45, and the total 00:13:11.300 --> 00:13:17.000 number of children classified as language impaired by the clinical evaluation which is 32. We 00:13:17.000 --> 00:13:22.500 multiply these two and then we divide by the grand total. NOTE Treffsikkerhet: 78% (H?Y) 00:13:22.500 --> 00:13:32.200 And the number is 9.66 this is our expected value for the number of children that should be in 00:13:32.200 --> 00:13:40.400 this cell given these marginal sums and the Assumption of equal proportions. NOTE Treffsikkerhet: 91% (H?Y) 00:13:40.400 --> 00:13:49.300 We retain the decimal number in the expected proportions for all calculations. NOTE Treffsikkerhet: 91% (H?Y) 00:13:50.000 --> 00:13:56.400 Likewise to find what the expected value for this cell is NOTE Treffsikkerhet: 91% (H?Y) 00:13:56.400 --> 00:14:06.000 we look up the relevant marginal sums, we multiply them, and then we divide by the grand total and we 00:14:06.000 --> 00:14:11.950 come up with a value of 35.34 that should then go there, NOTE Treffsikkerhet: 91% (H?Y) 00:14:11.950 --> 00:14:21.000 and then we do the same for the other two and these are our expected values. Let us confirm that 00:14:21.000 --> 00:14:31.700 these values indeed have the desired properties, if we divide this number by this number NOTE Treffsikkerhet: 91% (H?Y) 00:14:31.700 --> 00:14:35.300 the result is 0.27. NOTE Treffsikkerhet: 91% (H?Y) 00:14:36.700 --> 00:14:47.700 If we divide this number by this number the result is again 0.27, so we have equal proportions NOTE Treffsikkerhet: 81% (H?Y) 00:14:47.700 --> 00:14:51.950 between columns in the two rows. NOTE Treffsikkerhet: 91% (H?Y) 00:14:51.950 --> 00:15:02.150 What about in the other direction? If we divide this number by this number the result is 0.43, NOTE Treffsikkerhet: 91% (H?Y) 00:15:02.150 --> 00:15:10.000 if we divide this number by this number the result is again 0.43. NOTE Treffsikkerhet: 76% (H?Y) 00:15:10.000 --> 00:15:21.800 So we have equal proportions of rows over the two columns, moreover if we add these two numbers the 00:15:21.800 --> 00:15:28.600 result is 45, equal to the corresponding marginal sum. NOTE Treffsikkerhet: 91% (H?Y) 00:15:28.900 --> 00:15:34.750 If we add these two numbers the result is 104, NOTE Treffsikkerhet: 89% (H?Y) 00:15:34.750 --> 00:15:46.500 if we add these two numbers the result is 32, and if we add these two numbers the result is 117. So 00:15:46.500 --> 00:15:57.000 these values exhibit the necessary property of equal proportions across both rows and columns while 00:15:57.000 --> 00:16:04.750 conserving the marginal sums so these are the right values to use for the NOTE Treffsikkerhet: 84% (H?Y) 00:16:04.750 --> 00:16:14.200 expectation coming from the null hypothesis that the proportions are equal for this sample size. NOTE Treffsikkerhet: 81% (H?Y) 00:16:14.400 --> 00:16:24.100 We can now go on to our familiar table to calculate our index of proportion inequality, we just list 00:16:24.100 --> 00:16:32.700 the four cells as if they were independent categories because each child can only be in one of them. NOTE Treffsikkerhet: 91% (H?Y) 00:16:32.700 --> 00:16:41.400 These are the observed counts, these are the expected counts we subtract the expected from The 00:16:41.400 --> 00:16:51.800 observed, and we multiply these numbers by themselves and divided by the corresponding expectation. So 00:16:51.800 --> 00:16:55.000 this divided by this, NOTE Treffsikkerhet: 89% (H?Y) 00:16:55.000 --> 00:17:05.599 results in this number. And this divided by this, results in this number, and so on and we add all 00:17:05.599 --> 00:17:17.400 these up and the result is 2.1. This is our chi-square, the value of chi-square for this table, for 00:17:17.400 --> 00:17:21.699 this contingency Matrix is 2.1. NOTE Treffsikkerhet: 91% (H?Y) 00:17:21.699 --> 00:17:30.000 Before we can look up a probability for this number we need to find out how many degrees of freedom 00:17:30.000 --> 00:17:40.100 we have. How many degrees of freedom does a two by two Matrix have ? Let us imagine that one value 00:17:40.100 --> 00:17:47.800 changes, so let's say that 13 was actually 14, the sums cannot change NOTE Treffsikkerhet: 91% (H?Y) 00:17:47.800 --> 00:17:56.700 neither the total ,nor any of the marginal sums that tell us how many children were classified in 00:17:56.700 --> 00:18:08.400 each category by each variable separately. So this sum constrains this count to be 31 in response to 00:18:08.400 --> 00:18:17.550 this one becoming 14. Tikewise this some constraints this number to be lower as NOTE Treffsikkerhet: 74% (MEDIUM) 00:18:17.550 --> 00:18:18.550 well. NOTE Treffsikkerhet: 91% (H?Y) 00:18:18.550 --> 00:18:30.850 And then these sums must also constrain this count to be higher in order for every marginal sum to 00:18:30.850 --> 00:18:41.000 hold, that's by changing only one value every other value was constrained. We only have one degree of 00:18:41.000 --> 00:18:41.950 freedom NOTE Treffsikkerhet: 81% (H?Y) 00:18:41.950 --> 00:18:51.500 this makes sense because there are two categories in the columns so 1 degree of Freedom this way, and 00:18:51.500 --> 00:18:58.949 there are two categories in the rows so 1 degree of Freedom this way. So if we multiply one by one 00:18:58.949 --> 00:19:07.200 there's still just one, and there is one degree of freedom in total for the whole 2 by 2 Matrix. NOTE Treffsikkerhet: 90% (H?Y) 00:19:07.200 --> 00:19:13.949 Using these numbers and going on to the p-value calculator NOTE Treffsikkerhet: 86% (H?Y) 00:19:13.949 --> 00:19:23.000 we can select the chi-square distribution with one degree of freedom and enter the value we have 00:19:23.000 --> 00:19:32.600 calculated, that 2.1, and we see that the p-value is 0.147. For the chi-square distribution with 00:19:32.600 --> 00:19:41.450 one degree of Freedom the value of 2.1 is associated with the probability of 0.147. NOTE Treffsikkerhet: 91% (H?Y) 00:19:41.450 --> 00:19:44.200 This means that NOTE Treffsikkerhet: 87% (H?Y) 00:19:44.500 --> 00:19:54.600 the probability of obtaining a chi-square value greater than or equal to two point one in samples 00:19:54.600 --> 00:20:00.300 drawn from two variable populations with even proportions NOTE Treffsikkerhet: 90% (H?Y) 00:20:00.300 --> 00:20:08.500 of two categories in each variable, so even proportions over the whole 2 by 2 Matrix, the probability 00:20:08.500 --> 00:20:15.850 of getting a chi-square greater than or equal to 2 point 1 is 14.7. NOTE Treffsikkerhet: 84% (H?Y) 00:20:15.850 --> 00:20:25.700 That's a relatively high probability it's certainly much higher than our Convention of 5%, therefore 00:20:25.700 --> 00:20:34.100 we cannot reject the null hypothesis. The association between the two variables is not statistically 00:20:34.100 --> 00:20:35.600 significant. NOTE Treffsikkerhet: 91% (H?Y) 00:20:35.600 --> 00:20:43.800 This means that the observed proportions are not statistically distinguishable from equal 00:20:43.800 --> 00:20:45.300 proportions. NOTE Treffsikkerhet: 91% (H?Y) 00:20:45.300 --> 00:20:54.800 Equal proportions means unrelated variables, so sampling randomly from a population with two 00:20:54.800 --> 00:21:02.200 variables that were just unrelated could have produced a result like the one we observed, and the 00:21:02.200 --> 00:21:09.400 relevant conclusion for our study is that teacher ratings are not systematically related to 00:21:09.400 --> 00:21:14.850 screening results. It's consistent with the possibility NOTE Treffsikkerhet: 91% (H?Y) 00:21:14.850 --> 00:21:21.900 the teacher ratings were not related to the results of the clinical evaluation. NOTE Treffsikkerhet: 90% (H?Y) 00:21:21.900 --> 00:21:31.000 Now this does not mean that the teacher ratings in the study were not related to the language 00:21:31.000 --> 00:21:41.600 evaluation, it means that if they weren't related at all we could have gotten a count like the one we 00:21:41.600 --> 00:21:50.300 did, so we do not have strong evidence to conclude that the teacher ratings are systematically 00:21:50.300 --> 00:21:52.250 related to the language. NOTE Treffsikkerhet: 80% (H?Y) 00:21:52.250 --> 00:21:59.400 Evaluation this could be because the checklist is not a very good one for some reason, or because 00:21:59.400 --> 00:22:06.850 teachers are unable to judge what needs to be judged when it comes to language development, or both. NOTE Treffsikkerhet: 84% (H?Y) 00:22:06.850 --> 00:22:15.300 The overall conclusion is that based on the counts we observed, we cannot conclude that the teacher 00:22:15.300 --> 00:22:24.800 ratings of this sort can be considered to be a useful screening approach for detecting children with 00:22:24.800 --> 00:22:31.550 possible developmental language disorder as that is typically determined with a clinical evaluation 00:22:31.550 --> 00:22:34.250 like the test that was administered. NOTE Treffsikkerhet: 91% (H?Y) 00:22:34.250 --> 00:22:45.300 So that was an example with a 2 by 2 Matrix, so each variable could only take two values. What if 00:22:45.300 --> 00:22:52.100 there are more possibilities ? what if they're more categories? The general process is the same, let us 00:22:52.100 --> 00:22:54.500 look at an example. NOTE Treffsikkerhet: 88% (H?Y) 00:22:55.400 --> 00:23:03.400 Let us look at the question whether High School completion rates are associated with parental 00:23:03.400 --> 00:23:13.400 education. We will use data on high school students for the Years 2013 to 2018 as downloaded from SSB 00:23:13.400 --> 00:23:22.100 Dot.no focusing on two variables. One variable will hold either a yes or a no, so completed High 00:23:22.100 --> 00:23:25.950 School versus did not complete High School, in the other NOTE Treffsikkerhet: 64% (MEDIUM) 00:23:25.950 --> 00:23:33.450 variable will be the level of Parental education, here broken down into just four levels. NOTE Treffsikkerhet: 89% (H?Y) 00:23:33.450 --> 00:23:43.500 So each youth is classified according to these two variables in one of these cells, down the rows we 00:23:43.500 --> 00:23:49.400 see Parental education, so four levels of Parental education. NOTE Treffsikkerhet: 85% (H?Y) 00:23:49.400 --> 00:23:57.200 And over the columns we have the two categories related to completion, completed high school versus 00:23:57.200 --> 00:24:00.949 not completed, and these are the totals. NOTE Treffsikkerhet: 91% (H?Y) 00:24:00.949 --> 00:24:07.199 We're talking about 29,000 high school students NOTE Treffsikkerhet: 91% (H?Y) 00:24:07.199 --> 00:24:12.150 who either completed or did not complete their studies. NOTE Treffsikkerhet: 91% (H?Y) 00:24:12.150 --> 00:24:21.900 It looks like there is a much lower proportion of completion for students with parents with lower 00:24:21.900 --> 00:24:29.750 levels of Education as compared with students having parents with higher levels of education. So here 00:24:29.750 --> 00:24:37.000 the great majority complete their study, whereas here only a minority complete their study and there 00:24:37.000 --> 00:24:41.500 is a gradual change as we go down the rows. NOTE Treffsikkerhet: 91% (H?Y) 00:24:41.500 --> 00:24:50.300 So is there a statistically reliable difference in proportions here, or is this consistent with 00:24:50.300 --> 00:24:57.900 random sampling from two categories with even proportions? What would even proportions be in this 00:24:57.900 --> 00:25:06.000 case? It would be that the proportion of students completing versus not completing would be equal 00:25:06.000 --> 00:25:10.449 across the four levels of Parental education. NOTE Treffsikkerhet: 88% (H?Y) 00:25:10.449 --> 00:25:18.000 It would also mean that the relative proportions of Parental education would be the same for 00:25:18.000 --> 00:25:25.300 students completing the study and students not completing. So these two go together, if you have equal 00:25:25.300 --> 00:25:30.300 proportions this way you also have equal proportions this way. NOTE Treffsikkerhet: 91% (H?Y) 00:25:30.900 --> 00:25:41.400 We can use our trick with the marginal totals to compute the expected values, so if you multiply this 00:25:41.400 --> 00:25:42.650 number NOTE Treffsikkerhet: 82% (H?Y) 00:25:42.650 --> 00:25:45.600 by this number, NOTE Treffsikkerhet: 78% (H?Y) 00:25:45.700 --> 00:25:49.350 and divide by this number NOTE Treffsikkerhet: 91% (H?Y) 00:25:49.350 --> 00:25:59.000 you come up with the expected value for this cell and so on, and this leads to a value of chi-square 00:25:59.000 --> 00:26:09.600 equal to 788.5 this is a truly huge value that indicates that 00:26:09.600 --> 00:26:12.200 the difference in proportions NOTE Treffsikkerhet: 91% (H?Y) 00:26:12.200 --> 00:26:22.100 is very reliable and unlikely to have a reason from sampling from the null hypothesis, from a 00:26:22.100 --> 00:26:25.400 population with equal proportions. NOTE Treffsikkerhet: 91% (H?Y) 00:26:25.800 --> 00:26:29.550 The number of degrees of freedom NOTE Treffsikkerhet: 91% (H?Y) 00:26:29.550 --> 00:26:37.600 for checking this probability will be derived by considering the number of categories in each 00:26:37.600 --> 00:26:43.800 direction. So going down the columns there are four categories NOTE Treffsikkerhet: 73% (MEDIUM) 00:26:43.800 --> 00:26:55.900 four different rows in each column, this means we have three degrees of freedom over the four rows and 00:26:55.900 --> 00:27:07.100 going right on a row we see that over the two columns we have one degree of Freedom so 3 times 1 NOTE Treffsikkerhet: 85% (H?Y) 00:27:07.100 --> 00:27:14.250 number of rows -1 x number of columns minus one NOTE Treffsikkerhet: 88% (H?Y) 00:27:14.250 --> 00:27:22.300 the product of the row degrees of freedom and column degrees of freedom is 3. NOTE Treffsikkerhet: 78% (H?Y) 00:27:22.500 --> 00:27:29.400 So for 3 degrees of freedom, if we look up that chi-square value, NOTE Treffsikkerhet: 88% (H?Y) 00:27:30.800 --> 00:27:39.300 we will see that the probability is so small that it cannot even be represented in the computer. This 00:27:39.300 --> 00:27:47.200 means that these data are not consistent with random sampling from a population with equal 00:27:47.200 --> 00:27:54.900 proportions, it is extremely unlikely to get such numbers from equal proportions. You can safely 00:27:54.900 --> 00:27:56.199 conclude NOTE Treffsikkerhet: 84% (H?Y) 00:27:56.199 --> 00:28:05.350 but the variables High School completion rates and parental education are associated. NOTE Treffsikkerhet: 91% (H?Y) 00:28:05.350 --> 00:28:15.500 We can safely conclude that there is a relationship between parental education and study completion, NOTE Treffsikkerhet: 91% (H?Y) 00:28:15.500 --> 00:28:26.700 this relative certainty in this conclusion doesn't tell us how much we would be able to guess one 00:28:26.700 --> 00:28:36.300 from the other, so our confidence in the fact that there is a relationship is different from an 00:28:36.300 --> 00:28:40.900 assessment of how strong this relationship is. NOTE Treffsikkerhet: 84% (H?Y) 00:28:41.500 --> 00:28:51.600 To find out how much we can derive or guess one variable from the other we will have to compute an 00:28:51.600 --> 00:29:03.700 index of Association. Before we move on try to think about guessing, obviously if you know that 00:29:03.700 --> 00:29:07.500 someone's parents only finished Elementary School NOTE Treffsikkerhet: 91% (H?Y) 00:29:07.500 --> 00:29:14.700 you should guess that they will not complete their high school and you will be correct more often 00:29:14.700 --> 00:29:23.000 than not. Although the difference would not be very large. If you know that someone's parents have had 00:29:23.000 --> 00:29:31.300 long higher education you should guess that this person completed high school and you will be 00:29:31.300 --> 00:29:36.850 correct more often than not with the somewhat word higher rate. NOTE Treffsikkerhet: 91% (H?Y) 00:29:36.850 --> 00:29:39.950 How big is this difference NOTE Treffsikkerhet: 91% (H?Y) 00:29:39.950 --> 00:29:46.000 depends on the actual numbers and the sample size. NOTE Treffsikkerhet: 78% (H?Y) 00:29:47.700 --> 00:29:57.200 And there are a number of indices of Association that quantify these relationships, the indices of 00:29:57.200 --> 00:30:05.800 Association we see most often which are quite useful for this purpose are Phi, and this is the 00:30:05.800 --> 00:30:12.000 formula for the 2 by 2 case only and Kramer's V, NOTE Treffsikkerhet: 91% (H?Y) 00:30:12.000 --> 00:30:15.350 with the corresponding formula. NOTE Treffsikkerhet: 91% (H?Y) 00:30:15.350 --> 00:30:22.000 Note that in the two by two case these two are equal. NOTE Treffsikkerhet: 91% (H?Y) 00:30:22.500 --> 00:30:31.000 K here refers to the smallest of the two Dimensions, so the dimension or the variable with the 00:30:31.000 --> 00:30:42.800 fewest categories, so in the two by two case k is equal to 2, 2 minus 1 is 1 so this goes away and you 00:30:42.800 --> 00:30:52.000 have the same formula except that phi also takes a sign to indicate the direction. NOTE Treffsikkerhet: 85% (H?Y) 00:30:54.600 --> 00:31:04.800 These indices of Association are very useful because they are interpretable, they range from 0 to 1. 0 00:31:04.800 --> 00:31:13.900 means no association, no association means equal proportions and it also means you cannot predict one 00:31:13.900 --> 00:31:21.400 variable from the other. Knowing the value on one of the variables does not help you guess the other 00:31:21.400 --> 00:31:24.700 variable with any increased success. NOTE Treffsikkerhet: 78% (H?Y) 00:31:25.300 --> 00:31:32.900 They range up to the value of 1, which is the highest possible value to indicate a perfect 00:31:32.900 --> 00:31:35.000 Association. NOTE Treffsikkerhet: 77% (H?Y) 00:31:35.600 --> 00:31:43.300 An association equal to 1 means that you only need to know one of the two variables because you can 00:31:43.300 --> 00:31:46.449 perfectly predict the other one from it. NOTE Treffsikkerhet: 91% (H?Y) 00:31:46.449 --> 00:31:53.900 This is essentially never achieved in practice, and it means that the two variables are in perfect 00:31:53.900 --> 00:31:55.600 agreement. NOTE Treffsikkerhet: 82% (H?Y) 00:31:55.600 --> 00:32:03.300 These values are thus functioning like correlation coefficients in the sense of allowing you to 00:32:03.300 --> 00:32:10.900 judge the strength of an association between zero and one, actually Phi goes all the way down to 00:32:10.900 --> 00:32:19.800 minus 1 to indicate a strong Association in the opposite direction, so phi distinguishes between 00:32:19.800 --> 00:32:24.950 positive and negative associations whereas Kramer's V doesn't. NOTE Treffsikkerhet: 52% (MEDIUM) 00:32:24.950 --> 00:32:26.100 NOTE Treffsikkerhet: 89% (H?Y) 00:32:26.100 --> 00:32:35.750 Having positive versus negative associations is questionable at best when you have a nominal scale, 00:32:35.750 --> 00:32:40.800 but is interpretable when you have an ordinal scale. NOTE Treffsikkerhet: 76% (H?Y) 00:32:42.300 --> 00:32:51.200 These indices are interpretable regardless of the number of categories, and regardless of the sample 00:32:51.200 --> 00:32:59.700 size. They're always interpretable in the same sense between the 0 and 1, this is very useful, this is 00:32:59.700 --> 00:33:02.800 not true of chi-square. NOTE Treffsikkerhet: 78% (H?Y) 00:33:03.700 --> 00:33:12.350 Let us look at the values of these indices for are two examples. For the language screening example 00:33:12.350 --> 00:33:23.700 Phi equals V, equals 0.12. So the two indices of Association for the relationship between the 00:33:23.700 --> 00:33:32.500 variables teachers checklist and clinical evaluation of language development. These two variables are 00:33:32.500 --> 00:33:34.000 only associated NOTE Treffsikkerhet: 91% (H?Y) 00:33:34.000 --> 00:33:37.400 to a very low level of 0.12. NOTE Treffsikkerhet: 91% (H?Y) 00:33:37.600 --> 00:33:47.900 For our high school completion versus parental education example Kramer's V provides a value of 00:33:47.900 --> 00:33:54.500 0.16, so it is still a rather low Association. NOTE Treffsikkerhet: 91% (H?Y) 00:33:54.500 --> 00:34:02.500 Which is consistent with the fact that you cannot predict very well if a student will or will not 00:34:02.500 --> 00:34:11.300 finish High School just by knowing their parents education level, you can only make an improved guess, 00:34:11.300 --> 00:34:18.699 but you will be quite often incorrect. The important thing to note here is that these two values are 00:34:18.699 --> 00:34:21.150 in fact quite similar. NOTE Treffsikkerhet: 84% (H?Y) 00:34:21.150 --> 00:34:28.800 So the strength of the association in the sense of how well you can predict one variable from the 00:34:28.800 --> 00:34:36.900 other, given the observed counts is relatively similar there is a very small difference it's not a 00:34:36.900 --> 00:34:47.899 substantial difference. However the results of the chi-square test of proportions were very different. 00:34:47.899 --> 00:34:50.800 Indeed in the language screening NOTE Treffsikkerhet: 84% (H?Y) 00:34:50.800 --> 00:34:58.900 example we could not reject the null assumption that the two variables are unrelated, the data that 00:34:58.900 --> 00:35:06.600 were observed were consistent with the hypothesis that the data were randomly sampled. That teacher 00:35:06.600 --> 00:35:14.700 screening checklists were unrelated to the clinical evaluation classifications, this is not an 00:35:14.700 --> 00:35:18.300 encouraging result for using these teacher checklist. NOTE Treffsikkerhet: 91% (H?Y) 00:35:18.300 --> 00:35:28.399 In contrast having a huge sample size let us to reject with very high confidence the null hypothesis 00:35:28.399 --> 00:35:34.500 when it comes to the relationship between parental education and high school completion. NOTE Treffsikkerhet: 90% (H?Y) 00:35:34.500 --> 00:35:43.800 Although our ability to predict one from the other is still relatively low, we are quite confident in 00:35:43.800 --> 00:35:48.000 the relationship even though it is a weak one. NOTE Treffsikkerhet: 91% (H?Y) 00:35:49.600 --> 00:35:52.350 To sum up NOTE Treffsikkerhet: 89% (H?Y) 00:35:52.350 --> 00:36:02.200 contingency tables or contingency matrices refer to cross tabulating cases across two categorical 00:36:02.200 --> 00:36:11.100 variables, each case so each person in these two examples, can only belong to one of the cells because 00:36:11.100 --> 00:36:19.000 it corresponds to one combination of measurements. one value on one variable and one value on the 00:36:19.000 --> 00:36:21.750 other variable. So the cross NOTE Treffsikkerhet: 90% (H?Y) 00:36:21.750 --> 00:36:28.600 tabluation results in a table that's called a contingency table or contingency Matrix. NOTE Treffsikkerhet: 84% (H?Y) 00:36:30.100 --> 00:36:41.400 If the variables are not related then the proportions of classification on one variable will not be 00:36:41.400 --> 00:36:49.200 associated with classification on the other variable, so the proportions will be even across levels 00:36:49.200 --> 00:36:58.200 of the other variable. There for an association between the two variables is indicated by uneven 00:36:58.200 --> 00:36:59.550 proportions NOTE Treffsikkerhet: 91% (H?Y) 00:36:59.550 --> 00:37:08.000 in the levels of one variable across levels of the other variable. Uneven proportions means 00:37:08.000 --> 00:37:16.300 relationship between the variables, means ability to predict one from the other to some extent. NOTE Treffsikkerhet: 80% (H?Y) 00:37:17.200 --> 00:37:27.200 The association indices Kramer's V and Phi Index this Association strength, they essentially answer 00:37:27.200 --> 00:37:34.000 the question how far from equal proportions are my observations. NOTE Treffsikkerhet: 73% (MEDIUM) 00:37:35.300 --> 00:37:42.700 The chi-square test of proportions answers a very different question, the question that chi-square 00:37:42.700 --> 00:37:50.750 test answers is are my observations consistent with sampling from equal proportions. NOTE Treffsikkerhet: 91% (H?Y) 00:37:50.750 --> 00:37:57.400 It's important to realize this is a very different question, and the difference between these two 00:37:57.400 --> 00:37:59.200 questions NOTE Treffsikkerhet: 91% (H?Y) 00:37:59.200 --> 00:38:02.750 depends mostly on sample size. NOTE Treffsikkerhet: 91% (H?Y) 00:38:02.750 --> 00:38:10.800 So if you have a small sample it is possible to have very unequal proportions and still be 00:38:10.800 --> 00:38:19.500 consistent with sampling from equal proportions. So extreme samples, non-representative samples, are 00:38:19.500 --> 00:38:27.100 more likely when they're small. We've seen that in every kind of example so far starting with coin 00:38:27.100 --> 00:38:33.050 flips and going through sample from distributions such as the normal distribution NOTE Treffsikkerhet: 87% (H?Y) 00:38:33.050 --> 00:38:36.900 and the sampling distributions of statistics. NOTE Treffsikkerhet: 91% (H?Y) 00:38:37.000 --> 00:38:47.850 in contrast having a very large sample allows you to exclude the possibility of the null hypothesis 00:38:47.850 --> 00:38:56.400 even when you are not very far from equal proportions because you have a more stable estimate of the 00:38:56.400 --> 00:39:02.600 proportions in the population. In other words the chi-square test NOTE Treffsikkerhet: 85% (H?Y) 00:39:02.600 --> 00:39:11.700 fits the table of observed proportions against the table of expected proportions that is equal 00:39:11.700 --> 00:39:20.400 proportions under the null hypothesis assumption, and in the end provides us an index of Association 00:39:20.400 --> 00:39:28.400 reliability in the sense that we can look up the probability that such an index could have a reason 00:39:28.400 --> 00:39:32.800 by random sampling from equal proportions.