Assignment-3 LSM
Assignment-3 LSM
Assignment-3 LSM
Objective: Apply least square methods on dataset for finding Line of best fit and
accuracy of model.
1: A mobile shop owner has collected i-phone sales data for the past year 2022. Based on the
given sales data find the following:
a) Using Scikit-learn package plot the line of best fit or regression line.
b) Find out the value of Intercept and Slope by Least Square regression.
Price (in 10 22 25 60 40 65 50 36 39 49 38 36
thousands)
i-phone
sales 9 8 6 5 6 5 4 8 9 7 6 6
2: For the given points: (-1, 2), (0, 3), (2, 6), (6,10), (8,12) and (k, 8). The values of slope and
y-intercept in the equation of least squares are 1.116 and 3.25 respectively. Determine the
value of k?
3: The following table show the sale of sugar in different year. Estimate the sale in year 2022.