S7-SA3-0374
What are Residuals in Regression?
Grade Level:
Class 12
AI/ML, Physics, Biotechnology, FinTech, EVs, Space Technology, Climate Science, Blockchain, Medicine, Engineering, Law, Economics
Definition
What is it?
In regression, a residual is the difference between the actual value observed and the value predicted by our model. Think of it as the 'error' or 'leftover' amount that the model couldn't explain for a particular data point.
Simple Example
Quick Example
Imagine you predict your friend will score 80 marks in a maths test. When the results come, they actually scored 85 marks. The residual here is 85 (actual) - 80 (predicted) = +5 marks.
Worked Example
Step-by-Step
Let's say we have a model that predicts the price of chai based on the number of tea leaves used.
Step 1: We observe a chai stall uses 5 tea leaves and sells chai for Rs 12. This is our actual value.
---Step 2: Our regression model predicts that for 5 tea leaves, the chai price should be Rs 10. This is our predicted value.
---Step 3: To find the residual, we subtract the predicted value from the actual value.
---Step 4: Residual = Actual Price - Predicted Price
---Step 5: Residual = Rs 12 - Rs 10
---Step 6: Residual = Rs 2
So, the residual for this chai stall is +Rs 2. This means our model underestimated the price by Rs 2.
Why It Matters
Understanding residuals helps us check how good our prediction models are. From predicting crop yields in agriculture to forecasting stock prices in FinTech, or even understanding how a new medicine affects a patient, residuals tell us where our predictions went right or wrong. Engineers use them to refine designs, and scientists use them to improve their theories.
Common Mistakes
MISTAKE: Students often calculate residual as Predicted - Actual. | CORRECTION: Always remember it's Actual Value - Predicted Value. A positive residual means the model underestimated, and a negative residual means it overestimated.
MISTAKE: Thinking that a residual of zero means the model is perfect for all data. | CORRECTION: A residual of zero for one data point means the model predicted that specific point perfectly. We need to look at all residuals to judge the overall model performance.
MISTAKE: Confusing residuals with errors in data collection. | CORRECTION: Residuals are about the model's prediction accuracy, not mistakes in measuring the actual data. Data collection errors are a separate issue.
Practice Questions
Try It Yourself
QUESTION: A model predicts a mobile phone will cost Rs 15,000. The actual cost is Rs 14,500. What is the residual? | ANSWER: Residual = 14,500 - 15,000 = -Rs 500
QUESTION: If the actual distance an auto-rickshaw travelled was 7 km, and the model predicted 7.8 km, what is the residual? What does a negative residual mean here? | ANSWER: Residual = 7 - 7.8 = -0.8 km. A negative residual means the model overestimated the distance.
QUESTION: A weather model predicted the temperature in Mumbai would be 30°C. The actual temperature recorded was 32°C. For another day, the model predicted 28°C, and the actual was 27°C. Calculate the residuals for both days. Which prediction was closer to the actual temperature in terms of magnitude of error? | ANSWER: Day 1 Residual = 32 - 30 = +2°C. Day 2 Residual = 27 - 28 = -1°C. The prediction for Day 2 was closer to the actual temperature (magnitude of error is 1°C vs 2°C).
MCQ
Quick Quiz
What does a residual of +10 mean in a regression model?
The model overestimated the actual value by 10.
The actual value was 10 units less than the predicted value.
The model underestimated the actual value by 10.
The model predicted the value perfectly.
The Correct Answer Is:
C
A positive residual means Actual - Predicted > 0, which implies Actual > Predicted. So, the model predicted a value smaller than the actual, meaning it underestimated.
Real World Connection
In the Real World
Cricket analysts use regression models to predict a batsman's score or a team's total. Residuals help them see how much a player over- or under-performed compared to the model's expectation. This helps selectors understand player form and strategy. Similarly, e-commerce platforms like Flipkart or Amazon predict delivery times, and residuals tell them how often their predictions match actual delivery times, helping them improve logistics.
Key Vocabulary
Key Terms
ACTUAL VALUE: The real, observed data point. | PREDICTED VALUE: The value estimated by the regression model. | REGRESSION: A statistical method to find the relationship between variables. | ERROR: Another term for the difference between actual and predicted values.
What's Next
What to Learn Next
Now that you understand residuals, you can explore 'Sum of Squared Residuals' (SSR) and 'R-squared'. These concepts use residuals to tell us how well a regression model fits the entire dataset, helping us compare different models.


