Statistics Quest

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

ColumnTypeUnitSummaryDescription
transaction_id
Transaction
idTransaction identifier.
store
Store
category5 levels: Downtown, Airport Road, Harbour Mall, North Plaza, UniversityBranch.
date
Date
dateDate of purchase (March 2024).
hour
Hour
integerhourmean 16.27, median 17, SD 4.228, range 8–23Hour of day the basket was paid (8 = 08:00–08:59).
customer_type
Customer type
category3 levels: new, returning, loyaltynew = first visit, returning = known customer without loyalty card, loyalty = loyalty-card member.
payment_method
Payment method
category4 levels: card, cash, mobile_wallet, buy_now_pay_later; 23 missingHow the basket was paid.Missing: Missing (null) for 23 transactions where the till did not record the method.
item_count
Items
integeritemsmean 4.121, median 4, SD 1.907, range 1–14Number of items in the basket.
basket_value_sar
Basket value
numberSARmean 97.56, median 87.13, SD 61.71, range 2.51–478.2Total 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

TransactionStoreDateHour (hour)Customer typePayment methodItems (items)Basket value (SAR)
T00001University2024-03-019returningcard6129.86
T00002Harbour Mall2024-03-0110returningmobile_wallet260.64
T00003Downtown2024-03-0110newcash114.65
T00004Airport Road2024-03-0110returningcard16.95
T00005Airport Road2024-03-0110returningmobile_wallet263.04
T00006Airport Road2024-03-0112newcard134.84
T00007Downtown2024-03-0112returningcard5101.98
T00008Harbour Mall2024-03-0112newcard4117.57
T00009University2024-03-0112returningcard250.5
T00010Downtown2024-03-0112returningcard8139.27
T00011North Plaza2024-03-0113loyaltycard9216.07
T00012Downtown2024-03-0113returningcard473.13

Used in