14.03.2014 Views

Download Jmp User Guide

Download Jmp User Guide

Download Jmp User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix C Formula Functions Reference 485<br />

Random Functions<br />

Random Functions<br />

You can create formulas that generate real numbers by effectively “rolling the dice” within the<br />

constraints of the specified distribution. The random numbers are generated using the<br />

Mersenne-Twister technique. See Matsumoto and Nishimura (1998) in the reference section of the<br />

JMP Statistics and Graphics <strong>Guide</strong> for details. Also see the JMP Scripting <strong>Guide</strong> for details about syntax.<br />

Random Uniform<br />

Generates random numbers uniformly between 0 and 1. This means that any number between 0 and 1<br />

is as likely to be generated as any other. The result is an approximately even distribution. You can shift<br />

the distribution and change its range with constants. For example, 5 + Random Uniform()*20<br />

generates uniform random numbers between 5 and 25.<br />

Random Normal<br />

Generates random numbers that approximate a normal distribution with a mean of 0 and standard<br />

deviation of 1 if no arguments are used, or with the mean and standard deviation entered as arguments.<br />

The normal distribution is bell shaped and symmetrical. You can also modify the Random Normal<br />

function with constants if no arguments are entered to give a normal distribution with specific mean<br />

and standard deviation. For example, the formula Random Normal()*5 + 30 generates a random<br />

normal variable with a mean of 30 and a standard deviation of 5.<br />

C Formula Functions Reference<br />

Random Exp<br />

Generates a single parameter exponential distribution for the distribution parameter lambda=1. You<br />

can modify the exponential function to use a different lambda.<br />

For example, Random Exp()/.1 generates an exponential distribution for lambda=0.1. The<br />

exponential distribution is often used to model simple failure time data, where lambda is the failure<br />

rate.<br />

Random Gamma<br />

Gives a gamma distribution for the parameter, alpha, you enter as the function argument. The gamma<br />

distribution describes the time until the k th occurrence of an event. The gamma distribution can also<br />

have a scale parameter, beta. A gamma variate with shape parameter alpha and scale beta can be<br />

generated with the formula beta*Random Gamma(alpha). If 2*alpha is an integer, a Chi-squared<br />

variate with 2*alpha degrees of freedom is generated with the formula 2*Random Gamma(alpha).<br />

Random Beta<br />

Generates a pseudo-random number distributed Beta(alpha, beta).<br />

Random Cauchy<br />

Generates a Cauchy distribution with location parameter 0 and scale parameter 1. The Cauchy<br />

distribution is bell shaped and symmetric but has heavier tails than the normal distribution. A Cauchy<br />

variate with location parameter alpha and scale parameter beta can be generated with the formula<br />

alpha+beta*Random Cauchy().

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!