1. The relationship is not a function because one input (22) has 2 different possible outputs (45 and 42).
2, 3 and 4:
The following graph shows the scatter plot, the best fit line and its equation:
The equation of the line, where x represents the price and y represents the demand.
Rewriting the equation we have:
That equation is found in Excel. However it can be computed through the following equations,
The formula has the shape:
The formula for the slope m:
Where n is the number of data, 7 for this case.
For the y-intercept we have the following formula:
x y xyx^2
19 49 931361
21 46 966441
22 45 990484
22 42 924484
26 41 1066676
28 38 1064784
29 33 957841
167 294 68984071 <- SUM
The previous table shows the same original table (P, D) with 2 new columns to calculate the sums required for the formula of the slope and y-intercept. The last row is the total sum of all the elements above in the collumn.
From the table we have then:
Now we will replace the values on the previous formulas for m and b:
Solving we obtain:
Now, for the y-intercept b:
Now we can build the equation of the best fit of the model. We used x and y to make the formulas easier to work, however, x represents the price (P) and y is the demand (D). Reorganizing then the notation:
Or well:
To make formal the answer for point 5:
The slope represents the rate of change. It means that for every unit the price increases, the demand will decrease 1.3355 (The negative means decrement).
The y-intercept will be the demand when the price is exactly 0. Then, according to that model, the demand of the shirts if they were free will be 73.862 approximately.
6. The equation as function D of P was already found:
As a linear function, its domain will be all real numbers:
7. To make the prediction of the demand if the price is $27, we just need to evaluate the equation we found in P = $27, and solve:
Then, the demand for shirts, if the price were $27, will be approximately 37.8, according to the model.