Skip to content
Your progress

Checking your sign-in…

Who's learning?

Each profile keeps its own read lessons, badges, streak, and practice scores on this device.

Lesson 1 of 9

Guessing a number from past data

Show on a big screen

7 min

Text size

A cycle shop prices used cycles. Older cycles sell for less. Can a program learn that?

Six used cycles. Each dot is one cycle.
Step 1 of 4
  1. Six used cycles. Each dot is one cycle.
  2. A line is drawn. It passes near the dots.
  3. A new cycle is 4 years old.
  4. Read the line at age 4. The guess is about ₹3,400.

Yes, a program can learn a line from past prices. It reads a new price from that line.

Regression is a way to guess a number from past data. The answer can be any number in a range, like a price. A range runs from a low number to a high one.

Here the line slopes down: it goes lower as age rises. A cycle two years older gets a guess about ₹930 lower.

Regression learns from past numbers and guesses a new number.

Watch out!

Trust the line less far from the dots. The dots cover ages 1 to 7. Ages 0 and 8 lie outside them. There the line had no dots to learn from. So the guess is weaker.

Slide the age. Find the age for each target price.

Loading lab…

Try the lab to finish this lesson.