Interactive Machine learning · Regression

Introduction to Regression, the game

Start your regression journey by playing. Five quick missions on what regression predicts, bias and variance, residuals and the whole regression family, then a boss quiz.

~12 minBeginner friendlyNo code needed5 missions395 XP
Mission 1+80 XP✓ Complete

What does regression predict?

Regression is a supervised machine learning technique that learns the relationship between independent variables (the inputs, also called features) and a dependent variable (the outcome). Its job is to predict a continuous number.

Example: predicting a house’s price from the number of rooms, the size of the land and the distance to the airport. The price is the dependent variable; rooms, land size and distance are the independent variables.

If the outcome is a category instead (spam or not spam, which species), that is classification, not regression.

🧠Quick check
+20 XP

In “predict a house’s price from rooms, land size and distance to the airport”, which is the dependent variable?

⚡Regression or classification?
1 / 6
correct on the first try
Mission 2+50 XP✓ Complete

Bias, variance and the dartboard

Bias is how far the model’s predictions are from the true values on average: a systematic miss. Variance is how much the predictions would change if you trained on a different sample of data: how jumpy the model is.

  • Underfitting: the model is too simple and does badly on training and test data. Usually high bias.
  • Overfitting: the model memorizes the training data and does badly on new data. Usually high variance.
  • Bias–variance trade-off: making a model more flexible lowers bias but raises variance. The goal is the sweet spot with the lowest total error.

Think of each dot below as one model trained on a different sample. The bullseye is the true value.

🎯Read the dartboard
+30 XP

Which dartboard shows high bias, low variance (a consistent but wrong model)?

🧠Quick check
+20 XP

A model scores 99% on its training data but only 60% on test data. What is happening?

Mission 3+70 XP✓ Complete

Coefficients and residuals

Regression coefficients tell you how the outcome changes with each feature. Their sign gives the direction of the relationship:

  • Positive: the outcome rises as the feature rises (salary with years of experience).
  • Negative: the outcome falls as the feature rises (a car’s fuel efficiency as its weight increases).

A residual is the vertical distance between a data point and the regression line: residual = actual − predicted.

FriendReal age (y)Your guess (ŷ)Residual (y − ŷ)
Amit108+2
Riya1512+3
Rahul2017+3

A good residual plot looks like random noise scattered evenly around zero, with no pattern.

🧠Quick check
+20 XP

Neha is 25 and you guessed 28. What is her residual?

⚡Positive or negative coefficient?
1 / 5
correct on the first try
Mission 4+90 XP✓ Complete

Meet the regression family

There isn’t one regression model; there is a whole family. Flip each card to meet them.

ŷ = β₀ + β₁x₁ + β₂x₂ + … + βₙxₙThe linear backbone that most of the family builds on
🃏Flip every card
0 / 6
⚡Pick the right tool
1 / 6
correct on the first try
Final boss+105 XP✓ Defeated

Defeat the Regression Boss 🐲

Seven questions, three hearts. Lose all three and the boss wins this round (you can try again).

Question 1 / 7
❤️❤️❤️

💥 The boss winsReview the missions above, then try again.

You’re a Regression Rookie Champion!

Share on LinkedIn
What’s next

Keep levelling up

You learned what regression predicts, the difference between dependent and independent variables, bias, variance, residuals, and when to reach for each type of regression.

Lv 1 Rookie0 / 395 XP