We all know that when the temperature of a metal increases, it begins to expand. So, we experimented with exposing a metal rod to different temperatures and recorded its length as follows: Temp 20 25 30 35 40 45 50 55 60 65 Length 0.5 1.8 5 6 6.2 6.5 7.8 9.4 9.8 10.9 Required: 1. Implement and plot a simple linear regression for the above data, where the temperature is "x", and the length is "y" 2. Implement and plot a multiple linear regression "Polynomial regression" with different degrees. For example, Degree of 3: Y =W₁X¹ + W₂X² + W3x³ + W4 Where w4 represents bias. *you can use normal equation to calculate 'W' as follow: W = (XT.X)1.(XT.Y) Then calculate Y, Where Y = X.WT 3. Try degree of 2, 3, 5, and 8

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question
We all know that when the temperature of a metal increases, it begins to expand. So,
we experimented with exposing a metal rod to different temperatures and recorded its
length as follows:
Temp
Length
20
25
30
35
40
45
50
55
60
65
0.5
1.8
5
6.2
6.5
7.8
9.4
9.8
10.9
Required:
1. Implement and plot a simple linear regression for the above data, where the
temperature is "x", and the length is "y"
2. Implement and plot a multiple linear regression "Polynomial regression" with
different degrees.
For example, Degree of 3:
Y = Wix' + w2x? + w3x? + W4
Where wa represents bias.
*you can use normal equation to calculate W' as follow:
w = (X".X)4.(XT.Y)
Then calculate Y, Where Y = X.WT
3. Try degree of 2, 3, 5, and 8
Transcribed Image Text:We all know that when the temperature of a metal increases, it begins to expand. So, we experimented with exposing a metal rod to different temperatures and recorded its length as follows: Temp Length 20 25 30 35 40 45 50 55 60 65 0.5 1.8 5 6.2 6.5 7.8 9.4 9.8 10.9 Required: 1. Implement and plot a simple linear regression for the above data, where the temperature is "x", and the length is "y" 2. Implement and plot a multiple linear regression "Polynomial regression" with different degrees. For example, Degree of 3: Y = Wix' + w2x? + w3x? + W4 Where wa represents bias. *you can use normal equation to calculate W' as follow: w = (X".X)4.(XT.Y) Then calculate Y, Where Y = X.WT 3. Try degree of 2, 3, 5, and 8
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Similar questions
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman