A hundred and thirty observations of six predictors that all share a common factor. The outcome depends on a contrast between them — roughly the first two minus the last two — which is a direction with very little variance once the predictors are standardised. Component 1 carries 92.90% of the predictor variance and correlates −0.0012 with the outcome. Component 5 carries 1.23% and correlates −0.5297. Keeping components until 95% of variance is explained would keep the first two, at a cross-validated error of 1.3384; keeping five gives 0.6883.
130 rows · 6 predictors · 6 components available
Component 1 carries the most variance — component 5 carries the outcome
The largest component holds 92.90% of the predictor variance and correlates -0.0012 with the outcome. The one that actually predicts holds 1.23% and correlates -0.5297. Selecting components by variance would discard the useful direction, and the variance table gives no warning.
Largest component holds
92.90%
of the predictor variance
Its link to the outcome
-0.0012
essentially none
Components that minimise error
5
cross-validated error 0.6883
The 95% variance rule keeps
3
error 1.1545
Every component: variance against usefulness
Variance share, cumulative variance, outcome correlation and cross-validated error for each component
Component
Variance share
Cumulative
Correlation with outcome
Error using this many
1
92.90%
92.90%
-0.0012
1.35282
2
1.82%
94.72%
0.1524
1.33844
3
1.64%
96.36%
-0.3860
1.15447
4
1.33%
97.70%
0.2603
1.05984
5
1.23%
98.93%
-0.5297
0.68834
6
1.07%
100.00%
0.0939
0.69092
Least squares
—
100.00%
—
0.69092
Read the second and fourth columns together. They are computed from different things — variance from the predictors alone, correlation against the outcome — and nothing ties them. The components are built without looking at the outcome at all, which is what makes the method a dimension reduction rather than a fit, and also what allows the biggest direction to be irrelevant.
The variance shares sum to exactly 1, and using every component reproduces ordinary least squares exactly — the suite confirms both to 1e-12 and 0.0e+0. That is the check that the components span the same space as the original predictors, so nothing has been lost until one is dropped.
The fix for this failure is to build the directions against the outcome rather than ignoring it, which is what partial least squares does. On this same dataset its first component carries 1.43% of the variance, correlates 0.7155 with the outcome, and beats every principal component fit on its own.
Variance and correlation Error at every count The 95% rule priced Least squares beside it Exact at full rank
What this tool shows
Component 1 carries 92.90% of the predictor variance and correlates −0.0012 with the outcome. Component 5 carries 1.23% and correlates −0.5297. Principal components are built from the predictors alone — the outcome is never consulted — so nothing forces the biggest directions to be the useful ones. The familiar rule of keeping components until 95% of variance is explained would keep the first two here, at a cross-validated error of 1.3384 against 0.6883 for five. Following the rule roughly doubles the error, and the variance table gives no warning at all.
Every component with its variance share beside its correlation with the outcome
Cross-validated error at every component count, so the choice is priced
What the 95%-of-variance rule of thumb would keep, and what that costs
A flag when the largest-variance direction is not the most outcome-related one
Least squares beside the table, which is what using every component gives
The exact identity that the components span the original predictor space
Variance and correlation Error at every count The 95% rule priced Least squares beside it
The components are chosen without looking at the outcome. That is the method and the risk.
Updated 13 September 2026 · Works in any browser, no installation
Principal component regression replaces correlated predictors with a few uncorrelated directions built from them, then regresses on those. The directions are chosen to capture as much variance in the predictors as possible, which makes the method a clean dimension reduction and creates its central weakness: variance in the predictors is not the same thing as relatedness to the outcome, so the largest direction can be irrelevant and the smallest can be the one that matters.
At a glance
Formula shown
The predictors are standardised and their correlation matrix is decomposed into eigenvectors, ordered by eigenvalue. The first k components are the projections onto those directions, and the outcome is regressed on them. Using all p components reproduces ordinary least squares exactly, since the components span the same space; dropping any is where the regularisation happens — and which ones to drop is decided by predictor variance, not by the outcome.
Scenario support
Spectroscopy and other measurement channels that move together, survey batteries with many overlapping items, economic indicators sharing a cycle, sensor arrays, and any regression where predictors are so collinear that least squares coefficients become unstable.
Educational estimate
Planning support from the values you enter — not professional advice.
The 92% that predicts nothing
The preset has six predictors that all share a common factor, and an outcome that depends on a contrast between them — roughly the first two minus the last two. That contrast is a real, strong relationship. It is also a direction with very little variance, because the predictors mostly move together and a contrast between things that move together is small.
The decomposition finds what it is designed to find. Component 1 is essentially the common factor, and it carries 92.90% of the predictor variance. Its correlation with the outcome is −0.0012.
Component 5 carries 1.23% of the variance and correlates −0.5297. It is nearly the whole story, and by the ordering the method uses it is almost the last thing you would keep.
The practical damage runs through the selection rule. Keeping components until 95% of variance is explained is the most commonly taught heuristic, and on these data it keeps the first two — at a cross-validated error of 1.3384. Five components give 0.6883. The rule of thumb roughly doubles the error, and every number it consults looks perfectly healthy: the first two components explain 94.72% of the variance, which sounds like almost everything.
This is why the correlation column sits beside the variance column on every run. They are computed from different things and nothing ties them together, so seeing only one of them is how the mistake gets made.
Choosing the number of components
There are two families of rule, and they can disagree completely. Variance rules — keep 95%, keep components with eigenvalues above one, look for the elbow in a scree plot — consult only the predictors. Error rules consult the outcome through cross-validation.
On well-behaved data the two agree, and the variance rules are cheaper and more familiar. On data like the preset they diverge sharply, and the variance rules are wrong in a way that leaves no trace in their own output.
The table here reports cross-validated error at every component count so the choice is priced rather than assumed. Notice that the error is not monotone: it falls to a minimum at five components and rises slightly at six. That rise is the regularisation doing its job — the last component adds more noise than signal — and it is the only honest basis for stopping.
The fix is to look at the outcome
If the problem is that the directions were chosen without consulting the outcome, the fix is to consult it. Partial least squares builds each direction to maximise covariance with the outcome rather than variance in the predictors.
On this same dataset its first component carries 1.43% of the predictor variance — a direction principal components would rank near the bottom — and correlates 0.7155 with the outcome. Its cross-validated error with one component is 0.6718, which beats the best principal component fit using five.
That is not a reason to always prefer it. Supervised directions use the outcome, so they can overfit it in a way unsupervised ones cannot, and the difference matters most when the sample is small. What it does mean is that when principal components need many components to reach a decent error, the ordering is probably fighting you, and switching is worth trying.
The other alternative is not to reduce dimensions at all. Ridge handles collinearity by shrinking every direction in proportion to how poorly determined it is, rather than keeping some entirely and discarding others. It is the smoother version of the same idea and usually the safer default.
What the components are not
A component is a weighted combination of every predictor, so a coefficient on a component is not an effect of any variable. Papers routinely name components — “the size factor”, “the quality factor” — and then discuss them as though they were measured things. They are directions in a standardised coordinate system, and their loadings change if a predictor is added or dropped.
The page reports coefficients back on the original predictor scale for that reason: those are interpretable in the ordinary way, and they are what the fit actually implies about each predictor.
Components are also not scale-free in any deep sense. They are computed here from the correlation matrix, so each predictor contributes equally regardless of its units — but that itself is a decision. Computing them from the covariance matrix instead would let a predictor measured in large numbers dominate the first component entirely, which is a different and usually worse answer.
Reporting it
Report the correlation between each retained component and the outcome, not just the variance explained. It costs one column and it is the number that says whether the reduction kept anything useful.
State how the component count was chosen. “Components explaining 95% of variance” and “the count minimising cross-validated error” are different procedures that can give very different models, and the first can be badly wrong without looking wrong.
Give the error at the full component count as a reference. That is ordinary least squares, and if the reduced model does not beat it there was no benefit to reducing — only a loss of interpretability in exchange for nothing.
Sources and methodology
References for the method and its known failure mode.
Method. Predictors are standardised and their correlation matrix is decomposed by cyclic Jacobi rotations, giving eigenvectors ordered by eigenvalue. The outcome is regressed on the leading components, and the count is chosen by k-fold cross-validation over every possible number. The suite confirms two exact identities: the variance shares sum to 1 to within 1e-12, and using every component reproduces ordinary least squares to 0.0e+0 — which is the check that the components span the original predictor space, so nothing is lost until one is dropped. It further confirms that the largest-variance direction is usually not the most outcome-related one on data built that way, in at least 70% of generated datasets. That engine is verified on every change against 395 assertions. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
Partial Least SquaresBuild regression components against the outcome rather than from predictor variance, with the unsupervised decomposition computed beside it for comparison.
Ridge RegressionFit ridge regression across a penalty path chosen by cross-validation, with least squares beside it and the shrinkage applied to every coefficient shown.
EigenvalueEigenvalues and the characteristic polynomial up to 6×6 — the polynomial exact and the roots decimal, because roots of a polynomial are generally irrational.
Covariance MatrixSample covariance and correlation matrices with eigenvalues, determinant and condition number, so redundancy spread across several variables cannot hide from a pairwise scan.
Multiple RegressionFits several predictors with a VIF on every term, and names the configuration people misread: a model significant at p = 0.0103 where neither predictor reaches 0.05, at a VIF of only 7.11.
VIFVariance inflation factors with Belsley-Kuh-Welsch condition indices and variance-decomposition proportions, so a near-dependency is named rather than only detected.
An educational tool. Principal components are chosen from the predictors alone, so selecting them by variance explained can discard the directions most related to the outcome. Component coefficients are not effects of individual predictors, and loadings change when predictors are added or removed. Components here are computed from the correlation matrix, which weights every predictor equally regardless of units.