0% found this document useful (0 votes)
214 views10 pages

Maths Project 2 2025

Uploaded by

rajagokulavarsni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
214 views10 pages

Maths Project 2 2025

Uploaded by

rajagokulavarsni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Title: Regression Equations by the Method of Least Squares

and Angles between Regression Lines

Table of Contents

1. Introduction
2. What is Regression Analysis?
3. Method of Least Squares
4. Finding Regression Equations
5. Derivation of the Formulae
6. Angle between Regression Lines
7. Applications of Regression Analysis
8. Solved Example
9. Conclusion
10. References

1. Introduction
Regression analysis is one of the key statistical tools used to identify relationships between two
or more variables. In this project, we will derive regression equations using the method of least
squares, which minimizes the sum of the squares of errors. We will also determine the angle
between the two regression lines.

2. What is Regression Analysis?


 Definition: Regression analysis is a statistical method used to study the relationship
between a dependent variable (Y) and an independent variable (X).
 Types of Regression:
1. Linear Regression (simple and multiple)
2. Non-linear Regression

For two variables XXX and YYY, linear regression determines two regression lines:

1. Regression line of Y on X
2. Regression line of X on Y
3. Method of Least Squares
The method of least squares is a technique to find the "best fit" line for a set of data points.
The best-fit line minimizes the sum of the squares of the vertical deviations from the actual
data points to the line.

 For Y on X, the equation is:

Y=a+bXY = a + bXY=a+bX

where aaa is the intercept, and bbb is the slope.

 For X on Y, the equation is:

X=c+dYX = c + dYX=c+dY

where ccc is the intercept, and ddd is the slope.

4. Finding Regression Equations


To find the regression lines, follow these steps:

1. Calculate Means: Find the means of XXX and YYY:

Xˉ=∑Xn,Yˉ=∑Yn\bar{X} = \frac{\sum X}{n}, \quad \bar{Y} = \frac{\sum Y}


{n}Xˉ=n∑X,Yˉ=n∑Y

2. Regression line of Y on X:
o Formula: Y−Yˉ=b(X−Xˉ)Y - \bar{Y} = b(X - \bar{X})Y−Yˉ=b(X−Xˉ), where
bbb is the slope.
o Slope (bbb) is given by: b=∑(X−Xˉ)(Y−Yˉ)∑(X−Xˉ)2b = \frac{\sum (X - \
bar{X})(Y - \bar{Y})}{\sum (X - \bar{X})^2}b=∑(X−Xˉ)2∑(X−Xˉ)(Y−Yˉ)
3. Regression line of X on Y:
o Formula: X−Xˉ=d(Y−Yˉ)X - \bar{X} = d(Y - \bar{Y})X−Xˉ=d(Y−Yˉ), where
ddd is the slope.
o Slope (ddd) is given by: d=∑(X−Xˉ)(Y−Yˉ)∑(Y−Yˉ)2d = \frac{\sum (X - \
bar{X})(Y - \bar{Y})}{\sum (Y - \bar{Y})^2}d=∑(Y−Yˉ)2∑(X−Xˉ)(Y−Yˉ)

5. Derivation of the Formulae


To derive the regression lines:
Regression Line of Y on X:

1. Start with the line equation: Y=a+bXY = a + bXY=a+bX.


2. Minimize the error EEE (sum of squared deviations): E=∑(Yi−a−bXi)2E = \sum (Y_i - a
- bX_i)^2E=∑(Yi−a−bXi)2
3. Solve for aaa and bbb by differentiating EEE and setting partial derivatives to zero.

The slope bbb is:

b=∑(X−Xˉ)(Y−Yˉ)∑(X−Xˉ)2b = \frac{\sum (X - \bar{X})(Y - \bar{Y})}{\sum (X - \


bar{X})^2}b=∑(X−Xˉ)2∑(X−Xˉ)(Y−Yˉ)

6. Angle between Regression Lines


The angle θ\thetaθ between two regression lines is given by:

tan⁡θ=∣b1−b21+b1b2∣\tan \theta = \left| \frac{b_1 - b_2}{1 + b_1b_2} \right|tanθ=1+b1b2b1−b2

where b1b_1b1 and b2b_2b2 are the slopes of the two regression lines.

 Special Case: If b1b2=−1b_1b_2 = -1b1b2=−1, the lines are perpendicular.

7. Applications of Regression Analysis


Regression analysis has widespread applications in:

1. Economics: Predicting demand and supply.


2. Finance: Estimating stock prices and trends.
3. Science: Relationship between variables like temperature and pressure.
4. Machine Learning: Linear regression is a fundamental technique for prediction.

8. Solved Example
Data Given:

XXX YYY
1 2
2 3
3 5
XXX YYY
4 4
5 6

Solution:

1. Find Xˉ\bar{X}Xˉ and Yˉ\bar{Y}Yˉ:

Xˉ=1+2+3+4+55=3,Yˉ=2+3+5+4+65=4\bar{X} = \frac{1+2+3+4+5}{5} = 3, \quad \


bar{Y} = \frac{2+3+5+4+6}{5} = 4Xˉ=51+2+3+4+5=3,Yˉ=52+3+5+4+6=4

2. Compute bbb for Y on X:

b=∑(X−Xˉ)(Y−Yˉ)∑(X−Xˉ)2b = \frac{\sum (X - \bar{X})(Y - \bar{Y})}{\sum (X - \


bar{X})^2}b=∑(X−Xˉ)2∑(X−Xˉ)(Y−Yˉ)

Substitute the values to calculate bbb.

3. Write the regression equations.


4. Find the angle θ\thetaθ between the regression lines using the slopes.

9. Conclusion
In this project, we explored the method of least squares to derive regression equations for a given
set of data. We also calculated the angle between the two regression lines. Regression analysis is
a powerful tool with practical applications in various fields.

10. References
1. NCERT Mathematics Textbook (Class 12)
2. Statistics for Economics – Gupta and Kapoor
3. Online Sources – Khan Academy, BYJU'S

This structure will cover your project in 10 pages. Each section can include further details, step-
by-step calculations, and examples to make it more comprehensive and visually appealing. Add
graphs or tables where necessary for clarity.
Regression Equations by the Method of Least
Squares and Angles between Regression
Lines
Data Used
Consider the following dataset where XXX and YYY are two variables:

X Y
2 3
4 5
6 7
8 9
10 11

We will use this data to:

1. Calculate the regression line of Y on X and X on Y.


2. Find the angle between the regression lines.

1. Mean of X and Y
The mean is calculated as follows:

Xˉ=∑Xn,Yˉ=∑Yn\bar{X} = \frac{\sum X}{n}, \quad \bar{Y} = \frac{\sum Y}{n}Xˉ=n∑X


,Yˉ=n∑Y

Step-by-Step Calculation:

 Sum of XXX: 2+4+6+8+10=302 + 4 + 6 + 8 + 10 = 302+4+6+8+10=30


 Sum of YYY: 3+5+7+9+11=353 + 5 + 7 + 9 + 11 = 353+5+7+9+11=35
 n=5n = 5n=5 (number of data points)

Xˉ=305=6,Yˉ=355=7\bar{X} = \frac{30}{5} = 6, \quad \bar{Y} = \frac{35}{5} = 7Xˉ=530


=6,Yˉ=535=7

2. Regression Line of Y on X
The formula for the regression line of YYY on XXX is:
Y−Yˉ=b(X−Xˉ)Y - \bar{Y} = b(X - \bar{X})Y−Yˉ=b(X−Xˉ)

where bbb (slope) is:

b=∑(X−Xˉ)(Y−Yˉ)∑(X−Xˉ)2b = \frac{\sum (X - \bar{X})(Y - \bar{Y})}{\sum (X - \


bar{X})^2}b=∑(X−Xˉ)2∑(X−Xˉ)(Y−Yˉ)

Step 1: Calculations

X−XˉX - \ Y−YˉY - \ (X−Xˉ)(Y−Yˉ)(X - \bar{X}) (X−Xˉ)2(X - \


XXX YYY
bar{X}X−Xˉ bar{Y}Y−Yˉ (Y - \bar{Y})(X−Xˉ)(Y−Yˉ) bar{X})^2(X−Xˉ)2
2 3 -4 -4 16 16
4 5 -2 -2 4 4
6 7 0 0 0 0
8 9 2 2 4 4
10 11 4 4 16 16

 Sum of (X−Xˉ)(Y−Yˉ)(X - \bar{X})(Y - \bar{Y})(X−Xˉ)(Y−Yˉ): 16+4+0+4+16=4016 +


4 + 0 + 4 + 16 = 4016+4+0+4+16=40
 Sum of (X−Xˉ)2(X - \bar{X})^2(X−Xˉ)2: 16+4+0+4+16=4016 + 4 + 0 + 4 + 16 =
4016+4+0+4+16=40

Step 2: Calculate the Slope bbb

b=∑(X−Xˉ)(Y−Yˉ)∑(X−Xˉ)2b = \frac{\sum (X - \bar{X})(Y - \bar{Y})}{\sum (X - \


bar{X})^2}b=∑(X−Xˉ)2∑(X−Xˉ)(Y−Yˉ)

Substitute values:

b=4040=1b = \frac{40}{40} = 1b=4040=1

Step 3: Write the Regression Line

The regression line of YYY on XXX:

Y−Yˉ=b(X−Xˉ)Y - \bar{Y} = b(X - \bar{X})Y−Yˉ=b(X−Xˉ)

Substitute Yˉ=7\bar{Y} = 7Yˉ=7, Xˉ=6\bar{X} = 6Xˉ=6, and b=1b = 1b=1:

Y−7=1(X−6)Y - 7 = 1(X - 6)Y−7=1(X−6)


Simplify:

Y=X+1Y = X + 1Y=X+1

3. Regression Line of X on Y
The formula for the regression line of XXX on YYY is:

X−Xˉ=d(Y−Yˉ)X - \bar{X} = d(Y - \bar{Y})X−Xˉ=d(Y−Yˉ)

where ddd (slope) is:

d=∑(X−Xˉ)(Y−Yˉ)∑(Y−Yˉ)2d = \frac{\sum (X - \bar{X})(Y - \bar{Y})}{\sum (Y - \


bar{Y})^2}d=∑(Y−Yˉ)2∑(X−Xˉ)(Y−Yˉ)

Step 1: Calculate ∑(Y−Yˉ)2\sum (Y - \bar{Y})^2∑(Y−Yˉ)2

From the table:

 (Y−Yˉ)2(Y - \bar{Y})^2(Y−Yˉ)2: 16,4,0,4,1616, 4, 0, 4, 1616,4,0,4,16

Sum:

∑(Y−Yˉ)2=16+4+0+4+16=40\sum (Y - \bar{Y})^2 = 16 + 4 + 0 + 4 + 16 =
40∑(Y−Yˉ)2=16+4+0+4+16=40

Step 2: Calculate the Slope ddd

d=∑(X−Xˉ)(Y−Yˉ)∑(Y−Yˉ)2d = \frac{\sum (X - \bar{X})(Y - \bar{Y})}{\sum (Y - \


bar{Y})^2}d=∑(Y−Yˉ)2∑(X−Xˉ)(Y−Yˉ)

Substitute values:

d=4040=1d = \frac{40}{40} = 1d=4040=1

Step 3: Write the Regression Line

The regression line of XXX on YYY:

X−Xˉ=d(Y−Yˉ)X - \bar{X} = d(Y - \bar{Y})X−Xˉ=d(Y−Yˉ)


Substitute Xˉ=6\bar{X} = 6Xˉ=6, Yˉ=7\bar{Y} = 7Yˉ=7, and d=1d = 1d=1:

X−6=1(Y−7)X - 6 = 1(Y - 7)X−6=1(Y−7)

Simplify:

X=Y−1X = Y - 1X=Y−1

4. Angle between the Regression Lines


The formula for the angle θ\thetaθ between two regression lines is:

tan⁡θ=∣b1−b21+b1b2∣\tan \theta = \left| \frac{b_1 - b_2}{1 + b_1b_2} \right|tanθ=1+b1b2b1−b2

Here:

 Slope of YYY on XXX (b1b_1b1) = 1


 Slope of XXX on YYY (b2b_2b2) = 1

Substitute values:

tan⁡θ=∣1−11+(1)(1)∣=02=0\tan \theta = \left| \frac{1 - 1}{1 + (1)(1)} \right| = \frac{0}{2} =


0tanθ=1+(1)(1)1−1=20=0

Thus:

θ=0∘\theta = 0^\circθ=0∘

The regression lines are parallel.

5. Final Results
1. Regression Line of Y on X: Y=X+1Y = X + 1Y=X+1
2. Regression Line of X on Y: X=Y−1X = Y - 1X=Y−1
3. Angle between the Regression Lines: θ=0∘\theta = 0^\circθ=0∘

6. Conclusion
Through this project, we derived the regression equations using the method of least squares.
We also calculated the angle between the two regression lines and observed that the lines are
parallel when their slopes are equal.

This is a complete example with all calculations shown step by step. It includes formulas,
tabulated data, and derived results. You can easily expand explanations or add graphs for a
polished 10-page project.

1. Scatter Plot
 Purpose: To plot the given data points (X,Y)(X, Y)(X,Y) on a graph.
 Description:
o X-axis: Independent variable (XXX)
o Y-axis: Dependent variable (YYY)
o Plot all the data points as small dots.
 Why: A scatter plot shows the general trend or pattern in the data.

2. Best-Fit Lines (Regression Lines)


 Purpose: Draw the two regression lines on the same scatter plot:
o Regression Line of Y on X: Y=a+bXY = a + bXY=a+bX
o Regression Line of X on Y: X=c+dYX = c + dYX=c+dY
 Steps:

1.Use the equations you derived (e.g., Y=X+1Y = X + 1Y=X+1 and X=Y−1X = Y -
1X=Y−1).
2. Draw the lines on the same graph.
3. Mark the means (Xˉ,Yˉ)(\bar{X}, \bar{Y})(Xˉ,Yˉ) as a reference point.
Why: Visualizing both lines on the scatter plot shows how they fit the data and intersect.

3. Visualization of the Angle between Regression Lines


 Purpose: To show the angle θ\thetaθ between the two regression lines.
 Description:
o Draw the two regression lines from the scatter plot.
o Highlight the angle θ\thetaθ where the lines intersect.
 Why: This graph provides a geometric understanding of the angle between the lines.
When to Add Graphs
 Scatter plot with data points on Page 3 or 4.
 Regression lines drawn over the scatter plot on Page 5.
 Graph showing the angle between regression lines on Page 6.

1. Data points (blue dots): Representing the given dataset (X,Y)(X, Y)(X,Y).
2. Regression Line of Y on X (red line): Y=X+1Y = X + 1Y=X+1.
3. Regression Line of X on Y (green line): X=Y−1X = Y - 1X=Y−1.
4. Mean Point (purple dot): (Xˉ=6,Yˉ=7)(\bar{X} = 6, \bar{Y} = 7)(Xˉ=6,Yˉ=7).

This graph visually represents the data and regression lines clearly.

You might also like