Correspondence Analysis (part 1/5): Introduction

This introductory lecture outlines the first of a five‑part series on correspondence analysis (CA). The speaker explains that CA examines the relationship between two qualitative variables by measuring how observed data deviate from what would be expected under independence. The discussion begins with the structure of the data: a contingency table (or two‑way cross‑tabulation) summarising counts of individuals across categories of the two variables. Several illustrative examples are given – character vocabularies in the play Phèdre, consumer associations with luxury perfumes, ecological species counts, and a detailed G8‑countries versus Nobel‑prize‑category table. The lecture then defines the independence model mathematically, showing that joint probabilities equal the product of marginal probabilities and presenting equivalent conditional‑probability formulations. A chi‑squared test is introduced as a way to assess the statistical significance of the relationship, but the speaker stresses that CA itself is concerned with visualising the nature of the relationship rather than testing significance. The core CA machinery is described: converting counts to probabilities, constructing row profiles (conditional distributions of variable V2 given V1) and column profiles (conditional distributions of V1 given V2), and comparing each profile to the overall (mean) profile. Concrete bar‑plot examples using the Nobel data illustrate how to detect over‑ or under‑representation of categories (e.g., Italy’s high share of literature prizes, the United States’ low share in literature relative to its overall share). Finally, the speaker previews the geometric representation that will follow in later videos – building point clouds for rows and columns and projecting them onto low‑dimensional planes to visualise deviations from independence.
Chapters
This week, we have for you 5 course videos on correspondence analysis. In the videos, we will see the following. First, we start by describing the data, giving a little notation, and considering questions to ask when running correspondence analysis. We'll see that the main point of correspondence analysis is studying the links between pairs of qualitative variables. This really means looking at the difference between the given data and what it would be like if the variables were independent. We are therefore going to see how the analysis captures deviations from independence. Our reasoning will mainly be geometrical, creating point clouds for the rows and point clouds for the columns. Projecting these clouds onto planes will give some useful representations. We will also have a look at percentages of inertia. From this point of view, correspondence analysis is no different from other principal component methods like principal component analysis. We will also give some technical results regarding inertia, and these indeed are quite specific to correspondence analysis. Similarly, the simultaneous representation of rows and columns is rather specific to correspondence analysis, and takes advantage of so-called barycentric properties. At the end, we'll give you some interpretation aids including looking at contributions and the quality of representation. In these, correspondence analysis has no real differences with, for example, principal component analysis. Let's start by describing the data. The data we are working with here consists of N individuals from whom we We have 2 qualitative variables. The data are put into a contingency table, in which rows are the possible categories of variable V1, and columns the possible categories of variable V2. The intersection of row i with column j has the entry X_ij, which is the number of individuals choosing or possessing category i of V1 and category j of V2. This table is also named a 2-way cross-tabulation. Let's look at a few examples of contingency tables. As a first example, as well as a historic one, because it's without doubt one of the first applications of correspondence analysis, we turn to the study of the vocabulary of characters in the play Phèdre. Each row corresponds to a character, and each column to a word used in the play. So X_ij is the number of times the character i uses the word j. As a second example, we can look at people's perception of luxury perfumes. We can ask people to associate words with each perfume. Each row is a perfume, each column a word, so X_ij is the number of times perfume i described with One more. In ecology, we may be interested in the ecological diversity of several locations. Each row is a location, and each column a plant or animal species. As before, x_ij is therefore the number found of plant or animal j in location i. Data like this is everywhere, and for those of you who have heard of the chi-squared test for independence, it's used for this type of data table. The data we are going to use to illustrate this part of the course on correspondence analysis is a data table with the G8 countries as rows and categories of Nobel Prize as columns. In a given entry of the table, we have the number of people for one G8 country that have won the Nobel Prize in a certain category. This table gives the allotment of the 570 Nobel Prizes given out between 1901 and 2015 to these countries. For instance, 51 Americans have won the Nobel Prize in Chemistry. This contingency table has marginals added to it. This means that the column added on the end contains the marginal sums of the values along each row. Similarly, the row added to the bottom of the table contains the marginal sums of each column. For instance, along the Germany row, the 80 in the last column is the sum along that row. Similarly, in the chemistry column, 121 is the total number of Nobel Prizes in chemistry given out over this period to G8 countries. All of which leads us to the following question: Is there a relationship between country and type of Nobel Prize? In other words, are some countries better at certain disciplines than others? Are certain prize categories more likely to go to one country than another? Contingency tables are usually built using 2 variables. So, at the start, our data is N individuals. For which we have 2 qualitative variables. In the data table we see here, individual L is in category i for the variable V1 and category j for the variable V2. We then build the contingency table with the categories of the first variable V1 as rows, for example, and the categories of the second variable V2 as columns. At the intersection of row i and column j, we find X_ij, the number of individuals found in or choosing category i of V1 and category j of V2. If we add up all the values in the table, we get n. The table therefore shows the distribution of the n individuals over the i times j possible attributions. Using this contingency table, we are going to calculate the corresponding probabilities. Then, correspondence analysis will go to work on this table of probabilities. To get a probability, for example f_ij, we simply divide the number x_ij by the total N. This gives us the probability of being both in category i of V1 and category j of V2. We fill the table with these probabilities. If we now sum them all up, We get one, which is the sign of a true probability distribution. We finish the table by first adding the marginal column f i point. This is the sum of the ith row for each i. Then we add the marginal row f point j. This gives the sum of the jth column for each j. We want to look at the interconnectedness of v one and v two. That is, how far away their relationship is from independence. Let's take a closer look at what independence between pairs of qualitative variables means and show how correspondence analysis captures deviations from independencies. Let's start by reminding ourselves what independence means for 2 events. We say that 2 events A and B are independent the probability of A and B is equal to the product of the 2: the probability of A times the probability of B. For 2 qualitative variables, we are going to see whether f_ij, the probability of i and j, is equal to the probability of i, f_i point, multiplied by the probability of j, f point j. But, This has to be true, of course, for all i and j. In terms of vocabulary, independence means that the joint probability is equal to the product of the marginal probabilities. There is another way to write this independence model, which we can see here: f_ij divided by f_i point is equal to f point j. In this notation, we say that the conditional probability is equal to the marginal probability. This might seem a bit formal to you, but in the end, this way of writing is closer to the intuition of what independence is. Here, the conditional probability is the probability of being j knowing that we are i. So, if there is independence, this probability is simply the probability of being j, even if we have no information about the other variable, In a nicely symmetric way, we also can divide f_ij by f_j, and under the hypothesis of independence, this new conditional probability, that is the probability to be i given that we are j, is indeed equal to the marginal probability of being i, f_i. The relationship between 2 qualitative variables is thus the deviation, or difference between the observed data f_ij and the independence model f_i-point times f-point_j. When we study this relationship between 2 qualitative variables, usually we first perform a test of significance of the relationship using a chi-squared test. Let's, let's now remind ourselves of what a chi-squared test looks like and how we use it to compare observed values with theoretical values. The theoretical values are simply the probabilities under the independence model: fi point times f point j multiplied by the total number of individuals, n. In this chi-squared expression, we can factor out the n and turn it into n phi squared, where phi squared looks at the difference between the observed and theoretical probabilities. So it's an indicator of the strength of the relationship, This difference between observed and theoretical probabilities. Why do we say the strength of the relationship? Because this term no longer depends on the number of individuals, only on the probabilities. There is something else to think about too. What is the nature of the relationship? That is, how do the categories of the 2 variables relate to each other? Correspondence analysis works with the table of probabilities but says nothing about significance. It really just aims to visualize the nature of the relationship between the 2 variables. With this in mind, again focus on what is really happening when we study this kind of relationship. In particular, let's take an intuitive look at what it means to have a significant relationship. Imagine, for example, that we did a little survey and discovered at the end of it that everyone who had blue eyes wore glasses. This could be a stronger relationship. But how about now if I said to you, in fact, this survey involved 4 people? As you can well imagine, without even doing a chi-squared test, you can already sense that this relationship is not statistically significant. So, how does correspondence analysis get a fix on the nearness or farness to independence? Let's first look at doing an analysis row by row. In this analysis, we use the independence model that the conditional probability given i equals the marginal probability. For this, in the table, we are going to divide each element in the row by its marginal. This gives us what's called the row profile, which is nothing but a conditional distribution. In this row, we have the distribution of the variable V2 given that we are in category i of variable V1. This row profile, we are going to compare it to the mean row profile, that is the marginal distribution of the variable V2. So correspondence analysis is going to compare each row profile to the mean profile. This is basically a multidimensional way to look at the deviation from independence, as we will simultaneously consider all the profiles. So, we are indeed comparing the conditional probability f_ij over f_i point with the marginal probability f point j over the whole set of j's. As this all sounds a little bit complicated, let's illustrate what we mean with our Nobel example. What does comparing a profile to the mean profile signify? Here is the table giving the raw profiles with each country as percentages. The sum of each row therefore gives 100. Now color in the columns, that is the price categories, with a block whose width is proportional to the percentage of that category in the mean profile, that is the marginal at the bottom of the table. So the physics block is quite wide, whereas the peace block is quite narrow. Now, for each row, that is each country, build a bar plot with each bar joined to the next to visualize that country's profile. Look at Italy, for example. The bar for Italy gives the distribution of the number of prizes won per category by Italians. More precisely, 31.6% of the prizes were in literature, for example. To get an understanding of this percentage, you have to compare it to the percentage of Nobel Prizes given in literature out of all Nobel Prizes over all the countries, which is 8.6%. Thus, the percentage of Nobel Prize winners in literature from Italy is particularly high. In this way, we can quantitatively compare the distribution of Nobel Prize winners in Italy to that of Nobel Prize winners from the G8 countries. This comparison of the Italian row profile with the mean profile helps us to answer the question: do Italians tend to win their Nobel Prizes in some categories rather than others? Now, we are going to study the same table but this time looking at the columns. Here, we are dealing with the independence model F_ij over F_j equals F_i point. We built the table including the column profiles. Look at column j. F_ij over F_j, it's the conditional probability to be in i given that we are already in j. The sum of terms in this column equals 1, so it's a probability distribution. Like for the rows, we can now build the mean column profile. This is made up of the term f_i point, which is the probability to be in i. The idea in correspondence analysis is to compare the column profiles with the mean profile. Again, it's a multidimensional approach for looking at the deviation from independence. Multidimensional because we're going to consider all the terms in a column, and compare them with all the terms in the corresponding mean column profile. Let's now look at our example and see what compare a column profile with the mean profile actually means. Here are the column profiles, which each sum to 100. We can color in each row with a block whose height corresponds to the values of that row in the mean column profile. Then, like before, for each column profile, we build the bar plot with the bars piled one on top of the other. This helps us see better what's going on. We then compare each profile to the mean column profile. For example, look at the literature column. The distribution of Nobel Prizes in literature by country seems to be quite different to the mean profile. For instance, the percentage of literature prizes given to Americans is very low in comparison to its overall performance, with 16.3% in literature compared with 45.1% overall. In contrast, in literature, France and Italy are overrepresented with respect to their overall piece of the Nobel pie. So when we compare this column profile to the mean profile, we are asking the following question: is the distribution of Nobel Prizes in literature per country The same as the distribution of all Nobel Prizes. We have now seen what types of data correspondence analysis works on. We have also seen how it involves comparing the data to an independence model. In the next video, we'll see how to visualize the divergence from independence by constructing a cloud for the rows and a cloud for the columns.
More from Yamossoun

Algorithme de calcule de la racine carrée par dichotomie #dichotomy #squareroot #algorithm









