Professional Documents
Culture Documents
Canezal - JT - DCEE23 - Practical Examination
Canezal - JT - DCEE23 - Practical Examination
Objectives:
At the end of the exercise, the students should be able to:
compute linear regressions using matrix operations in Google Colab.
compute polynomial regressions using matrix calculations in Google Colab.
perform linear regression analysis by computing matrices and plotting the results
in Google Colab.
familiarize students with the process of computing polynomial regressions
through matrix operations and generating visual plots using Google Colab.
Materials:
Android phone or computer with internet access
CvSU-provided Google account (to access Google Colab)
Instruction:
Solve the following problems analytically (manual computation) and by creating a
code on Google Colab. You will be required to plot data points and the linear /
polynomial model equation. Each problem must have an analytical solution and the
code used in solving the given problem. You can put your solution and coding below the
“Analytical Solution:” and “Coding on Google Colab:” titles, respectively.
Note: You will be using Google Colab to perform matrix operation to find the
determinants, coefficients and the model equation, and plotting data along with the
model equation.
DCEE23 – Numerical Methods and Analysis
Problem 1:
A study was done to compare the speed x (in miles per hour) with the mileage y
(in miles per gallon) of an automobile. The results are shown in the table.
Fit a linear model and a quadratic model for the data. Determine which model
better fits the data. Plot the data along with the linear and quadratic model.
DCEE23 – Numerical Methods and Analysis
Analytical Solution
DCEE23 – Numerical Methods and Analysis
Quadratic Model
DCEE23 – Numerical Methods and Analysis
Problem 2:
A basketball is dropped from a height of about 5.25 feet. The height of the
basketball is recorded 23 times at intervals of about 0.02 second. The results are shown
in the table.
Fit a linear model and a quadratic model for the data. Determine which model
better fits the data. Plot the data along with the linear and quadratic model.
DCEE23 – Numerical Methods and Analysis
Analytical Solution:
Linear Model
Quadratic Model