## STEPN gems upgrade expectation (🚨🚧🚧🚧 Work in progress 🚧🚧🚧🚨)

This application compute the profit mathematical expectation
of the fusion of 3 gems to upgrade to 1 gem of a better quality.

Chain:

Upgrade cost | @@C@@ | = | … | = | … | |

@@P@@ | = | … | = | … | ||

@@Q@@ | = | … | = | … | ||

Ratio | @@Q / P@@ | |||||

Sell fees | @@F@@ | |||||

+ Gain if you win |
@@Q \left(1 - \frac{F}{100}\right)@@ | = | … | = | … | |

− Total upgrade cost | @@3P + C@@ | = | … | = | … | |

= Profit if you win |
@@Q \left(1 - \frac{F}{100}\right) - (3P + C)@@ | = | … | = | … | |

Probability to win | @@W@@ | % | ||||

+ Gain expectation | @@Q \left(1 - \frac{F}{100}\right) \frac{W}{100}@@ | = | … | = | … | |

− Total upgrade cost | @@3P + C@@ | = | … | = | … | |

= Profit expectation | @@Q \left(1 - \frac{F}{100}\right) \frac{W}{100} - (3P + C)@@ | = | … | = | … |

## Try successive upgrades until have profit

(🚧 Work in progress 🚧)@@N@@ | # wins | Gain | − | Cost | = | Profit | Probability | Cumulative prob. | Expectation |
---|---|---|---|---|---|---|---|---|---|

100% |

## Fixed number @@N@@ of upgrades

Gain expectation | Total upgrades cost | Profit expectation | Probability of | Profit and probability | |||
---|---|---|---|---|---|---|---|

@@N@@ | @@Q \left(1 - \frac{F}{100}\right) \sum_{i=1}^N i \binom{N}{i} \left(\frac{W}{100}\right)^i \left(1 - \frac{W}{100}\right)^{N-i}@@ | − | @@(3P + C) N@@ | = | positive profit | for each number of success | |

… | … | − | … | = | … | … | … |

… | … | − | … | = | … | … | … |

… | … | − | … | = | … | … | … |

… | … | − | … | = | … | … | … |

… | … | − | … | = | … | … | … |

… | … | − | … | = | … | … | … |

… | … | − | … | = | … | … | … |

… | … | − | … | = | … | … | … |

… | … | − | … | = | … | … | … |

… | … | − | … | = | … | … | … |

## Gem price history

⚠️ Don’t trust these data. Check by yourself. And pay attention to the fact that maybe no one is buying.Date | Chain | Gem | Quality 1 | Quality 2 | Quality 3 | Quality 4 | ||||
---|---|---|---|---|---|---|---|---|---|---|

… | … | … | … | … | … | … | … | … | … | … |

## Todo

- Probability of profit
- URL parameters to save data

## Links

- The JavaScript file used by this application: STEPN-gem-upgrade-expectation.js (work in progress)
- This application uses these other free softwares:
*Expected value*(Wikipedia)-
*STEPN*:*Whitepaper*/*Game-Fi Elements*/*Gems and Sockets* -
*STEPN Tools*/*Gem Types and Level*(Pokey) - Other STEPN resources
- 🔗 My donate and referrals page