Important Example Solved Problems - Engineering Maths or Mathematics - Least Squares Approximation
LEAST
SQUARES APPROXIMATION
WORKED EXAMPLE PROBLEMS
Example 1
Find the least squares
line and error for the following data (1,2), (2,3), (3,5), (4,7)
Solution:
The
straight line y = ct + d

Thus
y = 1.7 t is the least squares line.
The
error E may be computed directly as E = || Ax0 ‒ y ||2.
Let
E = || y−Ax0||2

|| y – Ax0 || = √< y – Ax0
; y – Ax0 >
=
√[ (0.3)2 + (−0.4)2 + (− 0.1)2 + (0.2)2
]
=
√[0.09 +0.16+0.01 +0.04] = √0.3
E
= || y – Ax0 ||2 = 0.3
Note:
If
a polynomial y = ct2 + dt +e of degree at most 2.

Example 2
Use the least square
approximation to find the best fit with both (i) a linear function, and (ii) a
quadratic function, compute the error for both cases (−3, 9) (−2, 6) (0, 2) (1,
1).
Solution:
(i)
The straight line y = ct + d (Linear function)

y
= ct + d = ‒2t + 5/2 is the least squares line.
The
Error is denoted by E = || y−Ax0||2

|| y – Ax0 || = √< y – Ax0
; y – Ax0 >
=
√[ (0.5)2 + (− 0.5)2 + (−0.5)2 + (0.5)2
]
=
√ [ 0.25 +0.25 +0.25 +0.25] = 1
|| y – Ax0 ||2 = 1.
The error is computed as E = 1.0.
(ii) Let y = ct2 + dt +e be a
quadratic equation. (Quadratic function)


c = 1/3 ; d= ‒4/3; e = 2.
The quadratic function is obtained as y =
(1/3)t2 ‒ (4/3)t + 2
The
error is E = || y – Ax0||2
⇒
E.= 0.
Example 3
Find the least squares
line and error for the following data (1,0), (2,1), (3,3).
Solution:
The
straight line is y = ct + d

Here c=3/2 and d=−5/3.
⇒ y = ct+d
⇒ y = (3/2)t ‒ 5/3, is
the least square line.
The
error E may be computed directly be using the relation
E
= || Ax0 − y ||2
Let E = || y−Ax0 ||2

|| y – Ax0 || = √ <y−Ax0;
y−Ax0 >
=
√ [ (‒1/6)2 + (‒1/3)2 + (1/6)2 ]
=
√ [ 0.027 + 0.1 + 0.027 ]
=
√0.154
|| y − Ax0 ||2 = 0.154
The
error E is computed as E=0.154
Example 4
Find
the minimal solution to the following system of linear equations: x+2y−z=1;
2x+3y+z=2 and 4x + 7y−z=4.
Solution:
Let
us consider 
To
find the minimal solution for the given problem, let us find the solution u to
AA* X=b. The minimal solution of the system AX=b is obtained by A* u where u is
the solution of AA* X = b.
Let
us now find the value of AA*.

Now
let us consider the system of equations
6x+7y+19z
= 1
7x+14y+28z
= 2
19x+28y
+66z = 4
...(1)
The
above system of linear equations can be solved by any one of the numerical
methods.
(Such
as Gauss elimination method (or) Gauss Jordan method).
By
using Gauss−elimination method one such solution is

The
minimal solution is X= A* u.

The
minimal solution to the given system of equations is
x=0.287,
y=0.431 and z = 0.142
Linear Algebra: UNIT III: Inner Product Spaces : Tag: maths, mathematics : - Least Squares Approximation: Example Solved Problems
Linear Algebra
MA25C02 2nd Semester | 2025 Regulation
English Essentials II
EN25C02 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation
Tamils and Technology தமிழர்களும் தொழில்நுட்பமும்
UC25H02 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation
Linear Algebra
MA25C02 2nd Semester | 2025 Regulation
Transforms and its Applications
MA25C03 2nd Semester EEE Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Applied Physics (CE) II
PH25C02 2nd Semester Civil, Agri Depts | 2025 Regulation | 2nd Semester 2025 Regulation
Applied Physics (CSIE) II
PH25C03 2nd Semester AIDS, CSE, IT, CSE(CY) Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Applied Physics (EE) II
PH25C04 2nd Semester EEE Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Applied Physics (ME) II
PH25C05 2nd Semester Mechanical Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Applied Chemistry (CE) II
CY25C02 2nd Semester Civil Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Applied Chemistry (ME) II
CY25C03 2nd Semester Mechanical Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Electron Devices
EC25C01 2nd Semester ECE Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Digital Principles and Computer Organization
CS25C06 2nd Semester AIDS, CSE, IT, CSE(CY) Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Basic Electrical and Electronics Engineering
EE25C01 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation
Basic Civil and Mechanical Engineering
GE25C01 2nd Semester EEE Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Data Structures using CPlusPlus
CS25C05 2nd Semester ECE Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Engineering Drawing
ME25C01 EEE, Mech, Agri, EEE Depts | 2025 Regulation | 2nd Semester 2025 Regulation
Data Structures and Algorithms
CS25C04 2nd Semester EEE Dept | 2025 Regulation
Circuits and Network Analysis
EC25C02 2nd Semester ECE Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Engineering Mechanics
ME25C02 2nd Semester Mech, Civil, Agri Depts | 2025 Regulation | 2nd Semester 2025 Regulation
Object Oriented Programming (OOPs)
CS25C07 2nd Semester CSE, CSE(CY) Depts | 2025 Regulation | 2nd Semester 2025 Regulation