Statistics Quest

Office building daily energy use

Daily electricity consumption of a fictional six-storey office building, Tower 7 at Lotus Business Park, for the whole of 2023, with the day's mean outdoor temperature and a working-day flag. Energy use is U-shaped in temperature (heating on cold days, much more cooling on hot days) and far lower at weekends. A straight-line regression fits badly, which shows up clearly in residual plots — a dataset for nonlinear relationships, polynomial and piecewise (degree-day) regression, and residual diagnostics including autocorrelation.

Rows
365
Columns
5
One row is
one day
Version
v1

Data dictionary

ColumnTypeUnitSummaryDescription
date
Date
dateCalendar date.
weekday
Weekday
category7 levels: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday…Day of the week.
workday
Working day
boolean2 levelsTrue Sunday–Thursday (the building's working week).
outdoor_temp_c
Outdoor temperature
number°Cmean 21.17, median 21.1, SD 8.983, range 5.6–38Daily mean outdoor temperature.
energy_kwh
Energy use
numberkWhmean 2331, median 2458, SD 717.8, range 973–3769; 5 missingElectricity consumed by the building that day.Missing: Null on 5 days when the meter was offline.

What it is good for

  • Recognise a U-shaped relationship in a scatter plot and why correlation near zero does not mean no relationship.
  • Compare linear, quadratic and degree-day (piecewise linear) regression models.
  • Use residual plots and residuals over time to diagnose misfit and autocorrelation.
  • Include a working-day indicator and interpret it.

Methods: scatter plot, polynomial regression, piecewise regression, dummy variables, residual diagnostics, Durbin–Watson statistic, autocorrelation.

Data quality notes

  • energy_kwh is null on 5 days (meter outage).
  • The relationship with temperature is nonlinear (U-shaped and asymmetric: cooling costs more than heating).
  • Residuals are autocorrelated because weather and building behaviour persist from day to day.

Provenance and licence

Temperature = 21 + 12·seasonal cosine (coolest mid-January, hottest late July) + AR(1) weather noise (φ = 0.7, sd 2.2 °C). Energy (kWh) = base load (2 300 on working days, 1 100 on Friday/Saturday) + 55 × heating degrees below 16 °C + 95 × cooling degrees above 22 °C (both halved on non-working days) + AR(1) noise (φ = 0.5, sd 90). Five days of meter outage have no energy reading.

Synthetic data · CC0-1.0 (synthetic data generated by Statistics Quest) · generated deterministically (seed 20241027). It does not describe real people or organisations; any resemblance is coincidental.

Preview

Dataset

Office building daily energy use

365 rows · one row = one day · synthetic data

DateWeekdayWorking dayOutdoor temperature (°C)Energy use (kWh)
2023-01-01Sundaytrue9.42711.1
2023-01-02Mondaytrue12.32658.9
2023-01-03Tuesdaytrue13.32560.5
2023-01-04Wednesdaytrue10.22670.3
2023-01-05Thursdaytrue10.82549.4
2023-01-06Fridayfalse7.61320.4
2023-01-07Saturdayfalse5.61446.6
2023-01-08Sundaytrue9.32721.3
2023-01-09Mondaytrue8.92689.9
2023-01-10Tuesdaytrue8.22664
2023-01-11Wednesdaytrue9.32533.5
2023-01-12Thursdaytrue11.12555.6

Used in