If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Calculating residual example

Calculating residual example.

## Want to join the conversation?

• How do we find the residual when there are two y values for one x value?
Thanks,
~HarleyQuinn
• Then it wouldn't be a function. Things that aren't functions really tick me off.
(1 vote)
• At around , why didn't he add the 1/3 to 52? I guess it's not too big of a difference but wouldn't that make the residual -1 and 1/3?
Thanks,
GoldenDoodle
• He already added the 1∕3 to 155∕3 to get 156∕3, which simplifies to 52.
• Where does the whole 1/3 part come in?
• The y-intercept and the slope are 1/3. The general equation for the least squares regression is

^
Y = b + mx.

where b is the why intercept and m is slope.

1/3 itself is just a preset value.
• why did sal put the line right there on the graph I do not understand that
• Where did he get the points for the graph?
• Sal probably had the points before we saw the video. I think he made up these numbers.
• At he said the line is trying to minimize the square between the distance why?
• So that it fits the data best
• @ ; Why did Sal plug in 155 as the x? Why is it not 51?
• The equation calculates the height of the bike frame, so that means our output (y) would be the bike frame's height and our input (x) would then be the height of the customer. So when we are plugging in a value for x we use 155 because that is the height of our customer while 51 is the height of the frame.

What if the "actual" numbers are a lot larger, like 12, or 28, or larger? I have a problem like this but when I use the equation given, I get huge numbers like 101 and 429, so when I do y-r (y-value minus residual) I get numbers like -89, which are too large to plot on my graph. What am I doing wrong?
(1 vote)
• How do you know which number is the "y" and which is the "x"? Because in this problem, he had a scatterplot which said that the frame size is the "y" axis, and the height is the "x" axis. That is why he knew that 51 is the given "y" and the 155 was the given "x" which he could use to figure out where the data point should have been according to the slope. But what if you don't have a chart that tells you which is which?