Multiple Linear Regression A nursing instructor wishes to see whether a student's grade point average and age are related to the student's score on the state board nursing examination. She selects five students and obtains the following data. Student A B C D E GPA.X₁ 3.2 2.7 2.5 Script 3.4 2.2 a) Refer to fitlm. From its output, determine the b0, b1, and b2. Do not simply enter the values but work with objects in MATLAB. You can also search How to get the p-value as an output of fitim on MATLAB Answers. b) Predict a student's state board score who has a GPA of 3.0 and who is 25 years old. The multiple regression equation is ŷ = bo+b₁x₁ + b₂x₂. Age x₂ 22 27 24 28 23 c) Obtain the Coefficient of Determination (R²) from fitlm's output. Check LinearModel. 1 % X is a 5 x 2 matrix 2 X= 3 y= 5% use fitlm 6 md1= 8 % be 9 be= State board score y d) Obtain the F-statistic using coefTest. Its value must be the same as that of fitlm with some discrepancy due to rounding off. 10 11 % b1 12 b1= 13 550 570 525 670 490 14 % b2 15 b2= 16 17 % Compute the student's predicted state board score 18 y predicted= 19 20 % Get the Coefficient of Determination 21 Rsq= 22 23 % Testing the significance of R to compute F-statistic 24 [p,F]= My Solutions > Save C Reset MATLAB Documentation
Multiple Linear Regression A nursing instructor wishes to see whether a student's grade point average and age are related to the student's score on the state board nursing examination. She selects five students and obtains the following data. Student A B C D E GPA.X₁ 3.2 2.7 2.5 Script 3.4 2.2 a) Refer to fitlm. From its output, determine the b0, b1, and b2. Do not simply enter the values but work with objects in MATLAB. You can also search How to get the p-value as an output of fitim on MATLAB Answers. b) Predict a student's state board score who has a GPA of 3.0 and who is 25 years old. The multiple regression equation is ŷ = bo+b₁x₁ + b₂x₂. Age x₂ 22 27 24 28 23 c) Obtain the Coefficient of Determination (R²) from fitlm's output. Check LinearModel. 1 % X is a 5 x 2 matrix 2 X= 3 y= 5% use fitlm 6 md1= 8 % be 9 be= State board score y d) Obtain the F-statistic using coefTest. Its value must be the same as that of fitlm with some discrepancy due to rounding off. 10 11 % b1 12 b1= 13 550 570 525 670 490 14 % b2 15 b2= 16 17 % Compute the student's predicted state board score 18 y predicted= 19 20 % Get the Coefficient of Determination 21 Rsq= 22 23 % Testing the significance of R to compute F-statistic 24 [p,F]= My Solutions > Save C Reset MATLAB Documentation
MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
Related questions
Question
![Multiple Linear Regression
A nursing instructor wishes to see whether a student's grade point average and age are related to the student's score on the state board nursing examination. She selects five
students and obtains the following data.
Student
A
B
с
D
E
Script>
GPAX₁
3.2
2.7
2.5
3.4
2.2
a) Refer to fitlm. From its output, determine the b0, b1, and b2. Do not simply enter the values but work with objects in MATLAB. You can also search How to get the p-value as an
output of fitlm on MATLAB Answers.
b) Predict a student's state board score who has a GPA of 3.0 and who is 25 years old. The multiple regression equation is ŷ = bo+b₁x₁ + b₂x₂.
1 % X is a 5 x 2 matrix
2 X=
3 y=
4
c) Obtain the Coefficient of Determination (R²) from fitlm's output. Check LinearModel.
Age x₂
22
27
24
d) Obtain the F-statistic using coefTest. Its value must be the same as that of fitlm with some discrepancy due to rounding off.
5% use fitlm
6 md1=
7
8 % be
9 be=
28
23
10
11 % b1
State board
score y
550
570
525
670
490
21 Rsq=
22
12 b1=
13
14 % b2
15 b2=
16
17 % Compute the student's predicted state board score
18 y predicted=
19
20 % Get the Coefficient of Determination
My Solutions >
23 % Testing the significance of R to compute F-statistic
24 [p,F]=
Save C Reset
MATLAB Documentation
▶ Run Script ?](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe79c13e0-b809-45be-8295-5c2e7a624778%2F1088cd69-2a31-42ad-b022-1668306eaaec%2Fbk9plfh_processed.png&w=3840&q=75)
Transcribed Image Text:Multiple Linear Regression
A nursing instructor wishes to see whether a student's grade point average and age are related to the student's score on the state board nursing examination. She selects five
students and obtains the following data.
Student
A
B
с
D
E
Script>
GPAX₁
3.2
2.7
2.5
3.4
2.2
a) Refer to fitlm. From its output, determine the b0, b1, and b2. Do not simply enter the values but work with objects in MATLAB. You can also search How to get the p-value as an
output of fitlm on MATLAB Answers.
b) Predict a student's state board score who has a GPA of 3.0 and who is 25 years old. The multiple regression equation is ŷ = bo+b₁x₁ + b₂x₂.
1 % X is a 5 x 2 matrix
2 X=
3 y=
4
c) Obtain the Coefficient of Determination (R²) from fitlm's output. Check LinearModel.
Age x₂
22
27
24
d) Obtain the F-statistic using coefTest. Its value must be the same as that of fitlm with some discrepancy due to rounding off.
5% use fitlm
6 md1=
7
8 % be
9 be=
28
23
10
11 % b1
State board
score y
550
570
525
670
490
21 Rsq=
22
12 b1=
13
14 % b2
15 b2=
16
17 % Compute the student's predicted state board score
18 y predicted=
19
20 % Get the Coefficient of Determination
My Solutions >
23 % Testing the significance of R to compute F-statistic
24 [p,F]=
Save C Reset
MATLAB Documentation
▶ Run Script ?
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 5 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![MATLAB: An Introduction with Applications](https://www.bartleby.com/isbn_cover_images/9781119256830/9781119256830_smallCoverImage.gif)
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
![Probability and Statistics for Engineering and th…](https://www.bartleby.com/isbn_cover_images/9781305251809/9781305251809_smallCoverImage.gif)
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
![Statistics for The Behavioral Sciences (MindTap C…](https://www.bartleby.com/isbn_cover_images/9781305504912/9781305504912_smallCoverImage.gif)
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
![MATLAB: An Introduction with Applications](https://www.bartleby.com/isbn_cover_images/9781119256830/9781119256830_smallCoverImage.gif)
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
![Probability and Statistics for Engineering and th…](https://www.bartleby.com/isbn_cover_images/9781305251809/9781305251809_smallCoverImage.gif)
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
![Statistics for The Behavioral Sciences (MindTap C…](https://www.bartleby.com/isbn_cover_images/9781305504912/9781305504912_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780134683416/9780134683416_smallCoverImage.gif)
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
![The Basic Practice of Statistics](https://www.bartleby.com/isbn_cover_images/9781319042578/9781319042578_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781319013387/9781319013387_smallCoverImage.gif)
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman