0

I want to obtain probabilities for integer numbers [100,10000]. if number is close to 100 then i want very high probabilty (around 0.99), if number is close to 10000 i want very low probabilty(around 10^-10). I use Python language. Any help is appreciated.

I create game. I want to multiple amount x times when x is in [101, 10000].

Severin Pappadeux
  • 18,636
  • 3
  • 38
  • 64

2 Answers2

0

Well if I understand problem you have following situation:

  • range of probabilities is 10000 - 100 = 9900
  • each discrete number in that range have a same probability i.e. 1/9900
  • for each number z in range [100,10000] probability is z x 1/9900
  • No. each discrete number should have different probabilties. If number for example 101 probabilty should be 0.99, if 102 then 0.98 and after 150 probabilty should be decreased very qucikly. If we reach 10000 the probabilty should be 1/10000000000. – Genie in the bottle Aug 16 '23 at 11:13
0

Let’s make concrete example with values and probabilities:

import numpy as np

def generate_probabilities(min_val, max_val, alpha):
    x = np.arange(min_val, max_val + 1)
    probabilities = np.exp(-alpha * (x - min_val))
    probabilities /= np.sum(probabilities)  # Normalize probabilities to sum to 1
    return x, probabilities

min_val = 100
max_val = 10000
alpha = 0.0005  # You can adjust this value to control the distribution shape

x_values, probabilities = generate_probabilities(min_val, max_val, alpha)

Now you can sample prob for x value. Of coure there are lot more PDF that you can model.