# Luckaton Framework

Luckatom luck measurement magic under the hood

## Measurement Results Integration

By integrating results from coin flip game, with its base 50/50 chance, alongside outcomes from Rock-Paper-Scissors and dice games, Luckaton has created a comprehensive framework to measure the Luck Index with a high degree of statistical significance.

This multifaceted approach ensures that observed outcomes, and by extension the calculated Luck Index, are not merely due to random fluctuations. Hereβs a detailed explanation, incorporating mathematical formulas for clarity:

### Combined Dataset

**Coin Flip Game****:**Expected probability ($P_{e,coin}β$) = 0.5 for either Heads or Tails.**Rock-Paper-Scissors****:**Expected probability ($P_{e,rpsβ}$) = $1/3$ for any of the three outcomes, assuming all choices are equally likely.**Dice Game****:**Expected probability ($P_{e,diceβ}$) = $1/6$ for any specific outcome (1 through 6).

### Actual Outcome Analysis

For each game type, calculate the actual probability ($P_aβ$) of a player achieving a specific favorable outcome (e.g., winning in Rock-Paper-Scissors, rolling a specific number, or getting Heads in coin flips) over $N$ trials:

$P_aβ=\frac{Fa}{N}ββ$

where $F_aβ$ is the frequency of the favorable outcome.

### Luck Index Calculation Across Games

To account for the different probabilities across games, we normalize the outcomes to a universal Luck Index ($LI$) using the formula:

$LI=β^k_{i=1}βw_iβ(\frac{P_{a,i}β-P_{e,i}β}{P_{e,i}}ββ)$

where:

$i$ indexes the game type (coin, RPS, dice),

$w_iβ$ is the weight assigned to each game type based on its variance or perceived impact on the overall luck measure,

$P_{a,iβ}$ and $P_{e,iβ}$ are the actual and expected probabilities of favorable outcomes for each game type, respectively.

### Statistical Significance

To assert the statistical significance of the Luck Index and ensure it's not a product of random chance, Luckaton framework applies a Chi-square statistical test comparing observed frequencies of favorable outcomes to expected frequencies:

$Ο^2=β_{i=1}^kβ\frac{β(O_iββE_iβ)^2β}{E_i}$

where $O_iβ$ and $E_iβ$ are the observed and expected frequencies of favorable outcomes, respectively, across all games.

### P-Value Calculation

Calculate the p-value from the Chi-square statistic to determine the likelihood that the observed differences (and by extension, the Luck Index variations) occurred by chance. A low p-value (typically <0.05) indicates that the results are statistically significant and not just due to random fluctuations.

### Conclusion

Luckaton framework implements a scientifically grounded method to ensure a high level of assertion in the Luck Indexβs significance, effectively distinguishing genuine patterns of luck from mere chance.

By combining results from games with different base probabilities and applying rigorous statistical analysis, this approach allows for a nuanced and statistically robust measurement of the Luck Index. It transcends the limitations of individual games, providing a comprehensive measure of luck that reflects a player's propensity to experience favorable outcomes across varied scenarios.

Last updated