jeudi 4 mai 2017

Calculating cumulating probabilities

I'm sorry if this is the wrong place for this query. If it is, perhaps someone could direct me to the right place.

I have a program that has a bunch of objects (say n) to process and a process that iteratively processes one object.

At each iteration I have one less objects processed. I want to check if I need more objects.

If there are 100 objects or more, I have plenty. When there are less than 100 objects, say, I would like to get some more objects at a probability (P) that is roughly zero at 100 and 1 at 0 objects.

P(n) = 1 - (n/100)

If I just do a random calculation based on this probability then over time I get a cumulative probability that is the product of the series of probabilities which is not the same as the formula above.

If the probability added each time, I would get an integral of P(n), but since it is an accumulating product, what is the new function and how to calculate the function?

So I would like the total probability up till now to equal that formula. How do I work out the probability I need at the current iteration?




Aucun commentaire:

Enregistrer un commentaire