FDSA – UNIT - 2
1. Regression:
Regression is a statistical technique used to understand the relationship between two or more
variables. It helps us determine how one variable (called the dependent variable) is affected by
another variable (called the independent variable). The goal of regression is to create a model that
can predict the dependent variable based on the independent variable.
Why is Regression Important?
It helps us predict outcomes.
It provides insights into how two variables are related.
It is used in many fields like economics, finance, healthcare, and science to understand
relationships between different factors.
2. Regression Analysis:
Regression Analysis refers to the process of analyzing the relationship between variables using
regression techniques. It's about fitting a model (often a line) to data points to understand the nature
of the relationship between variables and to make predictions. Regression analysis can be simple
(one independent variable) or multiple (multiple independent variables).
Key Steps in Regression Analysis:
Data Collection: Collect data for the variables you're analyzing.
Modeling: Fit a regression model to the data, such as a straight line for simple linear
regression.
Interpretation: Analyze the coefficients (like slope and intercept) of the regression model
to understand the relationship.
Prediction: Use the model to predict values for new data.
3. Dependent and Independent Variables:
In regression, we work with two types of variables:
Dependent Variable (Y):
The dependent variable is the variable you are trying to predict or explain.
It depends on the independent variable. For example, test scores might depend on the hours
studied.
In a regression equation, the dependent variable is typically represented by Y.
Independent Variable (X):
The independent variable is the variable that is being used to predict the dependent variable.
It is called independent because it is not affected by the dependent variable. For example,
hours studied is independent of test scores.
VIGNESH L S 1
FDSA – UNIT - 2
In a regression equation, the independent variable is typically represented by X.
4. Regression Line:
A regression line is a straight line (in the case of linear regression) that best fits the data points on
a scatter plot. The line shows the relationship between the independent variable (X) and the
dependent variable (Y).
The goal of regression is to find the line that minimizes the error between the observed data points
and the line itself. This line is often called the line of best fit.
Characteristics of the Regression Line:
The slope of the line tells us how much the dependent variable changes for each unit change
in the independent variable.
The intercept of the line tells us the value of the dependent variable when the independent
variable is zero.
5. Regression Equation of Y on X:
The regression equation of Y on X is a mathematical representation of the relationship between
the independent variable XXX and the dependent variable YYY in a simple linear regression
model.
The equation is:
𝑌 = 𝛽0 + 𝛽1 𝑋 + 𝜖
Where:
Y is the dependent variable (what we are trying to predict),
X is the independent variable (the predictor),
β0\beta_0β0 is the intercept (the value of YYY when X=0X = 0X=0),
β1\beta_1β1 is the slope (the rate of change in YYY for each unit change in XXX),
ϵ\epsilonϵ is the error term (the difference between the predicted and actual values,
capturing randomness or factors not explained by the model).
Example:
If the regression equation is:
𝑌 = 50 + 5𝑋
This means:
β0=50: When no hours are studied (X=0), the predicted test score (Y) is 50.
VIGNESH L S 2
FDSA – UNIT - 2
β1=5: For every extra hour studied, the test score increases by 5 points.
6. Regression Equation of X on Y:
The regression equation of X on Y is used when you are trying to predict the independent variable
X based on the dependent variable Y. This is a reverse regression model, and the equation is slightly
different.
The equation for the regression of X on Y is:
𝑋 = 𝛼0 + 𝛼1 𝑌 + 𝜖
Where:
X is the independent variable (the one we want to predict),
Y is the dependent variable,
α0 is the intercept,
α1 is the slope of the regression line,
ϵ is the error term (just like in the previous equation).
Key Differences:
The regression equation of Y on X assumes that X influences Y, whereas the regression
equation of X on Y assumes that Y influences X.
Slope and intercept will differ because the relationship is reversed. For example, if the
equation for Y on X is Y=50+5XY = 50 + 5XY=50+5X, the equation for X on Y might look
different, say X=10+0.2YX = 10 + 0.2YX=10+0.2Y, depending on the data.
VIGNESH L S 3