Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ Prompt 1 ] For Questions 1 - 7 , we apply tools for linear regression to fit a quadratic polynomial to a given dataset.

[Prompt 1] For Questions 1-7, we apply tools for linear regression to fit a quadratic polynomial to a given dataset. Recall that
hat()=(MxTMx)-1MxTy, where hat()=[hat(0)hat(1)hat(2)]
In what follows, given a dataset DTr={(xi,yi)}i=14={(1,2),(2,5),(3,13),(4,20)}, we will take steps to find the coefficients of a quadratic mode hat(Y)=hat(0)+hat(1)x+hat(2)x2.
Step 1: What is MxT? Choose one of the options below.
[11114916234]
1
1
1
[11112344916]
1
1
[1112439416]
1
1
1
[1114293164]
1
1
1
[Refer to Prompt 1] What is MxTMx?
[12344916111
0001]
0
1
0
1
1
[4103030100100354]
30
10
[4301035410010030]
10
30
[3015163010130]
1
10
[Refer to Prompt 1] What is (MxTMx){-1}?
Hint: Because this is not a 22 matrix, try using numpy in Python on your own Jupyter notebook (see starter code below):
1 import numpy asnp
2 help(np.array)
3 help(np.transpose)
4 help(np.linalg.inv)
import numpy asnp
help(np.array)
help(np.transpose)
help(np.linalg.inv)
[7.75-6.751.256.45-1.25-1.250.25]
1.25
1.25
-6.75
[7.751.25-6.750.25-1.25-1.256.45]
-6.75
1.25
[-6.75-1.250.251.25-6.25-1.251.45]
-6.75
0.25
[7.751.25-6.751.25-6.25-1.251.45]
-6.75
0.25
[Refer to Prompt 1] What is MxTy?
[459]
40
131
[131]
40
459
[40]
459
131
[40]
131
459
[Refer to Prompt 1] What is hat()0?(Answer as a real number with one decimal point.)
Type your answer...
1 point
[Refer to Prompt 1] What is hat()1?(Answer as a real number with one decimal point.)
Type your answer...
1 point
[Refer to Prompt 1] What is hat()2?(Answer as a real number with one decimal point.)
1 point
What would be your prediction hat(Y) for x=2?
5
2
5.9
25
hat()=(MxTMx)-1MxTy, where hat()=[hat()0hat()1hat(2)]
In what follows, given a dataset DTr={(xi,yi)}i=14={(1,2),(2,5),(3,13),(4,20)}, we will take steps to find the coefficients of a quadratic mode hat(Y)=hat(0)+hat(1)x+hat(2)x2.
Step 1: What is MxT? Choose one of the options below.
[11114916234]
1
1
1
[11112344916]
1
1
[1112439416]
1
1
1
[1114293164]
1
1
1
[Refer to Prompt 1] What is MxTMx?
[12344916111
0001]
0
1
0
1
1
[4103030100100354]
30
10
[4301035410010030]
10
30
[3015163010130]
1
10
[Refer to Prompt 1] What is (MxTMx){-1}?
Hint: Because this is not a 22 matrix, try using numpy in Python on your own Jupyter notebook (see starter code below):
]):}
1.25
-6.75
[7.751.25-6.750.25-1.25-1.256.45]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions