Implement the single variable linear regression for the attached student score dataset (CSV file). 80% of the dataset is used for training and 20% is used for testing. (The first column is the feature and the second column is the corresponding output.) Output the prediction results. (Note: use the tool Python 3/Jupyter Notebook) student_scores.csv - Excel
Added by David S.
Close
Step 1
First, we need to import the necessary libraries. We will use pandas for data manipulation and scikit-learn for linear regression. ```python import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import Show more…
Show all steps
Your feedback will help us improve your experience
Vaibhav Jain and 95 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
The table below shows the scores of 25 Mathematics students in two mid-term tests and the final exam. Test 1 Test 2 Final Exam 75 69 76 95 75 93 91 78 90 98 84 98 75 57 71 54 39 51 71 63 75 48 48 58 89 68 88 81 60 82 71 60 71 72 56 71 95 81 92 81 69 76 72 63 74 95 76 96 80 64 74 83 77 92 90 79 89 80 71 80 84 74 89 88 70 88 80 71 88 78 71 75 98 80 96 Tasks: Perform multiple linear regression analysis using Microsoft Excel, assuming final exam score as the dependent variable and test 1 and test 2 scores as independent variables. Correctly state the regression equation. Evaluate the significance of the regression fit for the data. Determine if the regression coefficients are significant. Check if independent variables are collinear. Comment on the residual plots. Use the regression equation to predict final exam score for test 1 score = 82, and test 2 score = 69
Areen D.
Using the accompanying Student Grades data, construct a scatter chart for mid-term versus final-exam grades and add a linear trendline. What is the model? If a student scores 71 on the mid-term, what would you predict her grade on the final-exam to be? Student Mid-term Final-Exam 1 77 65 2 83 90 3 78 69 4 88 83 5 77 62 6 66 78 7 76 73 8 94 93 9 65 60 10 91 85 11 81 52 12 87 83 13 87 55 14 64 72 15 92 86 16 75 88 17 68 80 18 93 95 19 79 79 20 60 71 21 69 84 22 70 74 23 62 74 24 69 53 25 76 93 26 73 78 27 100 90 28 59 54 29 83 78 30 71 81 31 77 70 32 96 98 33 72 93 34 71 81 35 72 83 36 95 96 37 71 60 38 89 83 39 95 97 40 85 88 41 60 73 42 66 92 43 96 84 44 83 87 45 88 100 46 91 98 47 77 91 48 85 92 49 91 78 50 75 81 51 95 99 52 80 72 53 62 79 54 71 74 55 88 90 56 90 96 What is the model for the trendline? Final-Exam Grade = a + b × Mid-term Grade (Round to three decimal places as needed.)
Jerelyn N.
Using the accompanying Student Grades data, construct a scatter chart for midterm versus final exam grades and add a linear trendline. What is the model? If a student scores 79 on the midterm, what would you predict her grade on the final exam to be? Please explain with excel and table Student Midterm Final Exam 1 77 65 2 85 89 3 80 67 4 89 84 5 77 60 6 66 78 7 77 72 8 95 93 9 65 59 10 93 85 11 80 54 12 86 83 13 87 56 14 64 73 15 92 88 16 75 88 17 70 80 18 92 95 19 80 78 20 61 70 21 68 85 22 72 74 23 61 73 24 67 54 25 76 94 26 72 80 27 98 89 28 57 53 29 82 77 30 73 81 31 78 68 32 96 97 33 72 94 34 70 80 35 71 83 36 97 95 37 72 60 38 90 85 39 95 96 40 84 88 41 59 72 42 65 92 43 95 83 44 82 86 45 89 99 46 91 96 47 77 91 48 86 93 49 90 78 50 75 83 51 97 100 52 80 73 53 62 79 54 70 75 55 87 89 56 89 95
Lucas F.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD