Skip to content
  1. IB Question Bank
  2. Maths AI
  3. Statistics & Probability
Topic 4.14 · HL only

Non-linear Regression, Evaluating least squares regression, sum of squares, and R^2: notes and practice questions

Summary
  • Non-linear regression: Used when a curve fits bivariate data better than a straight line.
  • Residual: Difference between actual and predicted value: Residuali=yi−f(xi) \text{Residual}_i = y_i - f(x_i)
  • Sum of Square Residuals (SSres SS_{res} ) (HL only): Sum of squared residuals; smaller SSres SS_{res} indicates a better model fit.
  • Standard non-linear models:
  • Linear: y=ax+b y = ax + b
  • Quadratic: y=ax2+bx+c y = ax^2 + bx + c
  • Cubic: y=ax3+bx2+cx+d y = ax^3 + bx^2 + cx + d
  • Exponential: y=abx y = ab^x or y=aebx y = ae^{bx}
  • Power: y=axb y = ax^b
  • Sine: y=asin⁡(bx+c)+d y = a\sin(bx+c) + d
  • Sum of Square Residuals formula (HL only): SSres=∑i=1n(yi−f(xi))2 SS_{res} = \sum_{i=1}^{n} (y_i - f(x_i))^2
  • Mean Squared Error (MSE): MSe=1nSSres MSe = \frac{1}{n} SS_{res}
  • Linearising using logarithms (HL only):
  • Power Model (y=axb y = ax^b ): ln⁡y=ln⁡a+bln⁡x \ln y = \ln a + b \ln x (linear between ln⁡y \ln y and ln⁡x \ln x ).
  • Exponential Model (y=abx y = ab^x ): ln⁡y=ln⁡a+xln⁡b \ln y = \ln a + x \ln b (linear between ln⁡y \ln y and x x ).
  • Finding non-linear regression equation: Enter data into GDC, select specified model, GDC calculates constants.
  • Evaluating least squares regression (HL only): Calculate SSres SS_{res} for each model; model with lowest SSres SS_{res} is the best fit.
  • Linearising data (HL only): Transform equation to linear logarithmic form, align with GDC's regression line (Y=mX+c Y = mX + c ), solve for original constants.
  • GDC tip: Plot scatter diagram and regression model graph for visual assessment of fit.
  • HL topics: Non-linear regression, linearising using logarithms, and evaluating least squares regression curves using SSres SS_{res} .
  • Model selection: Exam question will specify the exact regression model to use.
  • Extrapolation: Predictions made outside the original data range are unreliable.

How it is examined

The classic HL question fits two or three models to the same data and asks which is best, and the expected answer is not "the one with the highest R2R^2". The guide says so directly, so a full-mark answer weighs R2R^2 against the shape of the data and the context, including whether the model behaves sensibly outside the data range. SSresSS_{res} is compared between models rather than computed from the formula.

Key ideas
  • Regression with non-linear functions.
  • The evaluation of least squares regression curves using technology.
  • The sum of square residuals (SSresSS_{res}) as a measure of fit for a model.
  • The coefficient of determination (R2R^2), and its evaluation using technology.
Not assessed

Awareness that R2=1−SSresSStotR^2 = 1 - \dfrac{SS_{res}}{SS_{tot}}, and hence equals 1 if SSres=0SS_{res} = 0, may enhance understanding but will not be examined.

Linking questions

  • Links to other subjects: evaluation of R2R^2 in graphical analysis (sciences).

Practice questions

1 question · 1 hard

Question 1

HardPaper 3 · calculator24 marks
(a)(i)

Ms. Anya Sharma, a school principal, wants to investigate if the number of hours students spend studying affects their exam scores. This question asks you to review Ms. Sharma's methods and conclusions.

Ms. Sharma obtained a list of students from her school. She contacted them and asked them to fill in an anonymous questionnaire. Participants were asked to state their weekly study hours and their most recent exam score (out of 100). Of the 250 students on the list, 11 replied.

Ms. Sharma's results are summarized in the following table:

Student IDWeekly Study Hours (X)Exam Score (Y)
1550
2765
3860
41078
51270
6655
7972
81180
9445
101385
111860

Describe one way in which Ms. Sharma could improve the reliability of her investigation.

[1]
(a)(ii)

Describe one criticism that can be made about the validity of Ms. Sharma's investigation.

[1]
(b)

Ms. Sharma classifies Student 11 as an outlier and removes their data from the analysis. Suggest one possible justification for her decision to remove it.

[1]
(c)(i)

For the remaining ten student responses in the table, Ms. Sharma calculates the mean exam score to be 6666. Calculate the mean weekly study hours for these remaining responses.

[2]
(c)(ii)

Determine the value of rr, Pearson's product-moment correlation coefficient, for these remaining responses.

[2]
(d)(i)

Ms. Sharma decides to carry out a hypothesis test on the correlation coefficient to investigate whether increased weekly study hours are associated with higher exam scores. State why the hypothesis test should be one-tailed.

[1]
(d)(ii)

State the null and alternative hypotheses for this test.

[2]
(d)(iii)

The critical value for this test, at the 5% significance level, is 0.549. Ms. Sharma assumes that the population is bivariate normal. Determine whether there is significant evidence of a positive correlation between weekly study hours and exam scores. Justify your answer.

[2]
(e)(i)

Ms. Sharma wants to create a model to predict how changing weekly study hours might affect exam scores. To do this, she assumes that weekly study hours, XX, is the independent variable and the exam score, YY, is the dependent variable.

She first considers a linear model of the form Y=aX+bY = aX + b. Use Ms. Sharma's data to find the value of aa and of bb.

[1]
(e)(ii)

Interpret, referring to study hours and exam scores, what the value of aa represents.

[1]
(e)(iii)

Ms. Sharma then considers a quadratic model of the form Y=cX2+dX+eY = cX^2 + dX + e. Find the value of cc, of dd and of ee.

[1]
(e)(iv)

Find the coefficient of determination for each of the two models she considers.

[2]
(e)(v)

Hence compare the two models.

[1]
(e)(vi)

Ms. Sharma decides to use the coefficient of determination to choose between these two models. Comment on the validity of her decision.

[1]
(f)(i)

After presenting the results of her investigation, a colleague questions whether Ms. Sharma's sample is representative of all students in the school. A report states that the mean weekly study hours for all students in the school is 99 hours. Ms. Sharma decides to carry out a test to determine whether her sample could realistically be taken from a population with a mean of 99 hours. State the name of the test which Ms. Sharma should use.

[1]
(f)(ii)

State the null and alternative hypotheses for this test.

[1]
(f)(iii)

Perform the test, using a 5% significance level, and state your conclusion in context.

[3]

Every Non-linear Regression, Evaluating least squares regression, sum of squares, and R^2 question, marked for you

Every answer is marked mark by mark, IB-style, and the AI tutor helps when you are stuck.

Where marks are lost

  • Answering to the wrong accuracy. Two significant figures, or six, where the rule says exactly or three. Common wherever a GDC's full decimal display gets copied straight down.
  • Rounding an intermediate value and then using it in a later part. Costs a mark every time, and AI's multi-part modelling questions give it more chances to happen than AA's shorter, more self-contained ones.
  • Writing the answer and nothing else, where the mark scheme has an explicit M1 rather than an implied one. A bare answer cannot score full marks there.
Free. Every IB subject.
No card, no trial that runs out. Just a free account.
  • 50 marked answers a month
    Marked mark by mark, IB-style
  • Hints and mark schemes
    On every part of every question
  • 3,000+ questions
    All 6 subjects, SL and HL, mapped to the syllabus
  • Progress that adapts
    Your Study Profile picks what to practise next

Practise this topic as a session

Pick a difficulty and paper, and FourtyFive tracks your progress on this topic as you go.

or with email
FAQ

Questions,
answered.

Can't find what you're looking for? Email our student team.

What does Non-linear Regression, Evaluating least squares regression, sum of squares, and R^2 cover in IB Maths AI?

Non-linear regression: Used when a curve fits bivariate data better than a straight line. Residual: Difference between actual and predicted value: Residual_i = y_i - f(x_i). Sum of Square Residuals (SS_res) (HL only): Sum of squared residuals; smaller SS_res indicates a better model fit.

Is Non-linear Regression, Evaluating least squares regression, sum of squares, and R^2 SL or HL?

Non-linear Regression, Evaluating least squares regression, sum of squares, and R^2 is HL only. SL students are not examined on it.

How do I revise Non-linear Regression, Evaluating least squares regression, sum of squares, and R^2 for IB Maths AI?

Start from the core idea: non-linear regression: Used when a curve fits bivariate data better than a straight line. In the exam: the classic HL question fits two or three models to the same data and asks which is best, and the expected answer is not "the one with the highest R^2". The guide says so directly, so a full-mark answer weighs R^2 against the shape of the data and the context, including whether the model behaves sensibly outside the data range. Then practise exam-style questions, easiest first, writing out every step of your working before you check it.

How does FourtyFive help me practise Non-linear Regression, Evaluating least squares regression, sum of squares, and R^2?

FourtyFive has 1 Non-linear Regression, Evaluating least squares regression, sum of squares, and R^2 question. Every answer you write is marked mark by mark, IB-style, and you see where each mark was won or lost. Every part has a hint, the AI tutor helps you through the step you are stuck on, and your Study Profile picks what to practise next.

Is FourtyFive free for Non-linear Regression, Evaluating least squares regression, sum of squares, and R^2 practice?

Yes. A free account gives you 50 marked answers a month, and you do not need a card to sign up.

Can I handwrite Non-linear Regression, Evaluating least squares regression, sum of squares, and R^2 answers on an iPad?

Yes. In the FourtyFive iPad app you write your working by hand with Apple Pencil, the way you would on paper, and it is marked the same way.

Start with the IB question
bank built for you.

Free to start, no card needed. Thousands of syllabus-mapped questions, AI Examiner marking, your weakest topics first.