Question: Note:attachments are not allowed, you should write your answers in the response text area, write the number of each question branch before answering it ,

Note:attachments are not allowed, you should write your answers in the response text area, write the number of each question branch before answering it, I will not check any code without the question branch number.
Question:
We have collected students' average test grade scores and their respective average number of study hours for the test for group of students. The collected data in the file stud_average.csv
\table[[Hours_Studied,Average],[2,57],[3,66],[4,73],[5,76],[6,79]]
Write the code to convert the file to a data frame with name stud_data
Write the code for creating x data frame (independent variable) and y data frame (dependent variable)
Write the code to plot a scatter plot between independent and dependent variables
Write the code to find the correlation between variables
Write the code for creating linear regression object
Write the code for training the model using training sets
Write the code for plotting fitted line with title:Hours Studied vs Average, xlabel: Hours Studied, ylabel: Average.
Write the code to add predicted value to the data frame with name pred_average
Add to stud_data the column 'intercept' with the value 1 and create a new data frame with name independent_variables that contains the columns Hours_Studied and intercept
Note:attachments are not allowed, you should

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!