Upcoming SlideShare
×

# Curve Fitting2

1,946 views

Published on

2 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

Views
Total views
1,946
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
45
0
Likes
2
Embeds 0
No embeds

No notes for slide

### Curve Fitting2

1. 1. Method Of Moving averages Secular Trend Time series
2. 2. The Method of least Squares Curve fitting <ul><li>  </li></ul><ul><li>The Technique of obtaining the mathematical curve by the principle of least squares is known as curve fitting </li></ul><ul><li>  </li></ul>
3. 3. Two Types of trends are there <ul><li>Linear Trend is one which gives the straight line when Plotted the values on a graph paper </li></ul><ul><li>If we are getting non-linear curves like parabola,exponential curve,logistic curve We can say it is a non-linear Trend. </li></ul>
4. 4. We can fit the curve by Principle of least Squares <ul><li>“The sum of the squares of the deviations between the observed values and the trend values is least” </li></ul>
5. 5. Lines of Best Fit <ul><li>If we are drawing a straight line by the method of curve fitting based on the principle of least squares ,such line we can say line of best fit </li></ul>
6. 6. Equation of least squares <ul><li>y = a + bx where y is the value for dependent Variable </li></ul><ul><li>a and b are constants </li></ul><ul><li>For finding a and b we will apply the method of least Squares </li></ul>
7. 7. How can we find the value of a and b <ul><li>Let E be the sum of the squares of deviations of all the original values. </li></ul><ul><li>E=( y – (a + bx))² </li></ul><ul><li>By the method of calculus ,partial differential coefficients of E with respect to a and b are zero.Thus we will get two normal Equations </li></ul><ul><li> y=na +b  x </li></ul><ul><li> xy= a  x +b  x² </li></ul><ul><li>Solve these two Equations we will get a and b </li></ul><ul><li>Substituting these values in the equation y=a+bx we get the trend Equation Substitute the various values in the trend Equation </li></ul>
8. 8. Question No 1 <ul><li>The following are the annual Profits in 1000s of Rs in a textiles Business </li></ul><ul><li>Year 1998 1999 2000 2001 2002 2003 2004 </li></ul>Profit in 60 72 75 65 80 85 95 Thousands a.Using the method of least squares fit a straight line. b.Also Make an estimate profit in 2005 c.Estimate the trend Values for all the years? d.Compute short term Fluctuations? e.Plot the given values and trend values on a graph?
9. 9. Answer <ul><li>a=532/7=76 b=136/28 </li></ul><ul><li>The Trend Eqn is y=76 + 4.86xIn the year 2005 x=4 then y=76+(4.86*4)=95.44 </li></ul><ul><li>Therefore the profit for the year 2005 will be 95.44 thousand Rs. </li></ul>28 136 0 532 9 4 1 0 1 4 9 -180 -144 -75 0 80 170 285 -3 -2 -1 0 1 2 3 60 72 75 65 80 85 95 1998 1999 2000 2001 2002 2003 2004 x² xy Deviation from Mid Year1964 X=t-1964 Profit(ooo’s Rs) (y) Year(t)
10. 10. Contd……. <ul><li>The Equation for St. line Y=a+bx </li></ul><ul><li>The Normal Eqns are </li></ul><ul><li> y= na +b  x </li></ul><ul><li> xy= a  x +b  x² </li></ul><ul><li>If  x= 0 then the eqn become </li></ul><ul><li>a =  y / n and b=  xy /  x² </li></ul>
11. 11. Contd…….c <ul><li>Trend Values </li></ul><ul><li>If x=-3 y=76+(4.86*-3)=61.42 </li></ul><ul><li>If x=-2 y=76+(4.86*-2)=66.28 </li></ul><ul><li>If x=-1 y=76+(4.86*-1)=71.14 </li></ul><ul><li>If x = 0 y=76+(4.86*-0)=76 </li></ul><ul><li>If x= 1 y=76+(4.86*-1)=80.86 </li></ul><ul><li>If x = 2 y=76+(4.86*-2)=85.72 </li></ul><ul><li>If x = 3 y=76+(4.86*3)=90.58 </li></ul>
12. 12. Contd…….d
13. 13. <ul><li>Short Time Fluctuations=Actual Value-Trend Values(y-y) </li></ul><ul><li>Year Actual Value Y Trend ValuesY Short Time </li></ul><ul><li>Fluctuations </li></ul>
14. 14. Equations <ul><li>From The eqn </li></ul><ul><li>Y= a+bx </li></ul><ul><li> y = na + b  x </li></ul><ul><li> xy = a  x + b  x ² </li></ul><ul><li>Solving the two equations we will get a and b. </li></ul><ul><li>Substitute the values in the eqn Y= a+bx,we get the trend equation </li></ul><ul><li>The trend values can be obtained by substituting the various values of x in the trend equation </li></ul>
15. 15. Home work 1 <ul><li>Fit a Straight line trend to the following series by the method of least squares </li></ul><ul><li>Year Production in steel(‘000 tones ) </li></ul><ul><li>1994 10 </li></ul><ul><ul><li>1995 13 </li></ul></ul><ul><ul><li>1996 12 </li></ul></ul><ul><ul><li>1997 14 </li></ul></ul><ul><ul><li>1998 12 </li></ul></ul><ul><ul><li>1999 16 </li></ul></ul><ul><ul><li>2000 14 </li></ul></ul>
16. 16. Home work 2 <ul><li>The following are the annual profits in thousands of rupees in a certain business </li></ul><ul><li>Year Production in steel(‘000 tones ) </li></ul><ul><li>1994 60 </li></ul><ul><ul><li>1995 72 </li></ul></ul><ul><ul><li>1996 75 </li></ul></ul><ul><ul><li>1997 65 </li></ul></ul><ul><ul><li>1998 80 </li></ul></ul><ul><ul><li>1999 85 </li></ul></ul><ul><ul><li>2000 95 </li></ul></ul><ul><ul><li>a.Using the method of least squares fit a straight line to the above data . </li></ul></ul><ul><ul><li>b. Also make an estimate of profit in 2001 </li></ul></ul><ul><ul><li>c.Estimate the trend values for all the years. </li></ul></ul><ul><ul><li>d. Compute short term fluctuations </li></ul></ul><ul><ul><li>e. Plot the given values and trend values on a given graph </li></ul></ul>
17. 17. Home work 3 <ul><li>Below are given the figures of production in thousand tones of a sugar factory </li></ul><ul><li>Year Production in steel(‘000 tones ) </li></ul><ul><li>1994 60 </li></ul><ul><ul><li>1995 72 </li></ul></ul><ul><ul><li>1996 75 </li></ul></ul><ul><ul><li>1997 65 </li></ul></ul><ul><ul><li>1998 80 </li></ul></ul><ul><ul><li>1999 85 </li></ul></ul><ul><ul><li>2000 95 </li></ul></ul><ul><ul><li>Fit a straight line by the method of least Squares and find the trend values </li></ul></ul><ul><ul><li>b. What is the monthly increase in production </li></ul></ul><ul><ul><li>C.Eliminate the trend by assuming additive model and multiplicative model </li></ul></ul>
18. 18. Question 2 <ul><li>Compute the trend values by the method of least squares from the data given below </li></ul><ul><li>1992 56 </li></ul><ul><ul><li>1993 55 </li></ul></ul><ul><ul><li>1994 51 </li></ul></ul><ul><ul><li>1995 47 </li></ul></ul><ul><ul><li>1996 42 </li></ul></ul><ul><ul><li>1997 38 </li></ul></ul><ul><ul><li>1998 35 </li></ul></ul><ul><ul><li>1999 32 </li></ul></ul><ul><li>When there are two middle years , take average of them as assumed average and take deviation from it . Multiplying by 2 to avoid decimals </li></ul><ul><li>Take deviations from 1965.5 and multiply by 2 </li></ul>