run un-negozio-simulato.bas
MDN-119:32
DEMO by Michele di Nuzzo

A simulated store

MDN · LAB A SIMULATED STORE data simulation · 1837
scontrini medi al giorno
average receipts per day: the starting value, before the weight of the day
spesa media (€)
average spend: how much a receipt is worth on average
variabilità della spesa (€)
variability of the spend: how much the average spend fluctuates from day to day
dicembre × 1,3 (esercizio 3)
makes December 30% stronger (exercise 3)
peso del giorno della settimana
weight of the day of the week: switches the weekly wave on or off
Nuovo seme
new seed: redoes the year with another seed

▶ Run ⬇ Download (.html)

A single store for one year, generated by a program like Ordito’s data. There is a predictable part, the average receipts times the weight of the day of the week, and a random part, the Poisson distribution, which fluctuates around the expected value λ by about √λ. On the left the year’s revenue, on the right the distribution of the Saturdays. The lab’s interface is in Italian.

Things to try

  • Chance has a size. About two Saturdays out of three fall within √λ of the expected value; change the seed: the shape stays.
  • Small stores, big noise. Bring the average receipts down to 15: the fluctuation falls in value but grows in proportion.
  • The predictable part. Remove the weight of the day and only chance remains; then add a stronger December.

The article: A simulated store.

The demo is a single HTML file: download it and use it offline, even without an internet connection. Licence: CC BY-NC 4.0 — you may share it, crediting the author and this page, but not for commercial purposes.