Inspiration

A manager wanted to replace the 10 slot machines that earned the least. We asked: what if they aren't bad? A machine can earn little from bad luck, a quiet spot or a fault. Only one of those is fixed by a new machine.

What it does

An animated story explains the problem, then viewers pick a Simple view (plain words) or an Analyst view (formulas and back-tests). We found 9 of the 10 sit in a quiet corner, 2 were new and 1 (M-1158) pays out far more often than its design. We spend $17.5k and keep $82.5k.

How we built it

Python and DuckDB prepare the data. The dashboard is HTML, JavaScript and Chart.js on GitHub Pages. Luck is measured as \( z = \frac{\text{win} - \text{theo}}{\sqrt{\sum \text{bet}^2 \sigma^2}} \) and checked with a 1,000-replay simulator. Our forecast beat a flat average in 4 of 4 test months. Claude helped write the code. The ideas and design were ours.

Challenges we ran into

Machines moved slots, so we compared earnings per working hour. We caught a forecast input that used future information. Our school Wi-Fi blocked Vercel, so we moved to GitHub Pages.

Accomplishments that we're proud of

Two independent methods agree that M-1158 isn't just unlucky. Managers and analysts can both use it.

What we learned

Check before acting. The obvious fix would have wasted money.

What's next for Luck or Leak: Check Before You Replace

Run the three actions in July and measure them. Turn the simulator into a monthly check.

Share this project:

Updates

Submission history