Working Rule (Steps)
Question: By the method of least squares, find the best fitting straight line to the data given below:
x | 5 | 10 | 15 | 20 | 25 y | 15 | 19 | 23 | 26 | 30
Solution:
x | y | x² | xy -------------------------- 5 | 15 | 25 | 75 10 | 19 | 100 | 190 15 | 23 | 225 | 345 20 | 26 | 400 | 520 25 | 30 | 625 | 750∑x = 75, ∑y = 113, ∑x² = 1375, and ∑xy = 1880
Question: Fit y = aebx to the following data using the method of least squares:
x | 0 | 5 | 8 | 12 | 20 y | 3 | 1.5 | 1 | 0.55 | 0.18
x | y | Y = log(y) | xY | x² --------------------------------------------- 0 | 3 | 0.4771 | 0 | 0 5 | 1.5 | 0.1761 | 0.8805 | 25 8 | 1 | 0.0000 | 0 | 64 12 | 0.55 | -0.2596 | -3.1152 | 144 20 | 0.18 | -0.7447 | -14.894 | 400∑x = 45, ∑Y = -0.3512, ∑xY = -17.1292, and ∑x² = 633
Fit a curve y = axb to the following data:
x | 1 | 2 | 3 | 4 | 5 | 6 y | 2.98 | 4.26 | 5.21 | 6.10 | 6.80 | 7.50
Solution:
x | y | X = log(x) | Y = log(y) | X² | XY ------------------------------------------------------------------- 1 | 2.98 | 0 | 0.4742 | 0 | 0 2 | 4.26 | 0.3010 | 0.6294 | 0.0906 | 0.1894 3 | 5.21 | 0.4771 | 0.7168 | 0.2276 | 0.3419 4 | 6.10 | 0.6021 | 0.7853 | 0.3625 | 0.4727 5 | 6.80 | 0.6990 | 0.8325 | 0.4886 | 0.5819 6 | 7.50 | 0.7782 | 0.8751 | 0.6056 | 0.6809 ------------------------------------------------------------------- ∑ | | 2.8574 | 4.3133 | 1.7743 | 2.2668
Example Question: Find the coefficient of correlation for the given data:
x | 6 | 2 | 10 | 4 | 8 y | 9 | 11 | 5 | 8 | 7
Solution:
x | y | X | Y | X² | Y² | XY ------------------------------------------ 6 | 9 | 0 | 1 | 0 | 1 | 0 2 | 11 | -4 | 3 | 16 | 9 | -12 10 | 5 | 4 | -3 | 16 | 9 | -12 4 | 8 | -2 | 0 | 4 | 0 | 0 8 | 7 | 2 | -1 | 4 | 1 | -2 ------------------------------------------ ∑ | | | | 40 | 20 | -26
Question: Find the correlation for the following data:
x | 122 | 135 | 143 | 103 | 156 | 178 | 190 y | 46 | 78 | 89 | 46 | 82 | 52 | 96
Solution:
x | y | X | Y | X² | Y² | XY --------------------------------------------------- 122 | 46 | -25 | -24 | 625 | 576 | 600 135 | 78 | -12 | 8 | 144 | 64 | -96 143 | 89 | -4 | 19 | 16 | 361 | -76 103 | 46 | -44 | -24 | 1936 | 576 | 1056 156 | 82 | 9 | 12 | 81 | 144 | 108 178 | 52 | 31 | -18 | 961 | 324 | -558 190 | 96 | 43 | 26 | 1849 | 676 | 1118 ---------------------------------------------------- ∑ | | -2 | -17 | 5612 | 2712 | 2152
Question: The preference of two persons A and B for different car brands are given in the following table:
Car Brand | Person A | Person B -------------------------------- Suzuki | 5 | 1 Hyundai | 4 | 4 Tata | 1 | 2 Skoda | 3 | 5 Toyota | 2 | 3Determine the coefficient of rank correlation between the preferences of consumers A and B and interpret your result.
Solution:
R1 | R2 | D = R1 - R2 | D² ---------------------------- 5 | 1 | 4 | 16 4 | 4 | 0 | 0 1 | 2 | -1 | 1 3 | 5 | -2 | 4 2 | 3 | -1 | 1 ---------------------------- ∑ | | 0 | 22
Question: Calculate the rank correlation coefficient from the given data:
Marks in Computer (x): 20 30 40 50 60 70 80 Marks in English (y) : 14 5 30 32 40 45 65
Solution:
x | Rx | y | Ry | D | D² ----------------------------- 20 | 1 | 14 | 2 | -1 | 1 30 | 2 | 5 | 1 | 1 | 1 40 | 3 | 30 | 3 | 0 | 0 50 | 4 | 32 | 4 | 0 | 0 60 | 5 | 40 | 5 | 0 | 0 70 | 6 | 45 | 6 | 0 | 0 80 | 7 | 65 | 7 | 0 | 0 ----------------------------- ∑ | | | | 0 | 2
Question: Calculate the rank correlation coefficient for the following data:
x | 12 | 15 | 18 | 20 | 16 | 15 | 18 | 22 | 15 | 21 | 18 | 15 --------------------------------------------------------------- y | 10 | 18 | 19 | 12 | 15 | 19 | 17 | 19 | 16 | 14 | 13 | 17
Solution:
x | y | Rx | Ry | D | D² -------------------------------------- 12 | 10 | 1 | 1 | 0 | 0 15 | 18 | 3.5 | 9 | -5.5 | 30.25 18 | 19 | 8 | 11 | -3 | 9 20 | 12 | 10 | 2 | 8 | 64 16 | 15 | 6 | 5 | 1 | 1 15 | 19 | 3.5 | 11 | -7.5 | 56.25 18 | 17 | 8 |7.5 | 0.5 | 0.25 22 | 19 | 12 | 11 | 1 | 1 15 | 16 | 3.5 | 6 | -2.5 | 6.25 21 | 14 | 11 | 4 | 7 | 49 18 | 13 | 8 | 3 | 5 | 25 15 | 17 | 3.5 |7.5 | -4 | 16 --------------------------------------- ∑ | | | | 0 | 258
Reference