You are on page 1of 6

Method of Least square:

Assumptions:

1) The uncertainties are the same for all of the data points.

2) The uncertainties are only in the dependent variable, y.

Equation of any straight line is:

y=mx +c

If point i, with co-ordinates xi and yi lies on the line, we have

y i=m xi +c

If the point does not lie on the line, the y-co-ordinate has error by distance e y i

So, y i=m xi +c +e y i

or, e y = y im xi c(i)
i

Now, according to the theory of least squares, the best straight line through a set of points is that
which minimizes e 2y i
i

i.e. applying the least squares criterion e 2y i is minimum then


i

e2y i
i
=0(ii)
m

e2y
=0(iii) From equations (i, ii and iii), we
i
i

c
have normal equations

y i=m x i +nc(iv)
x

x
( i )+c x i(v)
2


( i y i )=m


Then the intercept c and the slope m can be found from Cramers rule

n ( x i y i ) x i y i
m=

c=
( x 2i ) y i x i (xi y i)

Where,
2
=n ( x 2i )( xi )

with n the number of data points.

The uncertainty is calculated as

2
m 2=n

2 2
( c ) =

( x 2i )

2 1 2
n2 i
with = ( y m x ic )

Class work

Example:

In an experiment to determine the acceleration of the free fall g the period T of a simple
pendulum was determined for various values of the l. The following results were obtained.

Length (m) 0.25 0.35 0.45 0.55 0.65 0.75


Time (s) 0.98 1.21 1.34 1.50 1.60 1.75

Plot a graph of T2 against l, and use it to obtain a value for g, with the associated uncertainty.
Example:

In an experiment to determine the acceleration of the free fall g the period T of a simple
pendulum was determined for various values of the l. The following results were obtained.

Length (m) 0.25 0.35 0.45 0.55 0.65 0.75


Time (s) 0.98 1.21 1.34 1.50 1.60 1.75

Plot a graph of T2 against l, and use it to obtain a value for g, with the associated uncertainty.

=== T =2
g
l

4 2
or, T 2 = ( )
g
l

Comparing it with equation of straight line y = m.x + c; we have

4 2
y = T2 , m= ,l=x ,c=0
g

m=
( xi yi )
Since, c = 0,
( x 2i )
2

m 2=
( x 2i )

1
with 2= 2
n1 i
( y m x i)

mx = y-mx (y-mx)2
( xi y i )
l=x T T2 = y x.y x2
( x 2i )
x
0.25 0.98 0.9604 0.2401 0.0625 1.0088 -0.0484 0.002343
0.35 1.21 1.4641 0.51243 0.1225 1.41232 0.05178 0.002681
0.45 1.34 1.7956 0.80802 0.2025 1.81584 -0.02024 0.00041
0.55 1.50 2.2500 1.2375 0.3025 2.21936 0.03064 0.000939
0.65 1.60 2.5600 1.6640 0.4225 2.62288 -0.06288 0.003954
0.75 1.75 3.0625 2.29688 0.5625 3.0264 0.0361 0.001303
2
x i= y i= x i y i= 2
x i = ( y im x i) =

3 12.0926 6.75893 0.011629
1.675

m=
( xi yi )
Now, [since, ]
( x 2i )
6.75893
m= = 4.0352
1.675

Thus, equation of best fitted line is

y = 4.0352 x x 0 1
y 0 4.0352
Also,

1
2 = 0.011629
61

= 0.0023258

= 0.05

m= 0.03726

= 0.04

4 2
Now, m=
g

or, g = 4 (3.14159)2/4.0352

= 9.7835

Hence,

g = 9.78 0.04 ms-2


T2 Vs. l
3.5
3 f(x) = 4.04x
2.5
2
T2 (s2)

1.5 Linear ()
1
0.5
0
0.2 0.3 0.4 0.5 0.6 0.7 0.8
l (m)

Probable error:

(i)
R = R 1 + R2
Taking log on both sides
ln R = ln ( R1 + R2 )
Differentiating we get,
R R1 R2
= +
R R 1+ R 2 R 1+ R 2

Then probable error in R is


2 1
R= R
[( ) ( ) ]
R1 2
R 1+ R 2
+
R2
R 1 + R2
2

(ii)
R 1 R2
R=
R 1 + R1
Taking log on both sides
ln R = ln (R1R2) - ln (R1+R2)
Differentiating we get,
R R1 R2 R1 R2
= +
R R1 R2 R 1+ R 2 R 1 + R 2

Then probable error in R is


2 1
R= R
[( ) ( ) ( ) ( ) ]
R1 2 R 2 2
R1
+
R2
+
R1 2
R 1+ R 2
+
R2
R1 + R 2
2

You might also like