H
H
hummerzon2019-12-02 21:50:33
JavaScript
hummerzon, 2019-12-02 21:50:33

Drawing up a formula for probability theory?

There is a chest with a price of 59 rubles, it contains items:
1 - 10 rubles
2 - 30 rubles
3 - 50 rubles
4 - 60 rubles
5 - 80 rubles
6 - 100 rubles
7 - 140 rubles
8 - 200 rubles
9 - 250 rubles
10 – 400 rubles
11 – 600 rubles
12 – 1000 rubles
13 – 1500 rubles
14 – 2500
rubles It is necessary that the drop percentage of each item depends on its price and on the price of the case.
It is advisable to write a formula that takes all this into account, or write a function in JavaScript.
If you have a solution but want to sell it to Telegram - @edgarbuhnin

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
polybook, 2019-12-12
@polybook

If I understand correctly, the player pays S=59 and randomly draws one item from the suitcase (cost s_i). The casino wants to win on a large number of games. If so, then a simple version of the algorithm:
1. p_i=S/(s_i)^k
2. Calculate Р=sum of all p_i
3. Normalize p_i=p_i/Р
If we take k=1.5, then the average casino win will be about 50%. р_1=13%, and р_14=0.02%
Of course, the formula may depend on the conditions (whether the player plays once or not - should he be involved)? etc. As correctly stated above, you need a balancer.

D
dollar, 2019-12-02
@dollar

There is no unique formula for this problem.
Creative can be done by a game designer (more precisely, a balancer is a subspecies of game designers).
In drawing up a formula, such a concept as mathematical expectation will help you .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question