Home sales in a fictional city
800 sales of villas and townhouses during 2023 in Wadi Noor, a fictional city with five districts. Each row is one sale with price, floor area, bedrooms, bathrooms, building age, distance to the centre, garage and district. Prices are right-skewed, area and bedrooms are strongly correlated, and the effect of distance is partly captured by district — ideal for multiple regression, log transformations, dummy variables and multicollinearity.
- Rows
- 800
- Columns
- 10
- One row is
- one property sale
- Version
- v1
Data dictionary
| Column | Type | Unit | Summary | Description |
|---|---|---|---|---|
sale_idSale | id | Sale identifier. | ||
sale_dateSale date | date | Date the sale was registered. | ||
districtDistrict | category | 5 levels: Old Town, Palm Grove, Lakeside, Hillcrest, Desert Edge | District of Wadi Noor. | |
area_m2Floor area | integer | m² | mean 267.2, median 255.5, SD 90.19, range 90–732 | Built-up floor area. |
bedroomsBedrooms | integer | mean 4.321, median 4, SD 1.297, range 1–9 | Number of bedrooms. | |
bathroomsBathrooms | integer | mean 3.268, median 3, SD 1.145, range 1–8 | Number of bathrooms. | |
age_yearsBuilding age | integer | years | mean 14.33, median 12, SD 9.965, range 0–60 | Age of the building at sale. |
distance_centre_kmDistance to centre | number | km | mean 11.96, median 10.35, SD 7.22, range 1–32 | Road distance to the city centre. |
garageGarage | boolean | 2 levels | True if the property has a private garage. | |
price_sarSale price | number | SAR | mean 1,271,135, median 1,180,500, SD 577,899, range 210,000–4,360,000 | Registered sale price. |
What it is good for
- Fit a multiple regression of price on area, age, distance and district, and interpret coefficients.
- Compare models for price and log(price) and interpret log-scale coefficients as percentages.
- Diagnose multicollinearity (area vs bedrooms) with correlations and VIFs, and explain unstable coefficients.
- Check residual plots for non-constant variance on the raw price scale.
Methods: multiple regression, log transformation, dummy variables, variance inflation factor, residual diagnostics, correlation matrix.
Data quality notes
- price_sar is right-skewed; log(price) is close to symmetric.
- area_m2 and bedrooms are highly correlated (r ≈ 0.87): the bedrooms coefficient can flip sign when area is included.
- Distance and district overlap (outer districts are farther away).
- No missing values.
Provenance and licence
District drawn first; distance to centre depends on district. Area is log-normal (median ≈250 m²). Bedrooms ≈ 1 + area/80 + noise (so strongly tied to area); bathrooms follow bedrooms. Building age is gamma. log(price) = constant + 0.9·log(area/250) + district premium − 0.006·age − 0.02·distance + 0.06·garage + 0.02·bathrooms + Normal(0, 0.15); bedrooms have no effect of their own once area is known. Prices rounded to 1 000 SAR.
Synthetic data · CC0-1.0 (synthetic data generated by Statistics Quest) · generated deterministically (seed 20241016). It does not describe real people or organisations; any resemblance is coincidental.
Preview
Dataset
Home sales in a fictional city
800 rows · one row = one property sale · synthetic data
| Sale | Sale date | District | Floor area (m²) | Bedrooms | Bathrooms | Building age (years) | Distance to centre (km) | Garage | Sale price (SAR) |
|---|---|---|---|---|---|---|---|---|---|
| H0001 | 2023-06-07 | Desert Edge | 353 | 5 | 3 | 6 | 21.8 | true | 1005000 |
| H0002 | 2023-06-13 | Desert Edge | 219 | 4 | 3 | 22 | 28.2 | false | 430000 |
| H0003 | 2023-06-07 | Lakeside | 294 | 4 | 3 | 28 | 8.8 | true | 1473000 |
| H0004 | 2023-05-03 | Desert Edge | 165 | 3 | 2 | 2 | 23.3 | true | 543000 |
| H0005 | 2023-08-11 | Palm Grove | 152 | 3 | 2 | 9 | 9.1 | false | 792000 |
| H0006 | 2023-01-21 | Hillcrest | 259 | 4 | 3 | 15 | 13.6 | false | 1310000 |
| H0007 | 2023-03-10 | Desert Edge | 159 | 3 | 2 | 22 | 23.1 | true | 356000 |
| H0008 | 2023-12-16 | Old Town | 285 | 5 | 5 | 20 | 2.3 | false | 1594000 |
| H0009 | 2023-09-13 | Lakeside | 205 | 3 | 1 | 4 | 10.1 | true | 1255000 |
| H0010 | 2023-05-01 | Palm Grove | 181 | 4 | 2 | 16 | 4.9 | false | 1096000 |
| H0011 | 2023-10-27 | Lakeside | 268 | 5 | 4 | 8 | 7.6 | true | 1452000 |
| H0012 | 2023-03-07 | Lakeside | 242 | 3 | 2 | 20 | 11.9 | false | 1214000 |
Used in
- Scatter plots · Visualising and Exploring Data
- Correlation heatmaps · Visualising and Exploring Data
- Interpreting coefficients · Correlation and Regression
- R² and residual standard error · Correlation and Regression
- Residual analysis · Correlation and Regression
- Multiple regression · Correlation and Regression
- Multicollinearity · Correlation and Regression
- Outliers, leverage and influence · Correlation and Regression
- Transformations · Correlation and Regression
- Transforming variables · Practical Data Analysis
- Principal component analysis · Advanced Foundations
- Model limitations and honest reporting · Advanced Foundations
- What drives house prices? · Case