I have equation for truncated increasing geometric distribution given as pr=((1-alpha)alpha^{CW})/(1-alpha^{CW}). alpha^{-r} with r=1,.....,CW. alpha is parameter we can set between 0 and 1.

Harper George

Harper George

Answered question

2022-09-06

I have equation for truncated increasing geometric distribution given as p r = ( 1 α ) α C W 1 α C W . α r with r = 1 , . . . . . , C W. α is parameter we can set between 0 and 1.
Here probability of picking r = 1 is very low and r = C W is very high. How can i derive an equation from this equation that should give me values generated between r = 1 and CW with given distribution.
i should get values like this if r = 1 to 10. C W = 10   10 , 10 , 9 , 9 , 6 , 1 , 6 , 10 , 10 , 3 , 4(following geometric distribution from equation provided)

Answer & Explanation

Mckenna Friedman

Mckenna Friedman

Beginner2022-09-07Added 10 answers

Step 1
The standard way to generate a geometric variable with probability mass function P ( n ) = ( 1 p ) p n for n N 0 from a variable u uniformly distributed over [0,1] is n = log u log p .
Step 2
To restrict to 0 n < C W, we need to transform u to [ u 0 , 1 ] such that log u 0 log p = C W. Thus u 0 = p C W , so you can use u 1 u ( 1 p C W ) , and the formula for generating n becomes
n = log ( 1 u ( 1 p C W ) ) log p .
To map this to your case, take r = C W n and p = α

Do you have a similar question?

Recalculate according to your conditions!

New Questions in High school geometry

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?