Forty students in a class, each measured on twenty things. Regress all twenty against basketball ability one at a time, rank them by correlation, and pick out the few that really matter. That is exactly what QSAR does — chemists just swap "students" for "molecules".
Regression cannot work on "this person", only on numbers. So the first step is to turn every student into a row of measurable values. In QSAR these values are called descriptors.
The last column, the basketball ability rating, is what we are trying to explain — an overall score the PE teacher gave after watching a semester of games, and a continuous value. In QSAR it corresponds to potency or toxicity: pIC₅₀, pKi, pLC₅₀.
The table scrolls sideways.
Before choosing features, there is a question that often gets skipped: is the column we are trying to explain measured well? "Basketball ability" cannot be seen directly; you have to pick a way of measuring it. This page uses the PE teacher's rating after a semester of games, but that is not the only option:
| Method | Strength | Problem |
|---|---|---|
| Teacher's rating (this page) | A holistic judgement that sees defence, passing and court sense | Subjective; a different teacher gives different scores |
| Skills test (spot shooting, timed dribbling) | Objective and repeatable | Measures skill only — and is the same thing as the shooting and dribbling columns |
| Game results (points or win rate with random teams) | Closest to real ability | Depends on teammates and opponents; needs many games to settle |
Then there is noise. Take shooting: someone whose true hit rate is 50% will often score anywhere from 34% to 66% over 10 shots (one SD either way), and only settles to within ±5% after 100:
| Shots taken | SD of the hit rate |
|---|---|
| 10 | ±16% |
| 50 | ±7% |
| 100 | ±5% |
A noisy y costs every feature. How well two measurements of the same person agree is called reliability (0 to 1), and it caps the correlation you can observe:
If the teacher's rating has a reliability of only 0.6, then even a feature perfectly related to true ability cannot reach an r² above 0.6 on the leaderboard. A low r² does not always mean a useless feature; it can mean a poorly measured y.
The simplest approach: take one feature, plot it against the ability rating, draw the line that fits best, and see how close the points sit to that line. The line is the regression; how close is measured by r² — 0 means no relationship at all, 1 means every point lies exactly on the line.
The correlation coefficient r is the covariance of the two variables divided by each one's spread:
This "try them one at a time and rank by r²" procedure has a name: univariate screening. The only difference is that a chemist is not working through 20 features but through more than 500.
The plot scrolls sideways.
The colours on the leaderboard are the answer key: really related has a catch peeks at the answer unrelated Real research comes with no colours — which is the whole point of section 5.
Three things in the full 40-student result are worth stopping on.
Height does sit near the top. You could have guessed that — but now you have a number, and you know what fraction of the variation in the rating it accounts for.
For the 50 m sprint, fewer seconds means better, so r is negative. Strength is |r|; the sign only tells you the direction.
The seat number has an r² of essentially zero and the scatter is a shapeless cloud. So do the IQ test, the math score and hours of sleep. That is what a control should look like.
This section is the heart of the manual. Ranking high is not the same as meaning something. Statistics only does the arithmetic; the interpretation rests on your understanding of the subject.
Shoe size really does correlate with the rating, and not far down the list. But big feet do not make anyone good at basketball — people with big feet are simply taller. Shoe size is measuring height.
Height, arm span, hand length and shoe size all cluster together. They look like four features; they are really one: this person is big. That is collinearity.
Practice hours correlates reasonably well. But do they practise more and get better, or get better and enjoy practising? Statistics cannot separate the two; both look identical on a scatter plot.
Baskets per minute tops the board. But it is part of basketball ability itself — predicting the answer from a piece of the answer is bound to work. This is data leakage.
The plots scroll sideways.
The dashed line on the leaderboard is the significance level (α = 0.05). Any r² below it is reachable by luck alone with this many students. Where the line sits depends on the sample size:
With 40 students the line sits at r² = 0.097. With only 8, it jumps to 0.499.
With the traps struck out, these are the features that actually hold up:
| Feature kept | Why |
|---|---|
| Height | Stands for the body-size cluster. Arm span, hand length and shoe size all say the same thing, so there is no need to keep them too. |
| Vertical jump | Stands for the athleticism cluster. |
| Sprint and shuttle-run times | The other face of the same cluster, negatively correlated. |
The skill measures — baskets, free throws, dribbling — rank highest, but they are ability itself, not its source. For someone who has never played, those numbers simply do not exist yet. Practice hours matter, but the causal direction is unclear.
Replace every term in this manual and you have a real QSAR study. The method is identical.
| One student | → | One compound |
| Height, shoe size, vertical jump | → | Molecular weight, logP, polar surface area |
| Basketball ability rating | → | Potency or toxicity (pIC₅₀, pKi, pLC₅₀) |
| 40 students in a class | → | 40 compounds |
| Try one at a time, rank by r² | → | Univariate screening, the first step of model building |
| Shoe size and height are one thing | → | Molecular weight and surface area are collinear |
| The D001–D100 random features | → | Spurious hits among 500+ descriptors |
| Find what makes someone good at basketball | → | QSAR |
With basketball you have intuition: you can see at a glance that "seat number" is nonsense.
With molecules you do not — nobody can tell by looking whether a given descriptor ought to matter.