Skip to content
Worked Examples · Example 7
Q.

Fit a straight-line trend by the method of least squares to the following data on a company's sales (Rs lakh) for 2019-2022.

Year2019202020212022
Sales40455461
Gujarat GsebTextbookSubjectiveImportance★★★★★
20% · 8/41 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Step 1 — set up the coding table using the "2X2X" method (since n=4n=4 is even, there is no single middle year; the two central years 2020 and 2021 are coded −1-1 and +1+1, and the outer years −3-3 and +3+3, so each unit of XX represents half a year):

YearSales (YY)XXXYXYX2X^2
201940-3-1209
202045-1-451
2021541541
20226131839
TotalΣY=200\Sigma Y = 200ΣX=0\Sigma X = 0ΣXY=72\Sigma XY = 72ΣX2=20\Sigma X^2 = 20

Step 2 — compute aa and bb:

a=ΣYn=2004=50b=ΣXYΣX2=7220=3.6a = \frac{\Sigma Y}{n} = \frac{200}{4} = 50 \qquad b = \frac{\Sigma XY}{\Sigma X^2} = \frac{72}{20} = 3.6

Trend equation: Yc=50+3.6XY_c = 50 + 3.6X, origin at the midpoint of 2020 and 2021, with each unit of XX equal to half a year.

Step 3 — trend values:

YearXXYc=50+3.6XY_c = 50+3.6X
2019-350−10.8=39.250-10.8=39.2
2020-150−3.6=46.450-3.6=46.4

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.