Correspondence Analysis (part 3/5): Inertia and percentage of inertia

In this instructional lecture, the speaker explains how inertia and percentages of inertia serve as the primary indices for assessing the quality of a correspondence analysis (CA) representation. The quality of a point‑cloud projection onto a set of dimensions is measured as the ratio of projected inertia (the eigenvalues) to total inertia, expressed as a percentage. The speaker demonstrates calculations on a country‑price contingency table, showing that the first two dimensions capture roughly 79% of the deviation from independence, justifying a two‑dimensional interpretation. The total inertia in CA equals φ², which can be linked to a chi‑squared statistic. The lecture then discusses how the decreasing sequence of eigenvalues guides the choice of dimensions, illustrated with a wine‑descriptor dataset where the first two eigenvalues dominate. A key theoretical result—that CA eigenvalues lie between 0 and 1—is highlighted, and the special case of an eigenvalue equal to 1 is explored, representing a perfect block (exclusive) structure between rows and columns. This is illustrated with taste‑recognition confusion matrices, where an eigenvalue of 1 indicates perfect separation of sweet from other tastes, while lower eigenvalues (e.g., 0.375, 0.04) quantify the strength of confusion between sour and bitter. Finally, the Nobel Prize data example shows modest eigenvalues (0.083, 0.037), indicating weak, non‑exclusive associations across categories and countries. The speaker emphasizes that eigenvalues must be examined before interpreting CA plots because plots reveal the type of association but not its strength.
Chapters
We have now seen how to plot point clouds for the rows and point clouds for the columns, and how to project them onto graphical plots. In correspondence analysis, like all principal component methods, the first indices we want to look at are the percentages of inertia. We'll see in this section that in correspondence analysis, the inertia is a rather particular thing. Let's start by talking about the percentage of inertia. Like in all principal component methods, percentages of inertia are the first indices we look at. The question we want to ask is the following: we have a point cloud representation, how good is it? Generally speaking, the quality of the representation is measured with respect to the ratio of the projected inertia over the total inertia. Usually, we multiply this by 100 to get a percentage. In the precise case of a cloud N_i and the S dimensions, the quality of representation of the cloud N_i onto the S dimensions is the projected inertia of N_i onto these dimensions divided by the total inertia of N_i. We can write this in a way you've already seen with lambda_s over the sum of the lambda_k. As we just said, this is then given as a percentage. Let's look at the percentages of inertia in our example. We see that in the first dimension, the percentage of inertia is 54.75, which is quite high. We can therefore say that the first dimension represents 54.75% of the deviation from independence. In the second dimension, the percentage of inertia is 24.6. Thus, the first 2 dimensions together represent almost 79% of the deviation from independence. Essentially, this means that we can just stop and interpret these 2 dimensions only. Here is a mathematical property of what we have done: the projected inertia, that is the eigenvalues, can be added up from each dimension to the next. This comes from the fact that the dimensions are orthogonal. Therefore, the sum of all the eigenvalues, or the sum of the projected inertia if you like, equals the total inertia of the point cloud N_i. This is true for all principal component methods. In the particular case of correspondence analysis, this total inertia Equals phi squared. Let's do a few calculations using correspondence analysis on our example. We can multiply the total inertia 0.1522 by n, the sum of the table, which is 570, and we get a chi-squared value of 86.75. Given the number of degrees of freedom here, the p-value is 2.77. Times 10 to the power of -6, which is tiny. There is clearly a highly significant connection between the countries and the price categories in our example. Here is something else we can do with the percentages of inertia. As these decrease as the rank of the dimension increases, we can use this decreasing sequence as a guide to find a cutoff, that is, choose the number of dimensions to keep. As an example, here is the decreasing sequence of eigenvalues of a correspondence analysis on a contingency table facing off 10 white wines from the Loire region with 30 descriptors. The wines are in the rows, the descriptors in the columns, and X_ij is the number of times the descriptor j was associated with wine i. When we look at the decreasing sequence of eigenvalues using a bar plot, It's clear that the first 2 eigenvalues are much larger than the others. The first 2 dimensions therefore dominate in terms of inertia, suggesting that the best way to interpret the data is to just look at the plane defined by these 2 dimensions. In correspondence analyses, it is useful to distinguish between the inertia and the percentage of inertia because the inertia are themselves interesting. They make up part of phi squared, which gives a global measure of the link between 2 variables. In correspondence analysis, the following theoretical result is very important: the eigenvalues are always between 0 and 1. Recall that in principal component analysis, where the variables are standardized, it's different because the first eigenvalue is automatically greater than or equal to 1. What does it mean to have an eigenvalue of 1 in correspondence analysis? This limit case is quite interesting, as we will see. And what does the data look like in this case? Well, it's like this. We can separate the rows into 2 blocks, I_1 and I_2. The columns can also be separated into 2 blocks, J_1 and J_2. And suppose that this double division represents exclusivity between blocks. That is, rows of block I_1 are only linked with J_1, and not at all with J_2. And rows in block I_2 are exclusively linked with J_2, and not at all with J_1. This represents a very strong association, because we have an exclusive link between categories of one variable, and those of the other. What does this look like graphically? We end up with this graph. The first dimension, corresponding to the eigenvalue of 1, perfectly separates the block I_1 from I_2. That is, inside I_1, no distinctions are made, and we perfectly separate J_1 and J_2. Inside J_1, no distinctions are made. This curious inertia, let's look at them again in another dataset. This data is about recognizing 3 tastes: sweet, sour, and bitter. The experimental design is: for each taste, we have asked 10 people to try and recognize the taste of a sample they are given. Here is a little data table of results. Let's read it row by row. The sweet sample was identified as sweet 10 times out of 10 and never mistaken for sour or bitter. The sour sample was never taken for sweet but was once mistaken for bitter. Similarly, the bitter sample was never taken for sweet but 3 times mistaken for sour. When we now do correspondence analysis on this table, we obtain the first eigenvalue of 1, which is the signal telling us we have a diagonal block structure in the data. What this means is, if we look back at the table, we see that all the non-zero data is found in blocks along the diagonal. For instance, here, sweetness is only ever perceived as sweetness, and no other taste is ever perceived as sweet. We therefore have this eigenvalue of 1. The corresponding plot's first dimension therefore perfectly separates sweet and perceived sweetness with one point on top of the other, with bitter, perceived bitterness, sour, and perceived sourness all close together on the other side. Now let's move on to look at the second dimension. This separates bitter and perceived bitterness on one side from sour and perceived sourness on the other. It basically shows that bitter is usually perceived as bitter and sour as sour. And yes, this is exactly what happened. But when we look back at the data table, it's a little confusing. Sour isn't always perceived as such, and nor is bitter. How can we tease this out of the math? Well, quite simply by looking at the eigenvalues. If there had been no perception errors between sour and bitter, the eigenvalue would have been 1. But here, it's only 0.375, so much less than 1. This is the indicator that there has been confusion between sour and bitter, that is, from time to time, one is perceived as the other. This is clearly visible in the graphical output. On the first dimension, we have a kind of perfect situation in that we clearly see the separation between sweet on one side and sour and bitter on the other, with a much larger inertia in this separation than between sour and bitter. These 2 are much closer to each other than with sweet. So the plot clearly shows that there has been much more confusion between sour and bitter than between either of these 2 and sweet. Let's now look at another data table in which the confusion between the categories is increased. That is, this time sour was only perceived as such 7 times instead of 9, and bitterness was only correctly detected 5 times. Still, sweetness was always correctly detected, and nothing else was perceived as sweetness. So how does this affect the math? Well, we still find the first eigenvalue of 1 corresponding to the perfect separation between sweetness and the others. But now, for the second dimension, the eigenvalue has dropped from 0.375 to 0.04. Now look at the graphical output. It still looks similar to the previous one. The first dimension still perfectly separates sweet from the others. What's changed is that the separation between sour and bitter is much less than before. This is the way the plot tells us that there has been a lot of confusion between sour and bitter. This is what leads to the small eigenvalue of 0.04 associated with this second dimension. How about in the most extreme case where there is no confusion at all and the data table is diagonal? Well, we'd end up with 2 eigenvalues equal to 1. So what have we learned from the 2 examples we see here? We see that in both, the 2nd dimension is always showing the same thing: it's separating bitter and perceived bitterness from sour and perceived sourness. So basically, the second dimension means the same thing in both examples. It's showing that bitter is mostly perceived as bitter and sour as sour. But now, from one example to the other, overall it's not the same thing because in the first example we can say that recognition is good, whereas in the second it's pretty poor. This teaches us that the plot indeed shows the contrast between sour and bitter but says nothing about the strength of this contrast. It's the eigenvalue that's going to tell us whether the separation is strong or not. If it stays equal to 1, the separation is very strong and in fact represents a total separation, an exclusive relationship. If, on the other hand, the eigenvalue is tiny, like we see in the second example with 0.04, we've struggled to get a majority of the predictions right. Bitterness is only correctly recognized half the time, and sourness 7 times in 10. Really, this means that in correspondence analysis, we should always start by looking at the eigenvalues because it shows whether the links we find in the data are weak or strong. The graphical output doesn't show us this because it doesn't give information on the strength of links, only their type. Here, the link is simply that sour is mostly associated with perceived sourness and bitter with perceived bitterness. Let's now go back and have a look at the Nobel Prize data. We have already talked about the percentages of inertia of 55 and 25 and how these were large compared to the next dimensions. We therefore decided to keep just these 2 when moving to the interpretation phase. However, the actual values for the inertia are 0.083 and 0.037, which are quite weak, especially compared with the value 1. We would have had a value of 1 if there had been at least one exclusive association between categories and countries. For example, all the prizes for one category went to only one country, and that country had no prizes in any other category. Clearly, therefore, we are far away from this situation. Indeed, the Nobel Prizes for the various categories are well spread out across the countries. If we now look at the sum of the inertias, and knowing that in correspondence analysis this sum is phi squared, it can have at most a value of 5, if each of the inertias equals 1. We are very far from this case. Looking at the table again, we are clearly extremely far from having exclusive links between the categories of the 2 variables. We have seen that inertias have a specific meaning in correspondence analysis and should be analyzed before interpreting. In the next video, we'll see how correspondence analysis allows us to simultaneously look at the rows and the columns on the same plot.
More from Yamossoun

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









