Highlights
Task:
The exercises are based on the data for the temperature in City over 50 years used in last year’s “Exercise Linear Regression” (also available in the file ‘data-for-finalhomework.xlsx’ uploaded with this document). For the analysis you need a tool for linear regression (as provided, e.g., in LibreOffice) and a non-linear Solver (like we used for the logistic regression; alternatively, for those who do not have a Solver, below a number of possible values for the coefficients are provided that would need to be tested manually).
Exercise 1: Regression of temperature T against year (time), t = 1, ..., 50.
a. Use the linear regression tool to fit a linear function Pred1(t) = b0 + b1t with coefficients b0 and b1 to the observed T values. Alternatively, if you do not have a regression software, proceed as in the travel time example introduced in the course and predict T by the linear function Pred1(t) = b0 + b1t and manually minimise the Residual Sum of Squares. For this systematically try out all 9 combinations of intercept and slope (b0, b1) with b0 ? {7.04, 8.515, 14.652} and b1 ? {0.0149, 0.0343, 0.0388}.
b. What are the magnitudes of the fitted coefficients b0 and b1? And the associated magnitude ofthe Residual Sum of Squares?
c. Using the fitted coefficients b0 and b1, calculate the predicted values Pred1(t) for all t = 1, ..., 50.
d. Plot T (the original data) and Pred1 as functions of t.
e. Calculate and plot the residuals Res1(t) = T(t) – Pred1(t) as a function of t = 1, ..., 50.
f. Can you see a pattern in the residuals?
Exercise 2. We want to improve our model of the temperature dynamics and fit another function, called Pred2(t), to the residuals of exercise #1, Res1(t).
We hypothesise that an oscillating function (why?) of the type Pred2(t) = A·sin(f·(t – t0)) with three coefficients: amplitude A, frequency f and time intercept t0, might provide a good fit.
a. Use the non-linear Solver to fit the three coefficients A, f and t0 so that the Residual Sum of Squares is minimised. Proceed as in the course exercise for logistic regression: calculate the residuals Res2(t) = Res1(t) – Pred2(t) (which are basically the residuals with respect to the residuals of the linear regression from exercise #1) and minimise the sum of squares. In the parameterisation of the Solver specify, as in the course exercise, the cell to be minimised and the cells to be varied, and in addition the following constraints: A ≥ 0, f ≥ 0, t0 ≥ 0 and t0 ≤ 2? ? 6.282 (*).
This Engineering Assignment has been solved by our Engineering Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.