Guessing a number from past data
A cycle shop prices used cycles. Older cycles sell for less. Can a program learn that?
- Six used cycles. Each dot is one cycle.
- A line is drawn. It passes near the dots.
- A new cycle is 4 years old.
- 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…