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.

### Course: Statistics and probability>Unit 15

Lesson 2: Nonlinear regression

# Comparing models to fit data example

Sal determines if a quadratic or exponential model fits the data better, then uses the model to make a prediction.

## Want to join the conversation?

• Is there another more "mathematical way to prove which function is a better fit, because Sal's method of counting and eyeballing seems a little unreliable to me.
• the way of measuring the summed (or averaged) distance of predictions from real datapoints applies not just to a linear model

it works for any shapes of model including the two types in video

and one of the simplest way is to sum (predict-real)^2 over all datapoints, compare this value of each model, pick the smallest one. cause it "fits" best to the real values
(1 vote)
• If the years scale (x) was a tad longer, would the exponential function fit better then? (since the quadratic function starts rising up but the prices don't)
• We don't know what the curves look like after 5 years. However, based on the data given, the exponential curve fits the data points far better than the exponential curve. A possible real life answer could be that as the older the movie gets, the rarer and more difficult it gets to find it. It would be reasonable to expect to pay a premium to watch it.
• I keep trying to find what R^2 and R are, but I can't find anything. What are they?
(1 vote)
• R is the linear correlation coefficient, it shows the relationship between the two variables. The closer R is to 1, the stronger positive relationship it is. The closer R is to -1, the stronger negative relationship it is.
Now, R^2 is the coefficient of determination, which is the proportion of variation in Y that is explained by the X regression model.The bigger R^2, the more accurate the model is in accounting for the relationship between X and Y.
Hope this helps!
• I have two sets of data (both experimental) which are non-linear, and I'm looking for some ways to tell how fit they are with each other. Is there a similar coefficient (like R-squared) which can be used for this?

Thank you!
(1 vote)
• How would you do this using an F-Test?
(1 vote)
• I still don't get it. Can someone explain in a more understanding way because I am so confused right now?
(1 vote)
• Can someone tell me how to re-express this data to make it linear?
Weight: 2 5 8 10 20 40 60 80 100 120
Food: 1/3 2/3 2 9/8 2 13/4 13/3 5.5 6.5 22/3
(1 vote)
• @ What is Perseus one? Is this a new feature coming soon?
(1 vote)
• No. Sal is able to see the meta data on the page and is able to change it to alter the data to change the questions. I imagine Perseus one is just an extension of this ability.