Calculate the slope a using the formula a = n ( ∑ x 2 ) − ( ∑ x ) 2 n ( ∑ x y ) − ( ∑ x ) ( ∑ y ) , which results in a ≈ 6.36 .
Calculate the y-intercept b using the formula b = n ( ∑ y ) − a ( ∑ x ) , which results in b ≈ − 1.42 .
Construct the linear model y = a x + b .
The linear model is y = 6.36 x − 1.42 .
Explanation
Understanding the Problem We are given a table of data points ( x , y ) representing the number of pictures stored ( x ) and the total storage in gigabytes ( y ). We are asked to find the linear model y = a x + b that best fits the data using the least-squares method. We are also given the following sums: ∑ x = 16.2 , ∑ y = 95.9 , ∑ x 2 = 58.34 , ∑ x y = 347.96 , and the number of data points n = 5 .
Stating the Formulas The least-squares method provides formulas to calculate the slope a and the y-intercept b of the best-fitting line. The formulas are: a = n ( ∑ x 2 ) − ( ∑ x ) 2 n ( ∑ x y ) − ( ∑ x ) ( ∑ y ) b = n ( ∑ y ) − a ( ∑ x )
Calculating the Slope (a) Now, we substitute the given values into the formula for a :
a = 5 ( 58.34 ) − ( 16.2 ) 2 5 ( 347.96 ) − ( 16.2 ) ( 95.9 ) a = 291.7 − 262.44 1739.8 − 1552.38 a = 29.26 187.42 a ≈ 6.3643
Calculating the Y-Intercept (b) Next, we substitute the calculated value of a and the given sums into the formula for b :
b = 5 95.9 − 6.3643 ( 16.2 ) b = 5 95.9 − 103.0016 b = 5 − 7.1016 b ≈ − 1.4203
Writing the Linear Model Therefore, the linear model is approximately: y = 6.3643 x − 1.4203 Rounding to two decimal places, we get: y = 6.36 x − 1.42
Final Answer The linear model that best fits the given data, using the least-squares method, is: y = 6.36 x − 1.42
Examples
Linear models are used to predict trends. For example, a store manager can track how many customers visit their store each day for a week and use that data to predict how many customers will visit the store the following week. This helps them prepare their staff and inventory accordingly. Similarly, in environmental science, you can track the level of pollution in a lake over several years and create a linear model to predict the pollution level in the future, which helps in implementing preventive measures.