
BGEPDFName:
The betageometric distribution has the following probability density function:
with , , and B denoting the two shape parameters and the complete beta function, respectively. See the documentation for the BETA command for a description of the complete beta function.
<SUBSET/EXCEPT/FOR qualification> where <x> is a number, parameter, or variable containing nonnegative integer values; <alpha> is a number, parameter, or variable that specifies the first shape parameter; <beta> is a number, parameter, or variable that specifies the second shape parameter; <y> is a variable or a parameter (depending on what <x> is) where the computed betageometric pdf value is stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
LET A = BGEPDF(X,2.1,4) PLOT BGEPDF(X,ALPHA,BETA) FOR X = 1 1 20
We will refer to the first parameterization as the unshifted parameterization and the second parameterization as the shifted parameterization. To specify the shifted parameterization (i.e., starting at x = 0), enter the command
To reset the unshifted parameterization (i.e., starting at x = 1), enter the command
This distribution is also sometimes given with and reversed. In this case, the probability mass functions become
and
Irwin developed the Waring distribution based on the Waring expansion. The probability mass function for the Waring distribution is
The Waring distribution can be computed with the shifted form of the betageometric distribution with the following change in parameters:
= c  a If a = 1, then the Waring distribution reduces to the Yule distribution. You can compute the Waring (and Yule) distributions using the BGEPDF routine with the above reparameterization or you can use the WARPDF or YULPDF routines directly (enter HELP WARPDF or HELP YULPDF for details).
LET BETA = <value> LET Y = BETA GEOMETRIC RANDOM NUMBERS FOR I = 1 1 N
BETA GEOMETRIC PROBABILITY PLOT Y
BETA GEOMETRIC CHISQUARE GOODNESS OF FIT Y To obtain the first frequency and sample mean estimates and the maximum likelihood estimates of alpha and beta, enter the command
BETA GEOMETRIC MAXIMUM LIKELIHOOD Y2 X2 The maximim likelihood estimates are computed using the parameterization
The estimates for and can be expressed in terms of and as
The maximim likelihood estimates are the solutions of the equations
Dataplot prints the estimates for both parameterizations. You can generate estimates of and based on the maximum ppcc value or the minimum chisquare goodness of fit with the commands
LET ALPHA2 = <value> LET BETA1 = <value> LET BETA2 = <value> BETA GEOMETRIC KS PLOT Y BETA GEOMETRIC KS PLOT Y2 X2 BETA GEOMETRIC KS PLOT Y3 XLOW XHIGH BETA GEOMETRIC PPCC PLOT Y BETA GEOMETRIC PPCC PLOT Y2 X2 BETA GEOMETRIC PPCC PLOT Y3 XLOW XHIGH The default values of alpha1 and alpha2 are 0.5 and 5, respectively. The default values for beta1 and beta2 are 0.5 and 5, respectively. Due to the discrete nature of the percent point function for discrete distributions, the ppcc plot will not be smooth. For that reason, if there is sufficient sample size the KS PLOT (i.e., the minimum chisquare value) is typically preferred. However, it may sometimes be useful to perform one iteration of the PPCC PLOT to obtain a rough idea of an appropriate neighborhood for the shape parameters since the minimum chisquare statistic can generate extremely large values for nonoptimal values of the shape parameters. Also, since the data is integer values, one of the binned forms is preferred for these commands.
Sudhir R. Paul (2004), "Applications of the Beta Distribution" in "Handbook of the Beta Distribution", edited by Gupta and Nadarajah, MarcelDekker, pp. 431436. J. O. Irwin (1963), "The Place of Mathematics in Medical and Biological Statistics", Journal of the Royal Statistical Society, Series A, 126, pp. 144. Johnson, Kotz, and Kemp (1992), "Univariate Discrete Distributions", Second Edition, Wiley, chapter 6.
XLIMITS 0 50 XTIC OFFSET 0.5 0.5 LINE BLANK SPIKE ON SPIKE THICKNESS 0.3 . TITLE CASE ASIS LABEL CASE ASIS X1LABEL Number of Successes Y1LABEL Probability Mass . MULTIPLOT 2 2 MULTIPLOT CORNER COORDINATES 0 0 100 95 MULTIPLOT SCALE FACTOR 2 . TITLE Alpha = 0.5, Beta = 0.5 PLOT BGEPDF(X,0.5,0.5) FOR X = 0 1 50 . TITLE Alpha = 3, Beta = 0.5 PLOT BGEPDF(X,3.0,0.5) FOR X = 0 1 50 . TITLE Alpha = 0.5, Beta = 3 PLOT BGEPDF(X,0.5,3.0) FOR X = 0 1 50 . TITLE Alpha = 3, Beta = 3 PLOT BGEPDF(X,3.0,3.0) FOR X = 0 1 50 . END OF MULTIPLOT . CASE ASIS JUSTIFICATION CENTER MOVE 50 97 TEXT BetaGeometric Probability Mass Functions Program 2: let alpha = 1.3 let beta = 3.1 . let y = beta geometric random numbers for i = 1 1 200 let y3 xlow xhigh = integer frequency table y class width 1 let amin = minimum y let amin2 = amin  0.5 class lower amin2 let amax = maximum y let amax2 = amax + 0.5 class upper amax2 let y2 x2 = binned y retain y2 x2 subset y2 > 0 . beta geometric mle y2 x2 let alpha = alphaml let beta = betaml beta geometric chisquare goodness of fit test y3 xlow xhigh . title case asis title offset 2 label case asis title Relative Histogram with Overlaid ML Fit PDF xlimits 0 100 relative hist y2 x2 limits freeze preerase off line color blue plot bgepdf(x,alpha,beta) for x = amin 1 amax limits preerase on line color black . title Probability Plot for ML Fit y1label Theoretical x1label Data x2label Alpha = ^alpha, Beta = ^beta char x line blank beta geometric probability plot y2 x2 . title Minimum ChiSquare Plot y1label ChiSquare Value x1label Beta (Curves represent values of Alpha) x2label line solid all char blank all beta geometric ks plot y3 xlow xhigh justification center move 50 6 text Alpha = ^shape1, Beta = ^shape2 move 50 2 text Minimum ChiSquare Value = ^minks BETAGEOMETRIC PARAMETER ESTIMATION: SUMMARY STATISTICS: NUMBER OF OBSERVATIONS = 200 SAMPLE MEAN = 14.38000 SAMPLE VARIANCE = 11258.67 SAMPLE MINIMUM = 1.000000 SAMPLE MAXIMUM = 1477.000 FIRST FREQUENCY AND SAMPLE MEAN: ESTIMATE OF THETA = 0.2459736 ESTIMATE OF PI = 0.2949999 ESTIMATE OF ALPHA = 1.199316 ESTIMATE OF BETA = 2.866162 MAXIMUM LIKELIHOOD: ESTIMATE OF THETA = 0.2337158 ESTIMATE OF PI = 0.2932754 ESTIMATE OF ALPHA = 1.254837 ESTIMATE OF BETA = 3.023863 APPROXIMATE STANDARD ERROR OF PIHAT = 0.1860668E01 APPROXIMATE STANDARD ERROR OF THETAHAT = 0.4533415E02 THE COMPUTED VALUE OF THE CONSTANT ALPHA = 0.1254837E+01 THE COMPUTED VALUE OF THE CONSTANT BETA = 0.3023863E+01 CHISQUARED GOODNESSOFFIT TEST NULL HYPOTHESIS H0: DISTRIBUTION FITS THE DATA ALTERNATE HYPOTHESIS HA: DISTRIBUTION DOES NOT FIT THE DATA DISTRIBUTION: BETA GEOMETRIC SAMPLE: NUMBER OF OBSERVATIONS = 200 NUMBER OF NONEMPTY CELLS = 15 NUMBER OF PARAMETERS USED = 2 TEST: CHISQUARED TEST STATISTIC = 12.16778 DEGREES OF FREEDOM = 12 CHISQUARED CDF VALUE = 0.567699 ALPHA LEVEL CUTOFF CONCLUSION 10% 18.54935 ACCEPT H0 5% 21.02607 ACCEPT H0 1% 26.21697 ACCEPT H0
Date created: 8/23/2006 