Dev.to WebDev 🛠 Dev 👁 0 📖 4 min read

Reverse-scoring a personality quiz so agree-with-everything does not break it

Most personality quizzes end the same way: they pick your highest trait and hand you a label. That works, but it throws away the interesting part — how close your top two were, and whether any of the answers were actuall

Most personality quizzes end the same way: they pick your highest trait and hand you a label. That works, but it throws away the interesting part — how close your top two were, and whether any of the answers were actually yours or just a response pattern.

I built a seven-trait quiz (seven deadly sins, played for laughs) and had to solve a few scoring problems that turned out to be more interesting than the UI.

The instrument

21 statements, three per trait, each rated on a 7-point scale from disagree to agree. Three per trait is a compromise: fewer and one sloppy answer swings the result; more and the thing stops being fun to finish. 21 items takes about three minutes.

Every trait ends up with a score from 0 to 100, and all seven are drawn on a radar chart so you can see the shape, not just the peak.

The acquiescence problem

The first version had a bug that is not really a bug: people who agreed with everything scored high on all seven traits. The radar chart came out as a near-perfect circle, which looked broken but was an honest reflection of the input.

This is acquiescence bias — the tendency to agree with statements regardless of content. You can't fix it by telling people "answer honestly". You fix it in the instrument.

The fix: one of the three statements per trait is reverse-worded. If the trait is sloth, two statements describe avoiding effort and one describes the opposite. Agreement with the third one pulls the score down.

In code the scoring is deliberately boring:

// ratings are 1..7
const sum = items.reduce((acc, item) => {
  const value = item.reverse ? 8 - item.rating : item.rating;
  return acc + value;
}, 0);

const score = Math.round(((sum - 3) / 18) * 100); // 3 items, min 3, max 21

Two properties matter here:

  • Neutral is 50, not 0. Someone who picks the middle on all three statements lands at 50. That is the honest reading of "no opinion", and it keeps the chart from collapsing to the centre.
  • 0 and 100 are reachable but rare. They require extreme answers on all three items, including a disagreement with a statement worded in the opposite direction.

Making the chart readable

The radar chart is plain SVG — a polygon grid, one axis per trait, and a <polygon> for the result shape. No chart library: at seven points the maths is a loop over angles, and a library would have cost more than it saved.

const points = traits.map((trait, i) => {
  const angle = (Math.PI * 2 * i) / traits.length - Math.PI / 2;
  const r = (trait.score / 100) * radius;
  return [cx + Math.cos(angle) * r, cy + Math.sin(angle) * r];
});

The one design decision that mattered: label placement. Seven labels around a circle collide on narrow screens. Rotating the label text with the axis looked tidy on desktop and unreadable on a phone, so the labels stay horizontal and the chart shrinks instead.

The compare link

The most-used feature is not the result — it's sending the result to a friend.

The compare link carries the score vector in the URL fragment, not the query string:

#c=62,48,71,33,55,80,44

A fragment means the server never sees it, it is not logged, and it does not end up in a referrer header. When a friend opens the link and finishes the test, the two vectors are rendered side by side with an overlap percentage — the mean absolute difference converted to a similarity score.

It is crude, and it works better than any "share your result" button I tried, because it gives the second person something to do rather than something to look at.

Result framing

The result page is dressed as a mock classified file: a primary deviation, a stamp for the top score band, a short write-up, a tongue-in-cheek fix. That framing is doing real work — a bare bar chart reads as a survey, while a case file reads as a joke about yourself, which is what people are actually there for.

What I would change

  • Three items per trait is tight. It is enough to avoid single-answer noise, not enough for real reliability. If this were anything other than entertainment I would need at least five and a proper validation pass.
  • Reverse-worded items confuse people. They do their job, but some users re-read the statement three times. A short note before the first reverse item would probably help.
  • The 0–100 scale invites over-reading. A score of 83 looks precise. It is three answers.

Try it

If you want to see the scoring in action: 7 Deadly Sins Test — free, no account, results in the browser.

Happy to go into detail on the scoring or the SVG chart if anyone is building something similar.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.