Solution (source code)

= Solution

Covariance-based <PCA> uses centered protein measurements in their original gram units. Its total <variance> is $218.4$. Correlation-based <PCA> first divides each centered food measurement by its sample <standard deviation>, giving nine unit-variance variables and total <variance> nine. Thus it is <principal component analysis on a correlation matrix>, not an equivalent rotation of the original unscaled measurements.

The <variances> of cereals and milk together account for $170.9/218.4\approx78.3\%$ of the original total. Consequently those variables have considerable influence on covariance-based <PCA>. Its first component is dominated by a cereal coefficient $-0.86$ opposed to milk $0.42$, broadly a cereal-versus-milk contrast. Its second is dominated by milk $0.83$, with cereals $0.40$ and fish $-0.29$. Its third is chiefly white meat $0.80$ versus fish $-0.52$, with a smaller negative milk term. Component signs may all be reversed without changing the analysis; the important features are relative signs and magnitudes.

After standardization, eggs and starch can contribute as strongly as large-variance foods. The first correlation-based component gives positive weight to meat, eggs, milk and starch, opposed principally to cereals and pulses/nuts; eggs now has coefficient $0.43$ despite its small raw <variance>. The second emphasizes fish and fruit/vegetables negatively, opposed especially to starch and white meat. The third contrasts white meat and fruit/vegetables with milk, fish and red meat. Thus standardization changes both the emphasis and the directions, rather than just the displayed units of the same components.

The <explained variance of a principal component> must use the appropriate total:
$$
\begin{array}{c|ccc|c}
\text{analysis}&\text{PC1}&\text{PC2}&\text{PC3}&\text{first three}\\\hline
\text{covariance}&71.1\%&14.1\%&7.1\%&92.3\%\\
\text{correlation}&44.6\%&18.2\%&12.6\%&75.3\%.
\end{array}
$$
Raw and standardized percentages describe different <variance> objectives and must not be compared as if one method were always superior.

\b[Standardize when relative patterns across variables, rather than their absolute gram-scale variation, should have equal marginal weight.] Correlation-based <PCA> is also insensitive to changing a variable's measurement unit, which covariance-based <PCA> is not. Here every food group already has the same units, so differing units do not force standardization. If large fluctuations in actual protein amounts are scientifically important, covariance-based <PCA> is appropriate. If dietary composition across all food groups is the focus, correlation-based <PCA> can be more informative. Standardization can nevertheless amplify noise in nearly constant variables; the decision should follow the scientific purpose and measurement reliability.