Lecture 15 · room 204
HEMA · Università Cattolica del Sacro Cuore, Rome
Tuesday 17 November 2026
Lecture 14 · Principal components · Mon 16 Nov
| Time | Min | |
|---|---|---|
| 10:00 | Last time · Set 12, the In class questions | 15’ |
| 10:15 | From a table to distances: chi-square | 45’ |
| 11:00 | Reading the map — and what not to read | 30’ |
| 11:30 | Break | 15’ |
| 11:45 | Lab: from a survey file to the map | 65’ |
| 12:50 | Set 13 | 10’ |
“Where does our brand sit in the customer’s head?”
Correspondence analysis draws that table as a picture. It is PCA for counts, and it is the standard tool of brand positioning.
| Reliable | Cheap | Innovative | Premium | |
|---|---|---|---|---|
| Brand A | 320 | 40 | 210 | 180 |
| Brand B | 90 | 410 | 60 | 20 |
| Brand C | 150 | 60 | 380 | 150 |
| Brand D | 260 | 30 | 110 | 350 |
Two brands are similar if their row profiles — the counts divided by the row total — are similar. Not the raw counts: B was mentioned more often than D, and that alone means nothing.
A: (.43, .05, .28, .24). D: (.35, .04, .15, .47). Similar on reliable, apart on premium.
Between two row profiles r_i and r_{i'}:
d^2(i, i') \;=\; \sum_{j} \frac{(r_{ij} - r_{i'j})^2}{c_j}
where c_j is the column’s overall share.
Note
Total inertia — the table’s whole spread — is \chi^2 / n from the independence test. CA decomposes exactly the departure from independence.
Rows near each other: similar profiles. Columns near each other: attributes that go together. That much is exact.
The misreading in every third marketing deck
Attention
Never present a CA map without the percentage of inertia on each axis. A map that explains 35% of the table is a sketch, and should be called one.
library(FactoMineR); library(factoextra)
tab <- as.table(rbind(A = c(320, 40, 210, 180), B = c(90, 410, 60, 20),
C = c(150, 60, 380, 150), D = c(260, 30, 110, 350)))
dimnames(tab)[[2]] <- c("Reliable", "Cheap", "Innovative", "Premium")
chisq.test(tab) # is there anything to map at all?
ca <- CA(tab, graph = FALSE)
fviz_ca_biplot(ca, repel = TRUE) # the perception mapca$eig gives inertia per axis. Put the two percentages on the plot’s axis labels before anyone sees it.
Those four sentences are the analysis. The map exists so a marketing director can check them in ten seconds.
brands.csv on Blackboard: one row per respondent, columns brand and attribute — each respondent named up to three.
library(tidyverse); library(FactoMineR); library(factoextra); library(here)
resp <- read_csv(here("data", "brands.csv"))
tab <- table(resp$brand, resp$attribute) # the contingency table
chisq.test(tab)$p.value # < 0.05 or stop here
ca <- CA(tab, graph = FALSE); round(ca$eig[1:3, 2], 1)
fviz_ca_biplot(ca, repel = TRUE) + labs(title = "Brand perception, 1 200 respondents")Then, in pairs: write the four sentences for this map. Swap with the pair next to you. Where do you disagree, and is it the map or the reading?
Correspondence analysis · about 40 minutes · before Mon 23 Nov
Not graded. The test is a mirror, not an exam.
?FactoMineR::CA, factoextra::fviz_ca_biplotStatistics & Big Data · HEMA, Università Cattolica del Sacro Cuore