**Regression** is a statistical method used for estimating the relationships among variables. In simple linear regression, the goal is to predict the value of a dependent variable based on the value of an independent variable.
Regression analysis seeks to model the relationship between two or more variables by fitting a line (or curve) to the data points. This model can then be used for prediction or understanding the relationships.
Simple Linear Regression: Involves one independent variable and one dependent variable, and the relationship between them is modeled as a straight line.
Multiple Linear Regression: Extends simple linear regression by using multiple independent variables to predict the dependent variable.
Example 1: Let's say we are trying to predict a person's weight based on their height. Using simple linear regression, we fit a line to the data points to estimate the weight (dependent variable) for a given height (independent variable).
Weight = m * Height + b
Example 2: In multiple linear regression, we may want to predict a person's salary based on their years of experience and education level. The model would look something like this:
Salary = m1 * Experience + m2 * Education + b
Consider the following data of study hours (X) and test scores (Y). Try fitting a line to this data using simple linear regression:
Study Hours: [1, 2, 3, 4, 5]
Test Scores: [55, 60, 65, 70, 75]
What would be the predicted test score for 6 hours of study? Use the formula for simple linear regression to estimate the slope (m) and intercept (b), and calculate the predicted value.