Manipal Academy of Higher Education
DUBAI CAMPUS
Assignment Topic: Regression and correlation
Course Code: MAT 104 Course Title: Mathematics and statistics
Last Date for Submission: [10 Dec 2024] Marks: [10]
Submission Guidelines:
Provide step-by-step calculations in your report.
Submit a report that includes the Python code with explanations.
Attach an Excel file showing the Excel analysis.
Assignment 1: Study Hours and Exam Performance Analysis [5]
Scenario: You are analyzing a dataset to understand how the amount of time students dedicates to studying
affects their performance on exams. This dataset tracks study hours (X) and exam scores (Y) for a sample of 10
students.
Dataset:
Hours of Study (X): [8, 12, 15, 20, 25, 28, 32, 35, 40, 45]
Exam Scores (Y): [60, 70, 75, 82, 88, 92, 95, 98, 105, 110]
Tasks:
1. Regression Analysis:
o Calculate the regression coefficient and derive the equations for regression lines Y on X.
Document each calculation step in your report.
2. Python Code:
o Create a Jupyter Notebook or Python script (.py) that performs the regression analysis.
o Include detailed comments explaining each code step and provide a summary discussing the
insights from the analysis.
3. Visualization:
o Use Matplotlib or Seaborn to create a line plot visualizing the relationship between study hours
and exam scores. Add observations based on the plot, focusing on the trend indicated by the
regression lines and the significance of the regression coefficient.
Assignment 2: Sleep and Productivity Analysis [5]
Scenario: You are investigating the impact of sleep on productivity levels. This dataset captures the number of
hours slept (X) and corresponding productivity levels (Y) for a group of 10 participants.
Dataset:
Hours of Sleep (X): [7, 9, 8, 6, 5, 7, 8, 6, 5, 7]
Productivity Levels (Y): [65, 72, 70, 58, 50, 68, 71, 60, 52, 69]
Tasks:
1. Correlation Analysis:
o Calculate the correlation coefficient to quantify the relationship between hours of sleep and
productivity levels. Include step-by-step calculations in the report.
2. Python Analysis:
o Write Python code to calculate the correlation coefficient and generate the correlation line.
o Visualize this correlation with a scatter plot using Matplotlib or Seaborn.
3. Excel Analysis:
o Use Excel to calculate correlation coefficient. Create a scatter plot in Excel to visually represent
the relationship between sleep hours and productivity levels.
| Page 1 of 1