0% found this document useful (0 votes)
40 views33 pages

HB - J. Jenness - Statistical Distributions and Summary Data

This document describes a statistical analysis extension for ArcGIS. It allows calculating summary statistics and probability distributions for fields in tables. Summary statistics include mean, median, variance, minimum, maximum, and more. Probability distributions include normal, binomial, F, t, chi-square and others. The extension requires the Dialog Designer DLL file and provides instructions for use.

Uploaded by

Valentin Gyurov
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views33 pages

HB - J. Jenness - Statistical Distributions and Summary Data

This document describes a statistical analysis extension for ArcGIS. It allows calculating summary statistics and probability distributions for fields in tables. Summary statistics include mean, median, variance, minimum, maximum, and more. Probability distributions include normal, binomial, F, t, chi-square and others. The extension requires the Dialog Designer DLL file and provides instructions for use.

Uploaded by

Valentin Gyurov
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

NAME: Statistics and Distributions v. 1.

02
AKA: stats_dist.avx
Last Modified: October 12, 2003
TITLE: Statistical Distributions and Summary Data
TOPICS: Statistics, Distributions, t, F, logistic, normal, skewness, kurtosis, binomial,
probability, critical, Poisson, chi-square
AUTHOR: Jeff Jenness
GIS Analysis and Application Design
Jenness Enterprises, www.jennessent.com
[email protected]
DESCRIPTION: This extension gives you the ability to calculate a wider range of summary
statistical data than the basic set provided by ESRI, and also the power to generate probability
values and critical values from a wide range of statistical distributions.
Summary Statistics: From any numeric field in a table, this function will calculate the Mean,
Standard Error of the Mean, Confidence Intervals, Minimum, 1st Quartile, Median, 3rd Quartile,
Maximum, Variance, Standard Deviation, Average Absolute Deviation, Skewness (normal and
Fisher’s G1), Kurtosis (normal and Fisher’s G2), Number of Records, Number of Null Values,
and Total Sum.
Probability Calculators: This function will allow you to calculate the probability, cumulative
probability and inverse probability (i.e. given a cumulative probability, calculate the
corresponding critical value) of a wide range of statistical distributions, including the Beta,
Binomial, Cauchy, Chi-Square, Exponential, F, Logistic, LogNormal, Normal, Poisson,
Student’s T and Weibull distributions. This function is available as a general calculator that
remains open until you are finished with it, or as a Table tool that performs the calculations on
all selected records in a table.
REQUIRES: This extension requires that the Dialog Designer DLL file be available in your
ArcView/BIN32 directory (or $AVBIN/avdlog.dll), which it almost certainly is if you're running
AV3.1 or higher. You don't have to load the Dialog Designer; it only has to be available. If you
are running ArcView 3.0a, you can download the appropriate files for free from ESRI, at:
http://www.esri.com/software/arcview/extensions/dialog/index.html
UPDATES: The 1.01 update fixes a typo in the "Average Absolute Deviation" calculation
which caused it not to be divided by N, and gives more programming functions to Avenue
developers. Version 1.02 adds “Range” to the list of calculated statistics. The March 5 update
makes no changes to the extension, but rather corrects some errors in the manual pertaining to
generating summary statistics with Avenue. The October 12 update corrects some typos in the
manual on formulas for the PDF and IDF Normal and LogNormal functions.

GENERAL INSTRUCTIONS:
1: Begin by placing the “stats_dist.avx” file into the ArcView extensions directory
(../../Av_gis30/Arcview/ext32/).
2: After starting ArcView, load the extension by clicking on File Æ Extensions… , scrolling
down through the list of available extensions, and then clicking on the checkbox next to the
extension called “Statistics and Distributions”
Table of Contents:
Table of Contents:...................................................................................................................- 2 -
Field Summary Statistics: .......................................................................................................- 3 -
Probability Distribution Calculators: ......................................................................................- 7 -
Appendix A: Calculating Summary Statistics with Avenue................................................- 10 -
Appendix B: Functions, Parameters and Usages .................................................................- 13 -
Probability Density Functions...........................................................................................- 13 -
Cumulative Distribution Functions:..................................................................................- 19 -
Quantiles (also referred to as Inverse Density Functions or Percent Point Functions). ...- 26 -
References.............................................................................................................................- 33 -

An on-line version of this manual may be viewed at:

http://www.jennessent.com/arcview/stats_dist.htm

Enjoy! Please contact the author if you have problems or find bugs.
Jeff Jenness [email protected]
3020 N. Schevene Blvd.
Flagstaff, AZ 86004
USA

Please visit Jenness Enterprises ArcView Extensions site for more ArcView Extensions and
other software by the author. We also offer customized ArcView-based GIS consultation
services to help you meet your specific data analysis and application development needs.
Field Summary Statistics:
This function provides similar values to those produced by the “Summarize” function in
the “Field” menu, except with a few more options and a higher level of precision. Open the
“Summary Statistics” dialog by opening your table, selecting the field you are interested in, and
then clicking on the button. This button will not be enabled unless a numeric field has been
selected. Then, select your summary statistics and click “OK”. The output will open in a Report
window and the data will automatically be copied to the clipboard for you to paste into other
applications.
This tool is designed with a dialog interface to make it easy for users to get and view a
variety of statistics describing a set of data. This tool can also be accessed with Avenue code,
which enables more advanced users to pass these statistics to variables, and then use the
calculated values in other places. Please review Appendix A, Calculating Summary Statistics
with Avenue, for details on how to do this.

1) Mean: Calculated as:


∑x
n
s
2) Std Error of the Mean: Calculated as: s {Y } = , where s = sample standard deviation
n
3) Confidence Interval: The confidence limits for population mean µ with a confidence
coefficient (1 – α), given a sample population mean X , are calculated as:

-3-
X ± t 1−α s {Y },
( 2 )
; n −1

s
where s {Y } = , s = Sample Standard Deviation
n
and t 1−α
( 2 )
; n −1
= value from the t distribution at p = 1 − α ( 2 ) and n − 1 degrees of freedom.
4) Minimum: The lowest value in the data set.
5) Quartiles and Median: Those values at which at most (P)% of the data lie below the value
and at most (1 – P)% of the data lie above the value. There are different ways to calculate
quartile values, which produce similar but different results. Some methods draw the quartile
values from the data set itself, so that the value called the “quartile” will always be found in
the data. This script uses a different method which occasionally calculates a quartile value
which represents the midpoint between two values from the data set, applying the following
algorithm:

Assuming the data have been sorted from lowest to highest:


Quartile 1 Index = (N + 1) × 0.25 = Q(1)
Quartile 2 Index = (N + 1) × 0.50 = Q( 2)
Quartile 3 Index = (N + 1) × 0.75 = Q(3)
If Q(N ) is an integer, then:
Quartile = Q(N )th Value
If Q(N ) is not an integer, then:
R = that value at which R < N < R + 1, and

Quartile =
( Q( R ) th
) (
Value + Q(R + 1)th Value )
2

6) Maximum: The highest value in the data set.


7) Range: Maximum - Minimum
n
∑ ( y i − y )2
8) Variance: Calculated as: Variance = i =1
n −1
n
∑ ( y i − y )2
9) Standard Deviation: Calculated as: Std. Deviation = i =1

n −1
n
∑ yi − y
10) Average Deviation: Calculated as: Avg. Deviation = i =1
n
11) Skewness: Measures the degree of asymmetry of the sample data around the mean.

-4-
m3
Skewness = ,
m23 2
n
∑ ( y i − y )2
where: m2 = 2nd moment = i =1
n
n
∑ ( y i − y )3
and: m3 = 3 moment =
rd i =1
n

12) Skewness (Fisher’s G1): There are alternative methods to calculate skewness measures of
the data. S-PLUS uses the Fisher’s G1 variation, calculated as:
b1 n ( n − 1)
Fisher's G1 =
n−2
m
where: b1 = 33 2 (standard measure of skewness),
m2
n
∑ ( y i − y )2
and: m2 = 2nd moment = i =1
n
n
∑ ( y i − y )3
and: m3 = 3 moment =
rd i =1

n
13) Kurtosis: Measures the “peakedness” or “pointedness” in a distribution, and calculated as:
m4
Kurtosis = ,
m2 2
n
∑ ( y i − y )2
where: m2 = 2nd moment = i =1
n
n
∑ ( y i − y )4
and: m4 = 4 th moment = i =1
n

-5-
14) Kurtosis (Fisher’s G2): As with Skewness, there are alternative ways to calculate kurtosis.
S-PLUS uses the Fisher’s G2 variation, calculated as:

Fisher's G2 =
( n + 1)( n − 1) ⎡b − 3 ( n − 1) ⎤
( n − 2 )( n − 3) ⎢⎣ 2 n + 1 ⎥⎦
m4
where: b2 = (standard measure of kurtosis),
m2 2
n
∑ ( y i − y )2
and: m2 = 2nd moment = i =1
n
n
∑ ( y i − y )4
and: m4 = 4th moment = i =1
n
15) Number of Rows: The total number of rows of data examined during the analysis.
16) Number of ‘Null’ Values: The total number of cases of missing data. These are represented
as “null” numbers in the table, which are different than zeros.
17) Total Sum: Sum of all non-null values, calculated as: ∑x

-6-
Probability Distribution Calculators:

This extension includes two versions of a Probability Distribution Calculator, each of


which calculate distribution data based on a variety of distributions and parameters. The
Probability Distribution Calculator is started from within a View, and is opened by clicking
on the button in the View toolbar. You simply enter the input and parameter values, specify
whether you are calculating Probability, Cumulative Probability or Quantile values, and click
“Calculate”, and the result appears in the “Output Value” window. This calculator stays open
until you close it and you can leave it open as you do other things in ArcView.
The “Table Probability Distribution Calculator” is designed to work on all selected
records in a table, applying the distribution parameters to each value and saving the results to a
field in that table. This calculator is opened from within a Table by clicking on the button in
the Table toolbar. Select the field containing the “Input” values, then decide whether to create a
new field or use an existing field to save the “Output" values, then click “Calculate” to generate
distribution values for all selected records. The window stays open until you click “Calculate” or
“Cancel”.
The Distribution functions included with this extension may be grouped in 3 categories.
In general, the Probability Density Functions return the probability that the Test Value = X given
that particular distribution. The Cumulative Distribution Functions return the probability that the
Test Value ≤ X, given that particular distribution. The Quantile Functions (sometimes referred
to as Inverse Density Functions or Percent Point Functions) return the Value X at which P(X) =
[specified probability], given that particular distribution.

Functions and Probability Distributions


Distribution Probability Density Function Cumulative Distribution Function Quantile Function

Beta PDF_Beta CDF_Beta IDF_Beta

Binomial PDF_Binomial CDF_Binomial IDF_Binomial

Cauchy PDF_Cauchy CDF_Cauchy IDF_Cauchy

Chi-Square PDF_ChiSquare CDF_ChiSquare IDF_ChiSquare

-7-
Exponential PDF_Exp CDF_Exp IDF_Exp

F PDF_F CDF_F IDF_F

Logistic PDF_Logistic CDF_Logistic IDF_Logistic

LogNormal PDF_LogNormal CDF_LogNormal IDF_LogNormal

Normal PDF_Normal_Simpsons CDF_Normal IDF_Normal

Poisson PDF_Poisson CDF_Poisson IDF_Poisson

Student’s T PDF_StudentsT CDF_StudentsT IDF_StudentsT

Weibull PDF_Weibull CDF_Weibull IDF_Weibull

Equations for each function are included in the Appendix B: Distribution Functions,
Parameters and Usages, but some them do not have closed formulas that can be calculated and
therefore must be computed numerically. The author refers interested persons to the references
to find source code and computational methods of calculating these functions. The author
especially recommends Croarkin & Tobias (date unknown) and McLaughlin (2001) for
illustrations of the various distributions, and Press et al. (1988-1997) and Burkardt (2001) for
computational methods. These sources are all available on-line.
The descriptions in Appendix B include 4 methods of utilizing each function. The first
method describes how to use the Probability Distribution Calculators to calculate values. There
are three additional methods available for programmers who want to access the functions
through Avenue code. Simply copy the line of code exactly as written, substituting your
parameter variable names in the proper places.
Avenue Functions:
1) The first Avenue option sends your parameters to a central script called
“Jennessent.DistFunc”, which checks for possible errors in the parameters (using a
negative value for Degrees of Freedom, for example). If the script finds such values, it
will halt operation and alert you to the problem. If it doesn’t find errors, it forwards your
parameters to the appropriate script and returns the result to you. Users may want to
review the script “Jennessent.ProbDlogCalculate” for an example of this option.
IMPORTANT: Users should also be aware that this script only checks to see if the input
values follow the rules described in Appendix B. It doesn’t check for basic errors such as
sending a non-numeric value to the script.
2) The second Avenue option is very similar to the first in that it sends your parameters to a
central script to check for errors (“Jennessent.TableDistFunc” in this case), but it doesn’t
halt operation if it finds an error. Rather, it returns an error message (in String format)
detailing the problem. The author recommends this option for cases in which the user
wants to conduct calculations on a series of values (i.e. records in a table), but doesn’t
want the function to stop if it finds an illegal value (possibly a record with no data). This
option would allow the user to insert an “if-then” statement in their code to check if the
result is a string or a number. Numerical responses would indicate successful
calculations while String responses could be appended to a running report of unsuccessful

-8-
calculations. Users may want to review the script “Jennessent.ProbTabDlogCalculate”
for an example of this option.
3) If you’d like to skip the error-checking routines, use the third Avenue option to send your
parameters to the relevant script directly.

-9-
Appendix A: Calculating Summary Statistics with Avenue
The Summary Statistics tool collects a series of True/False and Numerical parameters
from the user and sends them to a script called “Jennessent.CalcFieldStats”, which does the
necessary calculations and returns a list of results. The tool then prints those results up in a
Report window for the user.
Avenue programmers can bypass the dialog and send values to the script directly if they
wish, and then they will have the desired statistics directly available to them in a list. For
example, many statistical calculations require such things as means, standard deviations,
variances, quartiles, etc. The user may want to generate these values early in a script and then
use them in later calculations. The “Jennessent.CalcFieldStats” script makes it simple to
generate such values from data in a table.
This option is a little simpler than the standard Avenue method for generating statistics,
which is to create a new file on the hard drive and then use the “Summarize” request to save
statistics to that file. It also offers a larger variety of statistical output, including such things as
Confidence Intervals, Standard Error of the Mean, Average Deviation, and Kurtosis/Skewness
values. This option is also a little slower on large datasets, however, and it doesn’t divide up the
dataset into subsets like “Summarize” does.
The function can be used with just a few lines of code:
ListOfResults = av.Run(“Jennessent.CalcFieldStats”, {ListOfInputParameters,
theVTab, theField})
The object “theVTab” is a VTab object containing your data, and “theField” is a Field object in
the VTab, reflecting the field you want to calculate statistics on.
The “ListOfInputParameters” must contain 20 values, most of which are Boolean
(true/false) reflecting whether you want that particular statistic calculated:
ListOfInputParameters = {CalcMean, CalcSEMean, CalcConInt, Con_Level,
CalcMinimum, Calc1stQuart, CalcMedian, Calc3rdQuart, CalcMaximum,
CalcVariance, CalcStandDev, CalcAvgDev, CalcSkewness, CalcSkewFish,
CalcKurtosis, CalcKurtFish, CalcCount, CalcNumNull, CalcSum, CalcRange}

Where:
CalcMean: Boolean, True if you want to calculate the mean.
CalcSEMean: Boolean, True if you want to calculate the standard error of the mean.
CalcConInt: Boolean, True if you want to calculate confidence intervals of the mean.
Con_Level: Number, 0 ≤ p ≤ 1, where p = probability = (1 - α )
CalcMinimum: Boolean, True if you want to calculate the minimum value.
Calc1stQuart: Boolean, True if you want to calculate the 1st quartile.
CalcMedian: Boolean, True if you want to calculate the median.
Calc3rdQuart: Boolean, True if you want to calculate the 3rd quartile.
CalcMaximum: Boolean, True if you want to calculate the maximum value.
CalcVariance: Boolean, True if you want to calculate the variance.
CalcStandDev: Boolean, True if you want to calculate the standard deviation.
CalcAvgDev: Boolean, True if you want to calculate the absolute average deviation.
CalcSkewness: Boolean, True if you want to calculate the standard skewness.

- 10 -
CalcSkewFish: Boolean, True if you want to calculate the Fisher’s G1 skewness.
CalcKurtosis: Boolean, True if you want to calculate the standard kurtosis.
CalcKurtFish: Boolean, True if you want to calculate the Fisher’s G2 kurtosis.
CalcCount: Boolean, True if you want to calculate the total number of rows of data.
CalcNumNull: Boolean, True if you want to calculate the number of null values.
CalcSum: Boolean, True if you want to calculate the sum.
CalcRange: Boolean, True if you want to calculate the Range.
When the script finishes, it will return a list of 18 values to you representing the various
statistics you requested. If you did not request a particular statistic, then it will not be calculated
and the return list will contain a “nil” object in it’s place. Note that if you requested a confidence
interval, the upper and lower levels are returned as a separate list (3rd object in the Return List).
Return list: {Mean, Standard Error of Mean, {Lowerst Confidence Level,
Upper Confidence Level}, Minimum, 1 Quartile, Median, 3rd
Quartile, Maximum, Variance, Standard Deviation, Skewness,
Fisher’s GI Skewness, Kurtosis, Fisher’s G2 Kurtosis,
Record Count, Number of Null Values, Sum, Range}

For example: If you had a table of population demographic data containing a field of Annual
Income values, and you were interested in the mean annual income plus a 95% confidence
interval around that mean, then you would set up the code as follows:
theDemographyVTab = YourTable.GetVTab
theField = theDemographyVTab.FindField(“Income”)
theInputParameters = {True, False, True, 0.95, False, False, False, False,
False, False, False, False, False, False, False, False, False, False,
False, False}
theReturnList = av.Run(“Jennessent.CalcFieldStats”, {theInputParameters,
theDemographyVTab , theField})
theMeanIncome = theReturnList.Get(0)
theLowerConfidenceLimit = theReturnList.Get(2).Get(0)
theUpperConfidenceLimit = theReturnList.Get(2).Get(1)
All the objects in “theReturnList” will be “nil” objects except for the ones at indices 0
and 2. The Mean will be at index 0, the Lower 95% Confidence Limit will be the first item in
index 2, and the Upper 95% Confidence Limit will be the second item in index 2.
In general, all the possible statistics can be obtained with the following lines of code.
Simply copy and paste the appropriate lines into your script:
theMean = theReturnList.Get(0)
theSEMean = theReturnList.Get(1)
if (Calculating_Confidence_Intervals)
LowerCI = theReturnList.Get(2).Get(0)
UpperCI = theReturnList.Get(2).Get(1)
end
theMinimum = theReturnList.Get(3)
theQ1 = theReturnList.Get(4)

- 11 -
theMedian = theReturnList.Get(5)
theQ3 = theReturnList.Get(6)
theMaximum = theReturnList.Get(7)
theVar = theReturnList.Get(8)
theStdDev = theReturnList.Get(9)
theAvgDev = theReturnList.Get(10)
theSkew = theReturnList.Get(11)
theFisherSkew = theReturnList.Get(12)
theKurt = theReturnList.Get(13)
theFisherKurt = theReturnList.Get(14)
theCount = theReturnList.Get(15)
theNumberNull = theReturnList.Get(16)
theSum = theReturnList.Get(17)
theRange = theReturnList.Get(18)

- 12 -
Appendix B: Functions, Parameters and Usages

Probability Density Functions:


1. PDF_Beta: This function returns the probability that the Test Value = X, assuming a Beta
distribution and the specified Shape parameters. This is the standardized Beta function,
where Location = 0 and Scale (upper bound) = 1. According to McLaughlin (2001),
parameters Shape1 and Shape2 can be any positive value, but they rarely exceed 10. The
function becomes nearly flat if the values get much larger than this.
a) Parameters:
i) Test Value: Number
ii) Shape1: Number > 0
iii) Shape2: Number > 0
b) Usages:
i) From “Probability Distribution Calculator”, select “Probability (PDF)” and Beta
distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc", {“PDF_Beta”, {Test Value,
Shape1, Shape2}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc", {“PDF_Beta”, {Test
Value, Shape1, Shape2}})
iv) (Avenue): theProb = av.Run(“Jennessent.PDF_Beta”, {Test Value, Shape1,
Shape2})

Γ(S1 + S2 ) S −1 S −1
Beta PDF = y (1 − y )
1 2

c) Function: Γ(S1 )Γ(S2 )


where: y = Test Value, S1 = Shape 1, S2 = Shape 2

and: Γ( x ) = ∫ t x −1e −1dt
0

2. PDF_Binomial: The Binomial distribution is used when there are exactly two mutually
exclusive outcomes of a trial. This function returns the probability of getting X successes out
of N trials, given a probability of success = P.
a) Parameters:
i) # Successes: Integer ≥ 0
ii) # Trials: Integer ≥ 2, # Successes
iii) Probability of Success: Number (0 ≥ p ≥ 1)
b) Usages:
i) From "Probability Distribution Calculator", select "Probability (PDF)" and Binomial
distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc", {“PDF_Binomial”, {#Success,
#Trials, Probability of Success}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc", {“PDF_Binomial”,
{#Success, #Trials, Probability of Success}})

- 13 -
iv) (Avenue): theProb = av.Run(“Jennessent.PDF_Binomial”, {#Success, #Trials,
Probability or Success}})

⎛ B! ⎞ y B−y
c) Function: Binomial PDF = ⎜ ⎟ A (1 − A)
⎝ y !( B − y )! ⎠
where: y = #Successes, A = Probability of Success, B = #Trials

3. PDF_Cauchy: This function returns the probability that the Test Value = X, assuming a
Cauchy distribution with the specified mean and standard deviation. The Standardized
Cauchy distribution is that with Location = 0 and Scale = 1.
a) Parameters:
i) Test Value: Number
ii) Location: Number
iii) Scale: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Probability (PDF)" and Cauchy
distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“PDF_Cauchy”, {Test Value,
Location, Scale}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“PDF_Cauchy”, {Test
Value, Location, Scale}})
iv) (Avenue): theProb = av.Run("Jennessent.PDF_Cauchy", {Test Value, Location,
Scale})

1
c) Function: Cauchy PDF =
⎡ ⎛ y − A⎞
2

π B ⎢1 + ⎜ ⎟ ⎥
⎢⎣ ⎝ B ⎠ ⎥⎦
where: y = Test Value, A = Location, B = Scale

4. PDF_ChiSquare: This function returns the probability that the Test Value = X, assuming a
Chi-Square distribution with the specified Degrees of Freedom. The Chi-Square distribution
results when v (where v = Degrees of Freedom) independent variables with standard normal
distributions are squared and summed (Croarkin & Tobias, Date unknown).
a) Parameters:
i) Test Value: Number ≥ 0
ii) Degrees of Freedom: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Probability (PDF)" and
Chi-Square distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“PDF_ChiSquare”, {Test
Value, DF}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“PDF_ChiSquare”,
{Test Value, DF}})
iv) (Avenue): theProb = av.Run("Jennessent.PDF_ChiSquare", {Test Value, DF})

- 14 -
−y v
−1
e 2 x2
Chi-Square PDF = v
⎛v ⎞
c) Function: 22 Γ ⎜ ⎟
⎝ 2⎠
where: y = Test Value, S1 = Shape 1, S2 = Shape 2

and: Γ( x ) = ∫ t x −1e −1dt
0

5. PDF_Exp: This function returns the probability that the Test Value = X, assuming an
Exponential distribution with the specified mean. This script uses the 1-parameter version of
the equation (i.e. assuming Location = 0). The Standard Exponential Distribution is that
which has Mean = 1.
a) Parameters:
i) Test Value: Number ≥ 0
ii) Mean: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Probability (PDF)" and
Exponential distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“PDF_Exp”, {Test Value,
Mean}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“PDF_Exp”, {Test
Value, Mean}})
iv) (Avenue): theProb = av.Run("Jennessent.PDF_Exp", {Test Value, Mean})

x
1 −
β
c) Function: Exponential PDF = e
β
where: x = Test Value, β = Mean (or Scale Parameter)

6. PDF_F: This function returns the probability that the Test Value = X, assuming an
F distribution with the specified Degrees of Freedom. The F distribution is the ratio of two
Chi-Square distributions with ratios v1 and v2 respectively.
a) Parameters:
i) Test Value: Number ≥ 1
ii) 1st Degrees of Freedom: Number > 1
iii) 2nd Degrees of Freedom: Number > 1
b) Usages:
i) From "Probability Distribution Calculator", select "Probability (PDF)" and
F distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“PDF_F”, {Test Value, DF1,
DF2}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“PDF_F”, {Test Value,
DF1, DF2}})
iv) (Avenue): theProb = av.Run("Jennessent.PDF_F", {Test Value, DF1, DF2})

- 15 -
v1

⎛ v + v ⎞ ⎛ v ⎞ 2 1 −1
v
Γ⎜ 1 2 ⎟⎜ 1 ⎟ x 2
⎝ 2 ⎠ ⎝ v2 ⎠
F PDF = v1 +v 2
c) Function: ⎛ v ⎞ ⎛ v ⎞⎛ v x ⎞ 2
Γ ⎜ 1 ⎟ Γ ⎜ 1 ⎟ ⎜1 + 1 ⎟
⎝ 2 ⎠ ⎝ 2 ⎠⎝ v2 ⎠
where: x = Test Value, v1 = DF1, v 2 = DF2

and: Γ( x ) = ∫ t x −1e −1dt
0

7. PDF_Logistic: This function returns the probability that the Test Value = X, assuming a
Logistic distribution with the specified mean and scale.
a) Parameters:
i) Test Value: Number
ii) Mean: Number
iii) Scale: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Probability (PDF)" and Logistic
distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“PDF_Logistic”, {Test Value,
Mean, Scale}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“PDF_Logistic”, {Test
Value, Mean, Scale}})
iv) (Avenue): theProb = av.Run("Jennessent.PDF_Logistic", {Test Value, Mean,
Scale})

⎛ y − A⎞
exp ⎜ ⎟
1 ⎝ B ⎠
c) Function: Logistic PDF = 2
B⎡ ⎛ y − A ⎞⎤
⎢1 + exp ⎜ B ⎟ ⎥
⎣ ⎝ ⎠⎦
where: y = Test Value, A = Mean, B = Scale

8. PDF_LogNormal: This function returns the probability that the Test Value = X, assuming a
LogNormal distribution with the specified mean and scale. A LogNormal distribution occurs
when natural logarithms of variable X are normally distributed. The Standard LogNormal
Distribution is that with Mean = 0 and Scale = 1. The 2-Parameter LogNormal Distribution
is that with Mean = 0.
a) Parameters:
i) Test Value: Number ≥ 0
ii) Mean: Number > 0
iii) Scale: Number > 0
b) Usages:

- 16 -
i) From "Probability Distribution Calculator", select "Probability (PDF)" and
LogNormal distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“PDF_LogNormal”, {Test
Value, Mean, Scale}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“PDF_LogNormal”,
{Test Value, Mean, Scale}})
iv) (Avenue): theProb = av.Run("Jennessent.PDF_LogNormal", {Test Value, Mean,
Scale})

1 ⎛ 1 ⎛ ln ( y ) − A ⎞2 ⎞
c) Function: LogNormal PDF = exp ⎜ − ⎜ ⎟ ⎟
B 2π ⎜ 2⎝ B ⎠ ⎟⎠

where: y = Test Value, A = Mean, B = Scale

9. PDF_Normal: This function returns the probability that the Test Value = X, assuming a
Normal distribution with the specified mean and standard deviation. The Standard Normal
Distribution is that with Mean = 0 and Standard Deviation = 1.
a) Parameters:
i) Test Value: Number
ii) Mean: Number
iii) Standard Deviation: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Probability (PDF)" and Normal
distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“PDF_Normal”, {Test Value,
Mean, St. Dev.}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“PDF_Normal”, {Test
Value, Mean, St. Dev.}})
iv) (Avenue): theProb = av.Run("Jennessent.PDF_Normal", {Test Value, Mean, St.
Dev.})

1 ⎛ 1 ⎛ y − A ⎞2 ⎞
c) Function: Normal PDF = exp ⎜ − ⎜ ⎟
B 2π ⎜ 2 ⎝ B ⎟⎠ ⎟
⎝ ⎠
where: y = Test Value, A = Mean, B = Scale

10. PDF_Poisson: This function returns the probability that the Specified Number of
Events = X, assuming a Poisson distribution with the specified mean.
a) Parameters:
i) # Events: Integer ≥ 0
ii) Mean: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Probability (PDF)" and Poisson
distribution.

- 17 -
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“PDF_Poisson”, {# Events,
Mean}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“PDF_Poisson”, {#
Events, Mean}})
iv) (Avenue): theProb = av.Run("Jennessent.PDF_Poisson", {# Events, Mean})

exp − A A y
c) Function: Poisson PDF =
y!
where: y = Test value, A = Expectation (mean)

11. PDF_StudentsT: This function returns the probability that the Test Value = X, assuming a
Students T distribution with the specified Degrees of Freedom. A Student’s T distribution
with 1df is a Cauchy Distribution, and it approaches a Normal distribution when DF>30.
Various sources recommend using the Normal distribution if DF>100.
a) Parameters:
i) Test Value: Number
ii) Degrees of Freedom: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Probability (PDF)" and Student’s
T distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“PDF_StudentsT”, {Test
Value, DF}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“PDF_StudentsT”, {Test
Value, DF}})
iv) (Avenue): theProb = av.Run("Jennessent.PDF_StudentsT", {Test Value, DF})

⎛ v +1⎞
Γ⎜ ⎟
v +1
2 − 2
2 ⎠ ⎡ y ⎤
Student's T PDF = ⎝ ⎢1 + ⎥
⎛ v ⎞ v ⎦
c) Function: πv Γ ⎜ ⎟ ⎣
⎝ 2⎠
where: y = Test Value, v = Degrees of Freedom

and: Γ( x ) = ∫ t x −1e −1dt
0

12. PDF_Weibull: This function returns the probability that the Test Value = X, assuming a
Weibull distribution with the specified Location, Scale and Shape parameters. The
Standardized Weibull Distribution is that with Location = 0 and Scale = 1. The 2-Parameter
Weibull Distribution is that with Location = 0.
a) Parameters:
i) Test Value: Number > Location
ii) Location: Number
iii) Scale: Number > 0
iv) Shape: Number > 0
b) Usages:

- 18 -
i) From "Probability Distribution Calculator", select "Probability (PDF)" and Weibull
distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“PDF_Weibull”, {Test Value,
Location, Scale, Number}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“PDF_Weibull”, {Test
Value, Location, Scale, Number}})
iv) (Avenue): theProb = av.Run("Jennessent.PDF_Weibull", {Test Value, Location,
Scale, Number})

⎛ ⎛ y − A ⎞2 ⎞
C −1 ⎜ −⎜ ⎟
⎛ C ⎞⎛ y − A ⎞ ⎜ ⎝ b ⎟⎠ ⎟
c) Function: Weibull PDF = ⎜ ⎟ ⎜ ⎟ exp
⎝ ⎠

⎝ B ⎠⎝ B ⎠
where: y = Test Value, A = Location, B = Scale, C = Shape

Cumulative Distribution Functions:


1. CDF_Beta: This function returns the probability that the Test Value ≤ X, assuming a Beta
distribution with the specified Shape parameters. This is the Standardized Beta function,
where Location = 0 and Scale (upper bound) = 1. According to McLaughlin (2001),
parameters Shape1 and Shape2 can be any positive value, but they rarely exceed 10. The
function becomes nearly flat if the values get much larger than this.
a) Parameters:
i) Test Value: Number
ii) Shape1: Number > 0
iii) Shape2: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and Beta distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_Beta”, {Test Value,
Shape1, Shape2}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“CDF_Beta”, {Test
Value, Shape1, Shape2}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_Beta", {Test Value, Shape1,
Shape2})

Beta CDF = I ( y , S1, S2 ) (From Press et al, 1997)


c) Function: where: y = Test Value, S1 = Shape 1, S2 = Shape 2
Bx ( a, b ) 1 x
and: I ( x, a, b ) ≡ ≡ ∫ t a −1 (1 − t )b −1 dt
B ( a, b ) B ( a, b ) 0

and: B ( a, b ) = ∫ t a −1 (1 − t )b −1 dt
1

- 19 -
2. CDF_Binomial: The Binomial distribution is used when there are exactly two mutually
exclusive outcomes of a trial. This function returns the probability of getting ≤ X successes
out of N trials, given a probability of success= P.
a) Parameters:
i) # Successes: Integer ≥ 0
ii) # Trials: Integer ≥ 2, # Successes
iii) Probability of Success: Number (0 ≥ p ≥ 1)
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and Binomial distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_Binomial”, {#Success,
#Trials, Probability of Success}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“CDF_Binomial”,
{#Success, #Trials, Probability of Success}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_Binomial", {#Success, #Trials,
Probability of Success})

y
⎛ B! ⎞ i
c) Function: Binomial CDF = ∑ ⎜ ⎟ A (1 − A)
B −i

i =1 ⎝ i !(B − i )! ⎠

where: y = #Successes, A = Probability of Success, B = #Trials

3. CDF_Cauchy: This function returns the probability that the Test Value ≤ X, assuming a
Cauchy distribution with the specified Location and Scale parameters. The Standardized
Cauchy distribution has Location = 0 and Scale = 1.
a) Parameters:
i) Test Value: Number
ii) Location: Number
iii) Scale: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and Cauchy distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_Cauchy”, {Test Value,
Location, Scale}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“CDF_Cauchy”, {Test
Value, Location, Scale}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_Cauchy", {Test Value, Location,
Scale})

1 1 ⎛ y − A⎞
c) Function: Cauchy CDF = + tan−1 ⎜ ⎟
2 π ⎝ B ⎠
where: y = Test Value, A = Location, B = Scale

4. CDF_ChiSquare: This function returns the probability that the Test Value ≤ X, assuming a
Chi-Square distribution with the specified Degrees of Freedom. The Chi-Square distribution

- 20 -
results when v (where v = Degrees of Freedom) independent variables with standard normal
distributions are squared and summed (Croarkin & Tobias, Date unknown).
a) Parameters:
i) Test Value: Number ≥ 0
ii) Degrees of Freedom: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and Chi-Square distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_ChiSquare”, {Test
Value, DF}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“CDF_ChiSquare”,
{Test Value, DF}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_ChiSquare", {Test Value, DF})

⎛v x ⎞
γ⎜ , ⎟
2 2
Chi-Square CDF = ⎝ ⎠
⎛v ⎞
Γ⎜ ⎟
⎝2⎠
c) Function: where: y = Test Value, S1 = Shape 1, S2 = Shape 2

and: Γ( x ) = ∫ t x −1e −1dt
0
y
and: γ ( x, y ) = ∫ t x −1e −1dt
0

5. CDF_Exp: This function returns the probability that the Test Value ≤ X, assuming an
Exponential distribution with the specified mean. This script uses the 1-parameter version of
the equation (i.e. assuming Location = 0). The Standard Exponential Distribution is that
which has Mean = 1.
a) Parameters:
i) Test Value: Number ≥ 0
ii) Mean: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and Exponential distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_Exp”, {Test Value,
Mean}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“CDF_Exp”, {Test
Value, Mean}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_Exp", {Test Value, Mean})

x

β
c) Function: Exponential CDF = 1 − e
where: x = Test value, β = Mean (or Scale Parameter)

- 21 -
6. CDF_F: This function returns the probability that the Test Value ≤ X, assuming an
F distribution with the specified Degrees of Freedom. The F distribution is the ratio of two
Chi-Square distributions with ratios v1 and v2 respectively.
a) Parameters:
i) Test Value: Number ≥ 1
ii) 1st Degrees of Freedom: Number > 1
iii) 2nd Degrees of Freedom: Number > 1
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and F distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_F”, {Test Value, DF1,
DF2}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“CDF_F”, {Test Value,
DF1, DF2}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_F", {Test Value, DF1, DF2})

⎛ v v ⎞
F CDF = 1 − I ⎜ k , 1 , 2 ⎟
⎝ 2 2⎠
⎛ v2 ⎞
where: k = ⎜ ⎟
⎝ v 2 + v1 y ⎠
c) Function: and: y = Test Value, S1 = Shape 1, S2 = Shape 2
Bx ( a, b ) 1 x
and: I ( x, a, b ) ≡ ≡ ∫ t a −1 (1 − t )b −1 dt
B ( a, b ) B ( a, b ) 0

and: B ( a, b ) = ∫ t a −1 (1 − t )b −1 dt
1

(From Croarkin & Tobias, Date Unknown; Press et al, 1997)

7. CDF_Logistic: This function returns the probability that the Test Value ≤ X, assuming a
Logistic distribution with the specified mean and scale.
a) Parameters:
i) Test Value: Number
ii) Mean: Number
iii) Scale: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and Logistic distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_Logistic”, {Test Value,
Mean, Scale}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“CDF_Logistic”, {Test
Value, Mean, Scale}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_Logistic", {Test Value, Mean,
Scale})

- 22 -
1
c) Function: Logistic CDF =
⎛A−y ⎞
1 + exp ⎜ ⎟
⎝ B ⎠
where: y = Test Value, A = Mean, B = Scale

8. CDF_LogNormal: This function returns the probability that the Test Value ≤ X, assuming a
LogNormal distribution with the specified mean and scale. A LogNormal distribution occurs
when natural logarithms of variable X are normally distributed. The Standard LogNormal
Distribution is that with Mean = 0 and Scale = 1. The 2-Parameter LogNormal Distribution
is that with Mean = 0.
a) Parameters:
i) Test Value: Number ≥ 0
ii) Mean: Number > 0
iii) Scale: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and LogNormal distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_LogNormal, {Test
Value, Mean, Scale}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“CDF_LogNormal,
{Test Value, Mean, Scale}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_LogNormal", {Test Value, Mean,
Scale})
c) Function:

⎛ ln ( y ) − A ⎞
LogNormal CDF = Φ ⎜ ⎟
⎝ B ⎠
where: y = Test Value, A = Mean, B = Scale
and: Φ ( x ) = Cumulative Distribution Function of the Normal Distribution

9. CDF_Normal_Simpsons: This function returns the probability that the Test Value ≤ X,
assuming a Normal distribution with the specified mean and standard deviation. Because the
formula for this function does not exist in a closed form, it must be computed numerically.
This script uses the Simpson’s approximation method (Stewart 1998, p. 421-424) to calculate
a highly accurate estimate of the Normal cumulative distribution function (accuracy to > 12
decimal places). The Standard Normal Distribution is that with Mean = 0 and Standard
Deviation = 1.
a) Parameters:
i) Test Value: Number
ii) Mean: Number
iii) Standard Deviation: Number > 0

- 23 -
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and Normal distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_Normal_Simpsons,
{Test Value, Mean, St. Dev.}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”,
{“CDF_Normal_Simpsons, {Test Value, Mean, St. Dev.}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_Normal_Simpsons", {Test Value,
Mean, St. Dev.})
c) Function:

⎛ y − A⎞
Normal CDF = Φ ⎜ ⎟
⎝ B ⎠
where: y = Test Value, A = Mean, B = Scale
and: Φ ( x ) = Cumulative Distribution Function of the Normal Distribution

10. CDF_Poisson: This function returns the probability that the specified Number of Events
will be ≤ X, assuming a Poisson distribution with the specified mean.
a) Parameters:
i) # Events: Integer ≥ 0
ii) Mean: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and Poisson distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_Poisson, {# Events,
Mean}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“CDF_Poisson, {#
Events, Mean}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_Poisson", {# Events, Mean})

γ ( y, A)
Poisson CDF =
Γ (y )
c) Function: where: y = Test value, A = Expectation (mean)

and: Γ( x ) = ∫ t x −1e −1dt
0
y
and: γ ( x, y ) = ∫ t x −1e −1dt
0

11. CDF_StudentsT: This function returns the probability that the Test Value ≤ X, assuming a
Students T distribution with the specified Degrees of Freedom. A Student’s T distribution
with 1df is a Cauchy Distribution, and it approaches a Normal distribution when DF>30.
Various sources recommend using the Normal distribution if DF>100.
a) Parameters:
i) Test Value: Number

- 24 -
ii) Degrees of Freedom: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and Student’s T distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_StudentsT, {Test
Value, DF}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“CDF_StudentsT, {Test
Value, DF}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_StudentsT", {Test Value, DF})
c) Function: The CDF_StudentsT T Function is dependent on whether the test value is
positive or negative:
⎧ 1 ⎛ v v 1⎞
⎪ I⎜ , , ⎟, t ≡y ≤0
⎪ 2 ⎝v + y 2 2⎠
2

Student's T CDF = ⎨
⎪1 − 1 I ⎛ v , v , 1 ⎞ , t ≡y >0
⎪ 2 ⎜⎝ v + y 2 2 2 ⎟⎠

where: y = Test Value, v = Degrees of Freedom
Bx ( a, b ) 1 x
and: I ( x, a, b ) ≡ ≡ ∫ t a −1 (1 − t )b −1 dt
B ( a, b ) B ( a, b ) 0

and: B ( a, b ) = ∫ t a −1 (1 − t )b −1 dt
1

12. CDF_Weibull: This function returns the probability that the Test Value ≤ X, assuming a
Weibull distribution with the specified Location, Scale and Shape parameters. The
Standardized Weibull Distribution is that with Location = 0 and Scale = 1. The 2-Parameter
Weibull Distribution is that with Location = 0.
a) Parameters:
i) Test Value: Number > Location
ii) Location: Number
iii) Scale: Number > 0
iv) Shape: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Cumulative Probability (CDF)"
and Weibull distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“CDF_Weibull, {Test Value,
Location, Scale, Number}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“CDF_Weibull, {Test
Value, Location, Scale, Number}})
iv) (Avenue): theProb = av.Run("Jennessent.CDF_Weibull", {Test Value, Location,
Scale, Number})

⎛ ⎛ y − A ⎞C ⎞
⎜ −⎜ ⎟
⎜ ⎝ B ⎟⎠ ⎟
c) Function: Weibull CDF = 1 − exp ⎝ ⎠

where: y = Test Value, A = Location, B = Scale, C = Shape

- 25 -
Quantiles (also referred to as Inverse Density Functions or Percent Point Functions).
1. IDF_Beta: This function takes the specified probability and returns the value X, such that
P(X) = P-value, given the Beta distribution with the two specified Shape parameters.
Because the formula for this function does not exist in a closed form, it must be computed
numerically. This script arrives at the X-value through an iterative process, repeatedly testing
X-values with the CDF_Beta function until it arrives at P-value that is within 1x10 -12 units
from the specified P-value (this usually takes between 30-60 iterations).
a) Parameters:
i) P-value: Number (0 ≥ p ≥ 1)
ii) Shape1: Number > 0
iii) Shape2: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and Beta distribution.
ii) (Avenue): theX = av.Run("Jennessent.DistFunc”, {“IDF_Beta, {P-value, Shape1,
Shape2}})
iii) (Avenue): theX = av.Run("Jennessent.TableDistFunc”, {“IDF_Beta, {P-value,
Shape1, Shape2}})
iv) (Avenue): theX = av.Run("Jennessent.IDF_Beta", {P-value, Shape1, Shape2})

y Γ(S1 + S2 ) S −1 S 2 −1
Beta IDF = ∫ y (1 − y )
1

c) Function:
0 Γ(S1 )Γ(S2 )
where: y = Test Value, S1 = Shape 1, S2 = Shape 2

and: Γ( x ) = ∫ t x −1e −1dt
0

2. IDF_Binomial: This function takes the specified probability and returns the value X such
that the Probability of getting (X – 1) successes ≤ the Specified Probability. This function
takes an iterative approach to finding the correct X value, repeatedly trying different values
of X until it reaches the correct one. This iterative process rarely takes more than 25
repetitions.
a) Parameters:
i) P-value = Number (0 ≥ p ≥ 1)
ii) # Trials = Integer ≥ 2
iii) Probability of Success = Number (0 ≥ p ≥ 1)Usages:
b) Usages:
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and Binomial distribution.
ii) (Avenue): theX = av.Run("Jennessent.DistFunc”, {“IDF_Binomial, {P-value,
NumTrials, Probability of Success}})
iii) (Avenue): theX = av.Run("Jennessent.TableDistFunc”, {“IDF_Binomial, {P-value,
NumTrials, Probability of Success}})

- 26 -
iv) (Avenue): theX = av.Run("Jennessent.IDF_Binomial", {P-value, NumTrials,
Probability of Success})

Binomial IDF: Iterative Process, repeatedly testing values of y , such that:


y
⎛ B! ⎞ i
c) Function: p = ∑⎜ ⎟ A (1 − A)
B −i

i =1 ⎝ i !(B − i )! ⎠

where: y = #Successes, A = Probability of Success, B = #Trials


Until: P ( y − 1) ≤ User-Specified probability

3. IDF_Cauchy: This function takes the specified probability and returns the value X, such
that P(X) = P-value, given the Cauchy distribution with the specified location and scale
parameters. The Standardized Cauchy distribution has Location = 0 and Scale = 1.
a) Parameters:
i) P-value: Number (0 ≥ p ≥ 1)
ii) Location: Number
iii) Scale: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and Cauchy distribution.
ii) (Avenue): theX = av.Run("Jennessent.DistFunc”, {“IDF_Cauchy, {P-value,
location, Scale}})
iii) (Avenue): theX = av.Run("Jennessent.TableDistFunc”, {“IDF_Cauchy, {P-value,
location, Scale}})
iv) (Avenue): theX = av.Run("Jennessent.IDF_Cauchy", {P-value, Location, Scale})

B
c) Function: Cauchy IDF = A −
tan (π p )
where: A = Location, B = Scale, p = Probability

4. IDF_ChiSquare: This function takes the specified probability and returns the value X, such
that P(X) = P-value, given the Chi-Square distribution with the specified Degrees of
Freedom. Because the formula for this function does not exist in a closed form, it must be
computed numerically. This script arrives at the X-value through an iterative process,
repeatedly testing X-values with the CDF_ChiSquare function until it arrives at P-value that
is within 1x10 -12 units from the specified P-value (this usually takes between 30-60
iterations). The Chi-Square distribution results when v (where v = Degrees of Freedom)
independent variables with standard normal distributions are squared and summed (Croarkin
& Tobias, Date unknown).
a) Parameters:
i) P-value: Number (0 ≥ p ≥ 1)
ii) Degrees of Freedom: Number
b) Usages:

- 27 -
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and Chi-Square distribution.
ii) (Avenue): theX = av.Run("Jennessent.DistFunc”, {“IDF_ChiSquare, {P-Value, F}})
iii) (Avenue): theX = av.Run("Jennessent.TableDistFunc”, {“IDF_ChiSquare, {P-Value,
F}})
iv) (Avenue): theX = av.Run("Jennessent.IDF_ChiSquare", {P-Value, DF})

−y v
−1
e 2 x2
y
Chi-Square IDF = ∫ v dy
0
⎛v ⎞
c) Function: 2 Γ⎜ ⎟
2

⎝ 2⎠
where: y = Test Value, S1 = Shape 1, S2 = Shape 2

and: Γ( x ) = ∫ t x −1e −1dt
0

5. IDF_Exp: This function takes the specified probability and returns the value X, such that
P(X) = P-value, given the Exponential distribution with the specified mean. This script uses
the 1-parameter version of the equation (i.e. assuming Location = 0). The Standard
Exponential Distribution is that which has Mean = 1.
a) Parameters:
i) P-value: Number (0 ≥ p ≥ 1)
ii) Mean: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and Exponential distribution.
ii) (Avenue): theX = av.Run("Jennessent.DistFunc”, {“IDF_Exp, {P-value, Mean}})
iii) (Avenue): theX = av.Run("Jennessent.TableDistFunc”, {“IDF_Exp, {P-value,
Mean}})
iv) (Avenue): theX = av.Run("Jennessent.IDF_Exp", {P-value, Mean})

Exponential IDF = − β ln (1 − p )
c) Function:
where: β = Mean (or Scale Parameter)
and: p = Specified Probability

6. IDF_F: This function takes the specified probability and returns the value X, such that
P(X) = P-value, given the F distribution with the specified Degrees of Freedom. Because the
formula for this function does not exist in a closed form, it must be computed numerically.
This script arrives at the X-value through an iterative process, repeatedly testing X-values
with the CDF_F function until it arrives at P-value that is within 1x10 -12 units from the
specified P-value (this usually takes between 30-60 iterations). The F distribution is the ratio
of two Chi-Square distributions with ratios v1 and v2 respectively.
a) Parameters:
i) Test Value: Number ≥ 1
ii) 1st Degrees of Freedom: Number > 1

- 28 -
iii) 2nd Degrees of Freedom: Number > 1
b) Usages:
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and F distribution.
ii) (Avenue): theX = av.Run("Jennessent.DistFunc”, {“IDF_F, {P-value, DF1, DF2}})
iii) (Avenue): theX = av.Run("Jennessent.TableDistFunc”, {“IDF_F, {P-value, DF1,
DF2}})
iv) (Avenue): theX = av.Run("Jennessent.IDF_F", {P-value, DF1, DF2})

⎛ v1

⎜ Γ 1 ⎛ v + v ⎞ ⎛ v ⎞ 2 v1
−1

⎜ 2 ⎟⎜ v ⎟ x
2 1 2
x⎜ ⎝ ⎠⎝ 2 ⎠ ⎟
F IDF = ∫ ⎜ v1 +v 2
⎟ dx
c) Function:
0
⎜ ⎛ ⎞ 2 ⎟
⎜ Γ ⎜⎛ v1 ⎟⎞ Γ ⎜⎛ v1 ⎟⎞ ⎜1 + v1 x ⎟ ⎟
⎜ ⎝2⎠ ⎝2⎠ v ⎟
⎝ ⎝ 2 ⎠ ⎠
where: x = Test Value, v1 = DF1, v 2 = DF2

and: Γ( x ) = ∫ t x −1e −1dt
0

7. IDF_Logistic: This function takes the specified probability and returns the value X, such
that P(X) = P-value, given the Logistic distribution with the specified mean and scale
parameters.
a) Parameters:
i) P-value: Number (0 ≥ p ≥ 1)
ii) Mean: Number
iii) Scale: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and Logistic distribution.
ii) (Avenue): theX = av.Run("Jennessent.DistFunc”, {“IDF_Logistic, {P-value, Mean,
Scale}})
iii) (Avenue): theX = av.Run("Jennessent.TableDistFunc”, {“IDF_Logistic, {P-value,
Mean, Scale}})
iv) (Avenue): theX = av.Run("Jennessent.IDF_Logistic", {P-value, Mean, Scale})

⎛ p ⎞
c) Function: Logistic IDF = A + B ln ⎜ ⎟
⎝1− p ⎠
where: p = Probability, A = Mean, B = Scale

8. IDF_LogNormal: This function takes the specified probability and returns the value X, such
that P(X) = P-value, given the LogNormal distribution with the specified mean and scale
parameters. Because the formula for this function does not exist in a closed form, it must be
computed numerically. This script arrives at the X-value through an iterative process,
repeatedly testing X-values with the CDF_LogNormal function until it arrives at P-value that

- 29 -
is within 1x10 -12 units from the specified P-value (this usually takes between 30-60
iterations). A LogNormal distribution occurs when natural logarithms of variable X are
normally distributed. The Standard LogNormal Distribution is that with Mean = 0 and Scale
= 1. The 2-Parameter LogNormal Distribution is that with Mean = 0.
a) Parameters:
i) P-value: Number (0 ≥ p ≥ 1)
ii) Mean: Number > 0
iii) Scale: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and LogNormal distribution.
ii) (Avenue): theX = av.Run("Jennessent.DistFunc”, {“IDF_LogNormal, {P-value,
Mean, Scale}})
iii) (Avenue): theX = av.Run("Jennessent.TableDistFunc”, {“IDF_LogNormal, {P-
value, Mean, Scale}})
iv) (Avenue): theX = av.Run("Jennessent.IDF_LogNormal", {P-value, Mean, Scale})

⎛ 1y ⎛ 1 ⎛ ln ( y ) − A ⎞ 2 ⎞ ⎞
c) Function: LogNormal IDF = ∫ ⎜ exp ⎜ − ⎜ ⎟ ⎟ ⎟ dy
0 ⎜
B 2π ⎜ 2 ⎝ B ⎠ ⎠⎟ ⎠⎟
⎝ ⎝
where: y = Test Value, A = Mean, B = Scale

9. IDF_Normal: This function takes the specified probability and returns the value X, such
that P(X) = P-value, given the Normal distribution with the specified mean and standard
deviation. Because the formula for this function does not exist in a closed form, it must be
computed numerically. This script arrives at the X-value through an iterative process,
repeatedly testing X-values with the CDF_Normal_Simpsons function until it arrives at
P-value that is within 1x10 -12 units from the specified P-value (this usually takes between
30-60 iterations). Furthermore, there is no closed formula for calculating the Normal
cumulative distribution function, so this script uses the Simpson’s approximation method
(Stewart 1998, p. 421-424) to calculate a highly accurate estimate (accuracy to > 12 decimal
places). The Standard Normal Distribution is that with Mean = 0 and Standard
Deviation = 1.
a) Parameters:
i) P-value: Number (0 ≥ p ≥ 1)
ii) Mean: Number
iii) Standard Deviation: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and Normal distribution.
ii) (Avenue): theX = av.Run("Jennessent.DistFunc”, {“IDF_Normal, {P-value, Mean,
St. Dev.}})
iii) (Avenue): theX = av.Run("Jennessent.TableDistFunc”, {“IDF_Normal, {P-value,
Mean, St. Dev.}})
iv) (Avenue): theX = av.Run("Jennessent.IDF_Normal", {P-value, Mean, St. Dev.})

- 30 -
y⎛ 1 ⎛ 1 ⎛ y − A ⎞2 ⎞ ⎞
c) Function: Normal IDF = ∫ ⎜ exp ⎜ − ⎜ ⎟ ⎟ dy
0 ⎜
B 2π ⎜ 2 ⎝ B ⎟⎠ ⎟ ⎟
⎝ ⎝ ⎠⎠
where: y = Test Value, A = Mean, B = Scale

10. IDF_Poisson: This function takes the specified probability and returns the value X such that
the Probability of getting (X – 1) events ≤ the Specified Probability. This function takes an
iterative approach to finding the correct X value, repeatedly trying different values of X until
it reaches the correct one.
a) Parameters:
i) P-value: Number (0 ≥ p ≥ 1)
ii) Mean: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and Poisson distribution.
ii) (Avenue): theProb = av.Run("Jennessent.DistFunc”, {“IDF_Poisson, {P-value,
Mean}})
iii) (Avenue): theProb = av.Run("Jennessent.TableDistFunc”, {“IDF_Poisson, {P-value,
Mean}})
iv) (Avenue): theProb = av.Run("Jennessent.IDF_Poisson", {P-value, Mean})

Poisson IDF: Iterative Process, repeatedly testing values of y , such that:


γ ( y, A)
p=
Γ (y )
c) Function: where: y = Test value, A = Expectation (mean)

and: Γ( x ) = ∫ t x −1e −1dt
0
y
and: γ ( x, y ) = ∫ t x −1e −1dt
0

Until: P ( y − 1) ≤ User-Specified probability

11. IDF_StudentsT: This function takes the specified probability and returns the value X, such
that P(X) = P-value, given the Student’s T distribution with the specified Degrees of
Freedom. Because the formula for this function does not exist in a closed form, it must be
computed numerically. This script arrives at the X-value through an iterative process,
repeatedly testing X-values with the CDF_StudentsT function until it arrives at P-value that is
within 1x10 -12 units from the specified P-value (this usually takes between 30-60 iterations).
A Student’s T distribution with 1df is a Cauchy Distribution, and it approaches a Normal
distribution when DF>30. Various sources recommend using the Normal distribution if
DF>100.
a) Parameters:
i) P-value: Number (0 ≥ p ≥ 1)
ii) Degrees of Freedom: Number > 0

- 31 -
b) Usages:
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and Student’s T distribution.
ii) (Avenue): theX = av.Run("Jennessent.DistFunc”, {“IDF_StudentsT, {P-value,
DF}})
iii) (Avenue): theX = av.Run("Jennessent.TableDistFunc”, {“IDF_StudentsT, {P-value,
DF}})
iv) (Avenue): theX = av.Run("Jennessent.IDF_StudentsT", {P-value, DF})

⎛ v + 1⎞
Γ⎜ v +1
2 ⎟⎠ ⎡ y 2 ⎤ 2

Student's T IDF = ∫
y

⎢1 + ⎥ dy
c) Function:
−∞ ⎛v ⎞ ⎣ v ⎦
πv Γ ⎜ ⎟
⎝ 2⎠
where: y = Test Value, v = Degrees of Freedom

and: Γ( x ) = ∫ t x −1e −1dt
0

12. IDF_Weibull: This function takes the specified probability and returns the value X, such
that P(X) = P-value, given the Weibull distribution with the specified Location, Scale and
Shape parameters. The Standardized Weibull Distribution is that with Location = 0 and
Scale = 1. The 2-Parameter Weibull Distribution is that with Location = 0.
a) Parameters:
i) Test Value: Number > Location
ii) Location: Number
iii) Scale: Number > 0
iv) Shape: Number > 0
b) Usages:
i) From "Probability Distribution Calculator", select "Quantile (IDF; Inverse CDF)"
and Weibull distribution.
ii) (Avenue): theX = av.Run("Jennessent.DistFunc”, {“IDF_Weibull, {P-value,
Location, Scale, Number}})
iii) (Avenue): theX = av.Run("Jennessent.TableDistFunc”, {“IDF_Weibull, {P-value,
Location, Scale, Number}})
iv) (Avenue): theX = av.Run("Jennessent.IDF_Weibull", {P-value, Location, Scale,
Number})

c) Function: Weibull IDF = A + B C − ln p


where: p = Probability, A = Location, B = Scale, C = Shape

- 32 -
References

Abramowitz, Milton; Stegen, Irene A. (1972). Handbook of Mathematical Functions.


Burkardt, John. (2001). PROB - Probability Density Functions. Sample Fortran code for
calculating density functions. Available on-line at
http://www.psc.edu/~burkardt/src/prob/prob.html.
Croarkin, Carrol; Tobias, Paul. (Date Unknown). Engineering and Statistics Handbook,
available on-line at: (http://www.itl.nist.gov/div898/handbook/). National Institute of
Standards and Technology.
Jeffrey, Alan. (2000). Handbook of Mathematical Formulas and Integrals (2nd Ed). Academic
Press
McLaughlin, Michael P. (2001). Regress+, Appendix A. A Compendium of Common
Probability Distributions (version 2.3). Available on-line at:
http://www.causaScientia.org/math_stat/Dists/Compendium.pdf
Neter, John; Wasserman, William; and Kutner, Michael H. (1990). Applied Linear Statistical
Models (3rd Edition). Published by Irwin
Ott, R. Lyman. (1993). An Introduction to Statistical Methods and Data Analysis (4th Ed).
Duxbury Press.
Press, William H.; Teukolsky, Saul A.; Vetterling William T.; and Flannery, Brian P. (1988-
1997) Numerical Recipes in C; the Art of Scientific Computing (2nd Ed). Cambridge
University Press. (ISBN 0-521-43108-5). (http://lib-
www.lanl.gov/numerical/bookcpdf.html - See Chapter 6, sections 1-4)
S-Plus Help Files (2001). S-Plus 6 for Windows. Product Information available at:
http://www.insightful.com/support/splus60win/default.asp
S-PLUS 6 for Windows Guide to Statistics, Volume 1, Insightful Corporation, Seattle, WA.
SPSS Help Files. (1999). SPSS for Windows Release 9. Product Information available at:
http://www.spss.com/
Stewart, James. (1998). Calculus, Concepts and Contexts. Brooks/Cole Publishing Company. p.
421-424

- 33 -

You might also like