SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

RAYPDF

Name:
    RAYPDF (LET)
Type:
    Library Function
Purpose:
    Compute the Rayleigh probability density function.
Description:
    The Rayleigh distribution is a special case of the chi distribution with degrees of freedom parameter = 2 and scale parameter sigma. It is also a special case of the Weibull distribution with shape parameter = 2 and scale parameter = SQRT(2)*sigma. Note that some sources may define the Rayleigh distribution as a Weibull with shape parameter = 2 and scale parameter = sigma.

    The Rayleigh distribution has the following probability density function:

      f(x,u,sigma)=((x-u)/sigma**2)*EXP(-(1/2)*(x-u)**2/(sigma**2))
 x > u, sigma > 0

    with mu and sigma denoting the location and scale parameters, respectively.

    The standard Rayleigh distribution is the case with mu = 0 and sigma = 1.

Syntax:
    LET <y> = RAYPDF(<x>,<loc>,<scale>)
                            <SUBSET/EXCEPT/FOR qualification>
    where <x> is a variable or a parameter;
                <loc> is an optional number or parameter that specifies the value of the location parameter;
                <scale> is an optional positive number or parameter that specifies the value of the scale parameter;
                <y> is a variable or a parameter (depending on what <x> is) where the computed Rayleigh pdf value is stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    LET Y = RAYPDF(3)
    LET Y = RAYPDF(X1,0,SIGMA)
    PLOT RAYPDF(X,0,SIGMA) FOR X = 0.01 0.01 5
Note:
    To generate Rayleigh random numbers, enter the command

      LET Y = RAYLEIGH RANDOM NUMBERS FOR I = 1 1 N

    To generate a Rayleigh probability plot or a Rayleigh Kolmogorov-Smirnov or chi-square goodness of fit test, enter the following commands

      RAYLEIGH PROBABILITY PLOT Y
      RAYLEIGH KOLMOGOROV SMIRNOV GOODNESS OF FIT Y
      RAYLEIGH CHI-SQUARE GOODNESS OF FIT Y

    The location and scale parameters for the Rayleigh distribution can be estimated by generating the Rayleigh probability plot (the intercept and slope of the line fit to the probability plot, PPA0 and PPA1, are estimates of location and scale).

    Alternatively, you can estimate the location and scale parameters using maximum likelihood:

      RAYLEIGH MAXIMUM LIKELIHOOD Y

    The maximum likelihood estimate of the scale parameter is:

      sigmahat = SQRT(SUM[i=1 to n][X(i)**2]/(2*n))

    with X containing the data and n denoting the sample size. By default, Dataplot will use the sample minimum as the estimate of location (and subtract this value from X before computing the maximum likelihood estimate of sigma). If you want to specify a different estimate of location, enter the command

      LET RAYLOC = <value>
Default:
    None
Synonyms:
    None
Related Commands:
    RAYCDF = Compute the Rayleigh cumulative distribution function.
    RAYPPF = Compute the Rayleigh percent point function.
    MAXPDF = Compute the Maxwell cumulative distribution function.
    CHPDF = Compute the chi probability density function.
    WEIPDF = Compute the Weibull probability density function.
    NORPDF = Compute the normal probability density function.
    LGNPDF = Compute the lognormal probability density function.
Reference:
    "Continuous Univariate Distributions: Volume I", Second Edition, Johnson, Kotz, and Balakrishnan, Wiley, 1994, pp. 453, 686.
Applications:
    Distributional Modeling, Statistical Physics
Implementation Date:
    6/2004
Program:
    Y1LABEL Probability
    X1LABEL X
    TITLE Rayleigh Probability Density
    LABEL CASE ASIS
    TITLE CASE ASIS
    PLOT RAYPDF(X) FOR X = 0  0.01  5
        
    plot generated by sample program

Date created: 7/7/2004
Last updated: 7/7/2004
Please email comments on this WWW page to alan.heckert@nist.gov.