ECOR 2606 ABC

10
John Hammond
[email protected]
408 MacOdrum Library
Thursdays 4:00 – 5:00
ECOR 2606 ABC
Opener: Find the Mistake! (10 minutes)
οƒ˜ Two teams compete in a game of Jeopardy by answering various questions involving
general least squares, linear regression, and MATLAB.
General Least
Squares
$100
$200
$300
Linear
Regression
$100
$200
$300
Notes:
Closer: Temperature Checks! (10 minutes)
MATLAB
$100
$200
$300
John Hammond
[email protected]
ECOR 2606 ABC
10
408 MacOdrum Library
Thursdays 4:00 – 5:00
General Least Squares - $100
Given the following table of x and y-values, derive the Z-matrix needed in order to fit a linear
equation to the data in the form y=mx+b.
x
1
y
6
3
4
5
2
6
2
General Least Squares - $200
1
3
For the Z-matrix, [
5
6
x
1
y
6
3
4
5
2
6
2
Find 𝑍 𝑇 𝑦
1
1
], and the data:
1
1
10
John Hammond
[email protected]
408 MacOdrum Library
Thursdays 4:00 – 5:00
ECOR 2606 ABC
General Least Squares - $300
71
With 𝑍 𝑇 𝑍 = [
15
15
]
4
40
and 𝑍 𝑇 𝑦 = { }
14
Before performing any calculations, give your best guess of the equation of the line. Then,
calculate the equation of the line.
Linear Regression - $100
Complete the following table:
x
1
2
3
4
y
2
3
6
9
x2
Ξ£
Linear Regression - $200
Solve for the slope of the linear equation that best fits the data.
Linear Regression - $300
Determine the y-intercept of the linear equation.
xy
John Hammond
[email protected]
10
408 MacOdrum Library
ECOR 2606 ABC
Thursdays 4:00 – 5:00
MATLAB – MATLAB - $100
You used polyfit to fit the following data points with a 3 rd order polynomial
x
1
y
6
3
4
5
2
6
2
What is the value of this polynomial at x=3?
MATLAB - $200
Write the MATLAB code necessary to import the file, PASSdata.txt, where the x-values of an
experiment are in the first column and the y-values of the experiment are in the second
column. Your code should determine a cubic equation that fits the data.
MATLAB - $300
The variables, x and y, are already imported into MATLAB Write the code necessary to plot the
second order polynomial least squares parabola along with the data points on the same graph.
Bonus Question:
You suspect that the following data could be fitted with the function: y=a0sin(x) + a1 +a2x2
x
1
y
6
3
4
5
2
6
2
Write the Z-matrix required to use general least squares.