🌊
The Beach Report
Data Analysis · Least-Squares Regression
Summer is coming to Coastal Bay. The local council needs to plan their lifeguard roster, but they can only afford to staff up when visitor numbers justify it.

They've built a regression model from last season's data: daily maximum temperature vs beach visitors. Six data challenges stand between you and a safe, well-staffed summer beach. 🏖️
PROGRESS 0 / 6 complete
1
2
3
4
5
6
1
Opening the Model
Active
The council's data analyst presents the regression model she built from last season. It predicts daily visitor numbers from the daily maximum temperature.
Equation:Visitors = 20t − 300
t =max temp (°C)
Data range:18°C to 32°C
Use the model to predict visitor numbers on a day with a maximum temperature of 20°C.
Substitute t = 20 into the equation: Visitors = 20(20) − 300.
2
Heatwave Forecast
Locked
The Bureau of Meteorology is predicting a heat wave next week. The council needs an estimate for their busiest day to arrange extra lifeguards.
Equation:Visitors = 20t − 300
Forecast temperature:28°C
Predict the number of visitors expected on the 28°C heat wave day.
Substitute t = 28 into Visitors = 20t − 300.
3
Reading the Slope
Locked
The council's lifeguard coordinator wants to understand exactly how sensitive visitor numbers are to temperature changes. She needs to justify her staffing decisions to the mayor.
Equation:Visitors = 20t − 300
According to the model, how many extra visitors come to the beach for each 1°C increase in maximum temperature?
The slope (gradient) is the number multiplied by t in the equation. It tells you how much y changes for each 1-unit increase in t.
4
Staffing Threshold
Locked
Beach safety regulations require a minimum of one extra lifeguard for every 100 visitors. The council decides to call in the extra team when predicted visitor numbers hit 400.
Equation:Visitors = 20t − 300
Target visitors:400
At what maximum temperature does the model predict visitor numbers will reach 400? Solve for t.
Set 400 = 20t − 300. Add 300 to both sides, then divide both sides by 20.
5
Checking the Record
Locked
The analyst pulls last season's records to check how accurate the model actually was. She finds one day where the actual count was different from the prediction.
Temperature that day:25°C
Model prediction:20(25) − 300 = 200 visitors
Actual visitors:210
Residual =actual − predicted
Calculate the residual for this day. A positive residual means the beach was busier than predicted.
Residual = actual − predicted = 210 − 200 = ?
6
How Good is the Model?
Locked
The mayor asks the analyst one final question before approving the summer safety budget: "How much of the variation in beach visitors is actually explained by temperature?"
Pearson's r:r = 0.95
r² =r × r
Calculate r² (to 2 decimal places). This percentage of variation in visitor numbers is explained by temperature.
r² = 0.95 × 0.95 = ? Round your answer to 2 decimal places (e.g. 0.90).
🏖️🌊

Summer Sorted!

The council has everything they need. Lifeguard roster approved, budget signed, beach safe.

You've worked through prediction, gradient interpretation, solving for x, residuals and r², that's the full regression toolkit. Well done! ☀️