Q15 A café owner wants to know how many cold drinks she is likely to sell next week. She makes a record of sales of drinks over the last two weeks:

\begin{tabular}{|r|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
Day & M & T & W & Th & F & S & M & T & W & Th & F & S \\
\hline
\begin{tabular}{r}
Temperature [tex]$\left({ }^{\circ} C \right)$[/tex] at midday
\end{tabular} & 17 & 18 & 17 & 19 & 20 & 20 & 19 & 19 & 22 & 23 & 20 & 20 \\
\hline
\begin{tabular}{r}
Number of cold drinks sold
\end{tabular} & 24 & 26 & 25 & 30 & 32 & 28 & 27 & 29 & 35 & 40 & 30 & 34 \\
\hline
\begin{tabular}{r}
Number of hot drinks sold
\end{tabular} & 34 & 36 & 32 & 34 & 27 & 29 & 37 & 39 & 25 & 25 & 28 & 28 \\
\hline
\end{tabular}

She wants to use this information to see if she can predict the number of cold drinks she is likely to sell based on the temperature forecast for a particular day.

Use the graph paper to show clearly the data she has collected in a way that will help her to do this.

Space for working



Answer :

To predict the number of cold drinks sold based on the temperature, we can use linear regression, a statistical method that fits a line to the relationship between temperature (independent variable) and cold drinks sold (dependent variable). Let's walk through the steps to solve this.

### Data Summary

Given data includes temperatures and cold drink sales for 12 days:

| Day | M | T | W | Th | F | S | M | T | W | Th | F | S |
|-----|----|----|----|----|----|----|----|----|----|----|----|----|
| Temperature (°C) | 17 | 18 | 17 | 19 | 20 | 20 | 19 | 19 | 22 | 23 | 20 | 20 |
| Cold drinks sold | 24 | 26 | 25 | 30 | 32 | 28 | 27 | 29 | 35 | 40 | 30 | 34 |

### Calculating Statistics for Linear Regression

1. Mean Temperature ([tex]\(\bar{T}\)[/tex])
[tex]\[ \bar{T} = 19.5 \text{°C} \][/tex]

2. Mean Cold Drinks Sold ([tex]\(\bar{C}\)[/tex])
[tex]\[ \bar{C} = 30.0 \text{ drinks} \][/tex]

3. Variance of Temperature ([tex]\(\sigma_T^2\)[/tex])
[tex]\[ \sigma_T^2 = 3.1818 \ (\text{up to 4 decimal places}) \][/tex]

4. Covariance of Temperature and Cold Drinks Sold ([tex]\(\sigma_{TC}\)[/tex])
[tex]\[ \sigma_{TC} = 7.7273 \ (\text{up to 4 decimal places}) \][/tex]

5. Slope (b) of the Regression Line
[tex]\[ b = \frac{\sigma_{TC}}{\sigma_T^2} = 2.4286 \ (\text{up to 4 decimal places}) \][/tex]

6. Intercept (a) of the Regression Line
[tex]\[ a = \bar{C} - b \cdot \bar{T} = -17.3571 \ (\text{up to 4 decimal places}) \][/tex]

### Linear Regression Equation

With the slope [tex]\( b \)[/tex] and intercept [tex]\( a \)[/tex], the equation of the regression line (cold drinks sold as a function of temperature) is:
[tex]\[ C(T) = 2.4286 \cdot T - 17.3571 \][/tex]

### Prediction Example

If the temperature forecast for a particular day is [tex]\( 21 \)[/tex]°C, we can predict the number of cold drinks sold as follows:
[tex]\[ C(21) = 2.4286 \times 21 - 17.3571 \][/tex]
[tex]\[ C(21) = 51.0 - 17.3571 \][/tex]
[tex]\[ C(21) \approx 33.6429 \text{ drinks} \ (\text{up to 4 decimal places}) \][/tex]

### Graphing Data for Visualization

To further assist in predicting sales, you can plot the data points (temperature vs. cold drinks sold) on graph paper, and overlay the regression line [tex]\( C(T) = 2.4286T - 17.3571 \)[/tex].

1. Plot each day's temperature on the X-axis and the corresponding cold drinks sold on the Y-axis.
2. Draw the best-fit line based on the regression equation.

This will provide a visual representation to the café owner, showing both the data points and the predicted relationship.

By understanding the relationship between temperature and cold drinks sales, the café owner can make informed decisions about stock and sales strategies for different weather conditions.