Retail transactions
1 500 till transactions from five branches of a fictional convenience-and-pharmacy chain, Tamr Corner, during March 2024. Each row is one basket: store, date, hour, customer type, payment method, number of items and basket value. Basket values are right-skewed and item counts are count data, which makes the dataset good for describing skewed data, comparing groups and modelling counts.
- Rows
- 1,500
- Columns
- 8
- One row is
- one transaction (basket)
- Version
- v1
Data dictionary
| Column | Type | Unit | Summary | Description |
|---|---|---|---|---|
transaction_idTransaction | id | Transaction identifier. | ||
storeStore | category | 5 levels: Downtown, Airport Road, Harbour Mall, North Plaza, University | Branch. | |
dateDate | date | Date of purchase (March 2024). | ||
hourHour | integer | hour | mean 16.27, median 17, SD 4.228, range 8–23 | Hour of day the basket was paid (8 = 08:00–08:59). |
customer_typeCustomer type | category | 3 levels: new, returning, loyalty | new = first visit, returning = known customer without loyalty card, loyalty = loyalty-card member. | |
payment_methodPayment method | category | 4 levels: card, cash, mobile_wallet, buy_now_pay_later; 23 missing | How the basket was paid.Missing: Missing (null) for 23 transactions where the till did not record the method. | |
item_countItems | integer | items | mean 4.121, median 4, SD 1.907, range 1–14 | Number of items in the basket. |
basket_value_sarBasket value | number | SAR | mean 97.56, median 87.13, SD 61.71, range 2.51–478.2 | Total paid for the basket. |
What it is good for
- Summarise a right-skewed money variable with median and IQR as well as mean and SD.
- Describe count data (items per basket) with a bar chart and compare with a Poisson model.
- Compare basket values by customer type and payment method.
- Decide how to handle missing categorical values.
Methods: descriptive statistics, histogram, bar chart, Poisson distribution, Kruskal–Wallis test, chi-square test of independence.
Data quality notes
- basket_value_sar is right-skewed with a long tail of large baskets.
- payment_method is missing for exactly 23 transactions.
- item_count is 1 + Poisson, so it never equals 0 and is slightly over-dispersed overall because the mean differs by customer type.
Provenance and licence
Hour of day follows a two-peak daily pattern (around 13:00 and 20:00). Customer type: new 20%, returning 50%, loyalty-card 30%. Items = 1 + Poisson(mean 2.2 for new, 3.0 returning, 4.0 loyalty). Each item's price is log-normal (median about 18 SAR); basket value is the sum, so it is right-skewed. Payment method depends on basket size (cash for small baskets, buy-now-pay-later for large ones). The payment method was then deleted for 23 randomly chosen transactions (till fault).
Synthetic data · CC0-1.0 (synthetic data generated by Statistics Quest) · generated deterministically (seed 20241004). It does not describe real people or organisations; any resemblance is coincidental.
Preview
Dataset
Retail transactions
1,500 rows · one row = one transaction (basket) · synthetic data
| Transaction | Store | Date | Hour (hour) | Customer type | Payment method | Items (items) | Basket value (SAR) |
|---|---|---|---|---|---|---|---|
| T00001 | University | 2024-03-01 | 9 | returning | card | 6 | 129.86 |
| T00002 | Harbour Mall | 2024-03-01 | 10 | returning | mobile_wallet | 2 | 60.64 |
| T00003 | Downtown | 2024-03-01 | 10 | new | cash | 1 | 14.65 |
| T00004 | Airport Road | 2024-03-01 | 10 | returning | card | 1 | 6.95 |
| T00005 | Airport Road | 2024-03-01 | 10 | returning | mobile_wallet | 2 | 63.04 |
| T00006 | Airport Road | 2024-03-01 | 12 | new | card | 1 | 34.84 |
| T00007 | Downtown | 2024-03-01 | 12 | returning | card | 5 | 101.98 |
| T00008 | Harbour Mall | 2024-03-01 | 12 | new | card | 4 | 117.57 |
| T00009 | University | 2024-03-01 | 12 | returning | card | 2 | 50.5 |
| T00010 | Downtown | 2024-03-01 | 12 | returning | card | 8 | 139.27 |
| T00011 | North Plaza | 2024-03-01 | 13 | loyalty | card | 9 | 216.07 |
| T00012 | Downtown | 2024-03-01 | 13 | returning | card | 4 | 73.13 |
Used in
- Frequency and relative frequency · Describing Data
- Choosing and reporting summaries · Describing Data
- Bar charts for categories · Visualising and Exploring Data
- Chi-square test of independence · Comparing Groups and Categorical Data
- Chi-square goodness of fit · Comparing Groups and Categorical Data
- Choosing a test · Comparing Groups and Categorical Data
- Grouping and aggregation · Practical Data Analysis
- Selecting a method · Practical Data Analysis
- Customer behaviour · Applied Statistics for Professionals