Many people like eating chocolate. But most people are somewhat cautious with their chocolate consumption. Because it might well be the case that eating a lot of chocolate, increases your body weight. In this video today, I'll talk about how we can display a relationship between two variables using tables and using graphs. This can be very useful to help you discover if two variables are correlated or not. Let us investigate the relationship between eating chocolate and body weight a little bit further. Suppose I have selected 200 female students at my university, who are all one meter seventy tall. This way, height is a constant and cannot account for differences in body weight or chocolate consumption. I asked the students to report their body weight and their weekly chocolate consumption. They could choose between the categories less than 50 kilograms, 50 to 69 kilograms, 70 to 89 kilograms, and 90 kilograms or more. They could indicate their chocolate consumption by choosing less than 50 grams per week, between 50 and 150 grams per week, and more than 150 grams per week. Here are the results. What you see here is a contingency table. A contingency table, enables you to display the relationship between two ordinal or nominal variables. It is similar to a frequency table. But the major difference is that a frequency table always concerns only one variable, whereas a contingency table concerns two variables. In our study we have two variables. Body weight and chocolate consumption. The table shows that we have 33 individuals with a body weight of less than 50 kilograms. 27 of them eat less than 50 grams of chocolate per week. You can also see, that 90 individuals eat between 50 and 150 grams of chocolate per week. 7 of them weigh 90 kilograms or more. In this form, the table does not tell you much yet about a correlation between the two variables, because the columns and rows contain different numbers of cases. It provides more insight, when you compute percentages. And in this case, we commute column percentages. This means that for every cell, we compute a percentage of cases in that cell, compared to the total number of cases in the corresponding column. So for instance, in this cell, we have 24 cases. The total number of cases in the column is 60. So the percentage is 24 divided by 60 times 100. That equals 40%. When we do that for every cell, this is the result. We can also express these percentages as proportions. 45% then becomes 0.45. 38% becomes 0.38. We call these proportions, conditional proportions because the formation is conditional on another variable. In this case, that variable is chocolate consumption. We can also ignore the information we have about chocolate consumption, and use the count in the margin of the table. These are marginal proportions. For instance, 33 divided by 200. That makes 0.17. And this proportion tells you that a proportion of 0.17, that's the same as 17%, of the respondents in the study weighs less than 50 kilograms. So what does this mean? Of those who eat more than 150 grams of chocolate per week, 56% weighs 90 kilograms or more. Of those who eat less than 50 grams of chocolate, only 5% weighs 90 kilograms or more. Also, of those who eat less than 50 grams of chocolate, 45% weighs less than 50 kilograms, while those who eat more than 150 grams of chocolate. Only 2% weighs less than 50 kilograms. These percentages show that those who eat more chocolate are also more likely to weigh more, and those who eat less chocolate are also more likely to weigh less. In other words, the percentages show that there is a correlation between chocolate consumption and body weight. A contingency table is useful for nominal and ordinal variables. But not for quantitative variables. For quantitative variables a scatterplot is more appropriate. Suppose that instead of providing categories, I asked the 200 women to give me their exact body weight. For instance, 65 or 72 kilograms. Suppose I also ask them to tell me how much chocolate they eat every week. That could be, for instance, 64 or 99 grams per week. Now, I have much more precise information than before. And the best way to display the relationship between the quantitative variables, chocolate consumption and weight, is with a scatterplot. To make a scatterplot we draw two lines which we call axes. We call the horizontal axis the X axis. Here we display the independent variable. And the vertical axis is called the Y axis, which we use to represent the dependent variable. If there is no distinction between dependent and independent variable, the placement on the Y axis and X axis is a matter of choice. In our case, the independent variable is chocolate consumption, and the dependent variable is body weight. Imagine that our study shows that the lowest amount of chocolate eaten is equal to zero grams per week. And the highest amount is 700 grams per week. We displayed these values on the x axis. Similarly, the minimum value when it comes to body weight is 40 kilograms, and a maximum value is 110 kilograms. Next, we display every individual in this figure. For instance, here is one person that eats 49 grams of chocolate per week and weighs 65 kilograms. Another individual eats 134 grams of chocolate and weighs 73 kilograms. That's here. We do that for all individuals in our sample. And voila, there's the scatterplot. The scatterplot shows you at a glance that there is a relationship between chocolate consumption and body weight. The more chocolate you eat, the higher your body weight. What have you learned? Not that chocolate consumption and body weight are correlated. I think most of you were already aware of that relationship. What you have learned in this video is that we can display relationships between two variables by means of tables and by means of graphs. When the variables in the study are measured on the nominal, or ordinal level, we use a contingency table. And, when they are measured on a quantitative level, we use a scatterplot.