Questions about RAND() function

P

PSRumbagh

What kind of distribution does the RAND() function generate, e.g. uniform,
normal, discrete etc? Can it's distribution type be changed? I know how to
use the "random number generation tool".
 
M

Mike Middleton

PSRumbagh -
What kind of distribution does the RAND() function generate, e.g. uniform,
normal, discrete etc? <

Uniform, between zero and one.
Can it's distribution type be changed? <

No.

But, if you have a function for the inverse cumulative for a specific
distribution of interest, you can use RAND() to generate values from that
specific distribution. For example, NORMINV is the inverse cumulative
function for the normal distribution, so you can generate normal random
numbers using =NORMINV(RAND(),mean,stdev).

- Mike Middleton
http://www.DecisionToolworks.com
Decision Analysis Add-ins for Excel
 
T

Tushar Mehta

Check the first sentence in Excel help for RAND.

One can always generate a particular type of random variable from the
fact that the CDF follows a uniform distribution. While it may not be
the most efficient way to do so, it works.

So, to generate a normally distributed random variable use
NORMINV(RAND(),{normal distribution parameters}). Similarly, use
GAMMAINV, CHIINV, etc.

Use the same technique for discrete distributions, but now it might be
easier to also use a few cells. For example, to generate 1, 2, and 3
with probability 0.2, 0.7, and 0.1 respectively, put 0, 0.2, and 0.9
in 3 contiguous cells in a column. Put 1, 2, and 3 in the
corresponding rows in the column to the right. Then, use
=VLOOKUP(RAND(),{2-column-range-from-above}, 2, TRUE) to generate the
random value(s).



On Wed, 19 Nov 2008 17:30:01 -0800, PSRumbagh

What kind of distribution does the RAND() function generate, e.g.
uniform,
normal, discrete etc? Can it's distribution type be changed? I know
how to
use the "random number generation tool".

Regards,

Tushar Mehta
Microsoft MVP Excel 2000-2008
www.tushar-mehta.com
Tutorials and add-ins for Excel, PowerPoint, and other products
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top