RiskAMP Home
Support Forum : RiskAMP
Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Discrete Uniform Distributions
Posted by: ASG (---.range81-157.btcentralplus.com)
Date: March 31, 2009 05:14PM

What is the best way to get a distribution of integers with an equal probability of occurring? For example a distribution from 1 to 10 with a 1/10 probability of occurring.

I'd like something like the uniform value function but with integers. If there is a function that does this I didn't spot it.

Regards, Andrew




Re: Discrete Uniform Distributions
Posted by: riskamp (Moderator)
Date: March 31, 2009 05:20PM

You can use the Excel FLOOR function for that: for a distribution (1,10) try

=FLOOR(UniformValue(1,11),1)

This is like rounding, but always rounds down; so although the numbers are continuous, the FLOOR value will be discrete and will evenly distribute the results.

Note that because it's rounding down, for (1,10) you would need to have a uniform value between (1,11). If you want to make sure it's doing what it's supposed to, try something like

=SimulationInterval( A1, 4, 4 )

which will tell you the probability that the sample is == 4 (should be 10%).

Will that work for you?

Alex
alex@riskamp.com









Re: Discrete Uniform Distributions
Posted by: ASG (---.range81-157.btcentralplus.com)
Date: March 31, 2009 05:45PM

Thanks Alex that works fine.

I'd tried ROUND but the tails had incorrect probabilities. It seems INT works as well. What I'd missed was adding 1 to the upper number.

Regard, Andrew



Sorry, only registered users may post in this forum.
This forum powered by Phorum.