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

DPUPDF

Name:
    DPUPDF (LET)
Type:
    Library Function
Purpose:
    Compute the doubly Pareto uniform probability density function with shape parameters m and n, location parameter alpha, and scale parameter (beta - alpha).
Description:
    The doubly Pareto uniform distribution has the following probability density function:

      f(x;m,n,alpha,beta) = k(m,n)*(beta-alpha)**m/(beta-x)**(m+1))
 x < alpha;
 1/(beta-alpha)    alpha <= x <= beta;
 (beta-alpha)**n/(x-alpha)**(n+1))   x > beta;
 alpha < beta; m, n > 0

    where

      k(m,n) = m*n/(m+m*n+n)

    with m and n denoting the shape parameters, alpha denoting the location parameter, and (beta - alpha) denoting the scale parameter.

    This distribution is uniform between alpha and beta. It has Paretian tails for both the lower and upper tails. The m parameter controls the shape of the lower tail and the n parameter controls the shape of the upper tail.

    The case where alpha = 0 and beta = 1 is referred to as the standard doubly Pareto uniform distribution.

Syntax:
    LET <y> = DPUPDF(<x>,<m>,<n>,<alpha>,<beta>)
                            <SUBSET/EXCEPT/FOR qualification>
    where <x> is a number, parameter, or variable;
                <y> is a variable or a parameter (depending on what <x> is) where the computed double Pareto uniform pdf value is stored;
                <m> is a number, parameter, or variable that specifies the first shape parameter;
                <n> is a number, parameter, or variable that specifies the second shape paremeter;
                <alpha> is a number, parameter, or variable that specifies the location parameter;
                <beta> is a number, parameter, or variable (<beta> - <alpha> is the scale parameter);
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    If <alpha> and <beta> are omitted, they default to 0 and 1, respectively.

Examples:
    LET A = DPUPDF(0.3,1.4,3.2,0,1)
    LET Y = DPUPDF(X,1.4,3.2,0,1)
    PLOT DPUPDF(X,1.4,3.2,-5,5) FOR X = -10 0.1 10
Note:
    Doubly Pareto uniform random numbers, probability plots, and goodness of fit tests can be generated with the commands:

      LET M = <value>
      LET N = <value>
      LET Y = DOUBLY PARETO UNIFORM RANDOM NUMBERS ...
                  FOR I = 1 1 N
      DOUBLY PARETO UNIFORM PROBABILITY PLOT Y
      DOUBLY PARETO UNIFORM PROBABILITY PLOT Y2 X2
      DOUBLY PARETO UNIFORM PROBABILITY PLOT Y3 XLOW XHIGH
      DOUBLY PARETO UNIFORM KOLMOGOROV SMIRNOV ...
                  GOODNESS OF FIT Y
      DOUBLY PARETO UNIFORM CHI-SQUARE ...
                  GOODNESS OF FIT Y2 X2
      DOUBLY PARETO UNIFORM CHI-SQUARE ...
                  GOODNESS OF FIT Y3 XLOW XHIGH

    For the random numbers, you can optionally specify the alpha and beta parameters with the commands

      LET ALPHA = <value>
      LET BETA = <value>

    The following commands can be used to estimate the m and n shape parameters for the doubly Pareto uniform distribution:

      LET M1 = <value>
      LET M2 = <value>
      LET N1 = <value>
      LET N2 = <value>
      DOUBLY PARETO UNIFORM PPCC PLOT Y
      DOUBLY PARETO UNIFORM PPCC PLOT Y2 X2
      DOUBLY PARETO UNIFORM PPCC PLOT Y3 XLOW XHIGH
      DOUBLY PARETO UNIFORM KS PLOT Y
      DOUBLY PARETO UNIFORM KS PLOT Y2 X2
      DOUBLY PARETO UNIFORM KS PLOT Y3 XLOW XHIGH

    The default values for M1 and M2 are 0.5 and 10. The default values for N1 and N2 are 0.5 and 10.

    The probability plot can then be used to estimate the alpha and beta limits (alpha = PPA0, beta = PPA0 + PPA1).

    The following options may be useful for these commands.

    1. Instead of generating the ppcc plot or ks plot on the original data, we can generate them on selected percentiles of the data. For example, if we have 1,000 points, we can choose to generate the plots on 100 evenly spaced percentiles with the command

        SET PPCC PLOT DATA POINTS 100

      This can be used to speed up the generation of the plot for larger data sets.

      Since the percent point function exists in simple closed form, this option is typically not needed.

    2. For the ks plot, we can fix the location and scale. This is equivalent to assuming that the alpha and beta parameters are known. If alpha and beta are known, enter the commands

        LET KSLOC = ALPHA
        LET KSSCALE = BETA - ALPHA

      The ppcc plot is invariant to location and scale, so we cannot fix the lower and upper limits.

    3. Since the doubly Pareto uniform distribution can sometimes be heavy-tailed, the following command can be useful before using the DOUBLY PARETO UNIFORM KS PLOT:

        SET PPCC PLOT LOCATION SCALE BIWEIGHT

      This bases the location and scale estimates on the biweight estimates of the fitted line for the underlying probability plot. In the final probability plot, use PPA0BW and PPA0BW + PPA1BW as the estimates of alpha and beta rather than PPA0 and PPA0 + PPA1. Since the ppcc plot is invariant to location and scale, this option does not apply.

    The BOOTSTRAP DISTRIBUTION command can be used to find uncertainty intervals for the ppcc plot and ks plot.

Default:
    None
Synonyms:
    None
Related Commands:
    DPUCDF = Compute the doubly Pareto uniform cumulative distribution function.
    DPUPPF = Compute the doubly Pareto uniform percent point function.
    TSPPDF = Compute the two-sided power probability density function.
    POWPDF = Compute the power probability density function.
    GTRPDF = Compute the generalized trapezoid probability density function.
    TSOPDF = Compute the two-sided ogive probability density function.
    OGIPDF = Compute the ogive probability density function.
    TSSPDF = Compute the two-sided slope probability density function.
    SLOPDF = Compute the slope probability density function.
    BETPDF = Compute the Beta probability density function.
    JSBPDF = Compute the Johnson SB probability density function.
Reference:
    Singh, Van Dorp, Mazzuchi "A Novel Asymmetric Distribution with Power Tails", Communications in Statistics, Theory and Methods, Vol. 36 (2), to appear.

    Van Dorp, Singh, and Mazzuchi "The Doubly-Pareto Uniform Distribution with Applications in Uncertainty Analysis and Econometrics", Mediterranean Journal of Mathematics, Vol. 3 (2), pp. 205-225.

Applications:
    Distributional Modeling
Implementation Date:
    2007/10
Program 1:
     
    LABEL CASE ASIS
    TITLE CASE ASIS
    TITLE OFFSET 2
    .
    MULTIPLOT 2 2
    MULTIPLOT CORNER COORDINATES 0 0 100 95
    MULTIPLOT SCALE FACTOR 2
    .
    LET ALPHA = 0
    LET BETA  = 1
    .
    LET M = 0.5
    LET N = 0.5
    TITLE M = ^m, N = ^n
    PLOT DPUPDF(X,M,N,ALPHA,BETA) FOR X = -5  0.01  5
    .
    LET M = 2
    LET N = 0.5
    TITLE M = ^m, N = ^n
    PLOT DPUPDF(X,M,N,ALPHA,BETA) FOR X = -5  0.01  5
    .
    LET M = 0.5
    LET N = 2
    TITLE M = ^m, N = ^n
    PLOT DPUPDF(X,M,N,ALPHA,BETA) FOR X = -5  0.01  5
    .
    LET M = 2
    LET N = 2
    TITLE M = ^m, N = ^n
    PLOT DPUPDF(X,M,N,ALPHA,BETA) FOR X = -5  0.01  5
    .
    END OF MULTIPLOT
    .
    CASE ASIS
    JUSTIFICATION CENTER
    MOVE 50 97
    TEXT Doubly Pareto Uniform Probability Density Functions
        
    plot generated by sample program

Program 2:
     
    let alpha = 0
    let beta = 1
    let m = 2
    let n = 1
    let msav = m
    let nsav = n
    .
    let y = doubly pareto uniform rand numb for i = 1 1 200
    .
    set ppcc plot location scale biweight
    doubly pareto uniform ks plot y
    let m = shape1
    let n = shape2
    justification center
    move 50 6
    text Mhat =  ^m (M = ^msav)
    move 50 2
    text Nhat =  ^n (N = ^nsav)
    .
    char x
    line bl
    doubly pareto uniform prob plot y
    let alphahat = ppa0bw
    let betahat = ppa0bw + ppa1bw
    move 50 6
    text Alphahat =  ^alphahat
    move 50 2
    text Betahat =  ^betahat
    char blank
    line solid
    .
    relative hist y
    limits freeze
    pre-erase off
    line color blue
    plot dpupdf(x,m,n,alphahat,betahat) for x = -5  0.01  5
    line color black
    limits
    pre-erase on
    .
    let ksloc = alphahat
    let ksscale = betahat - alphahat
    doubly pareto uniform kolm smir goodness of fit y
        
    plot generated by sample program

    plot generated by sample program

    plot generated by sample program

                       KOLMOGOROV-SMIRNOV GOODNESS-OF-FIT TEST
      
     NULL HYPOTHESIS H0:      DISTRIBUTION FITS THE DATA
     ALTERNATE HYPOTHESIS HA: DISTRIBUTION DOES NOT FIT THE DATA
     DISTRIBUTION:            DOUBLY-PARETO UNIFORM
        NUMBER OF OBSERVATIONS              =      200
      
     TEST:
     KOLMOGOROV-SMIRNOV TEST STATISTIC      =   0.4028350E-01
      
        ALPHA LEVEL         CUTOFF              CONCLUSION
                10%       0.086*              ACCEPT H0
                          0.085**
                 5%       0.096*              ACCEPT H0
                          0.095**
                 1%       0.115*              ACCEPT H0
                          0.114**
      
         *  - STANDARD LARGE SAMPLE APPROXIMATION  ( C/SQRT(N) )
        ** - MORE ACCURATE LARGE SAMPLE APPROXIMATION  ( C/SQRT(N + SQRT(N/10)) )
        

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