STATBEAN Name: Distributions
Purpose: calculating probability and generating random numbers for many probability distributions. This STATBEAN uses JavaBeans to give Statgraphics a probability distribution calculator.
DataSource for the STATBEAN probability distribution calculator: None.
Calculating Probability Read/Write Properties
Name | Type | Description | Possible Values | Default Value |
distributionName | String[nDists] | Name of distribution. | From list below. | "Normal" |
nDists | int | Number of distributions entered. | 1-25 | 1 |
parameter1 | double[nDists] | First parameters for the distribution. | Valid parameter. | 0.0 |
parameter2 | double[nDists] | Second parameters for the distribution. | Valid parameter. | 1.0 |
parameter3 | double[nDists] | Third parameters for the distribution. | Valid parameter. | 0.0 |
Name | Description | Arguments | Return Value |
void calculateStatistics() | Causes the function to calculate the desired distributions. | None. | None. |
double getCdf(double x,int k) | Computes cumulative distribution function. | Value of random variable x, distribution number. | cdf at x. |
double getInverseCdf(double p,int k) | Computes inverse cumulative distribution function. | Value of cdf p, distribution number. | Smallest value of x for which cdf is less than or equal to p. |
double getMean(int k) | Returns the mean of the distribution. | Distribution number. | Mean. |
double getPdf(double x,int k) | Computes probability density or mass function. | Value of random variable x, distribution number. | pdf or pmf at x. |
boolean getRandomNumbers(double x[],int n,int k) | Generates n random numbers from the distribution, distribution number. | Output array,number of random numbers to be generated. | true if success |
double getVariance(int k) | Returns the variance of the distribution. | Distribution number. | Variance. |
Name | Range of X | Parameters | Restrictions | Mean |
Bernoulli | 0,1 | probability p | 0<=p<=1 | p |
Binomial | 0,1,...,n | probability p, sample size n |
n>=1, 0<=p<=1 |
np |
Discrete Uniform | a,a+1,...,b | lower limit a, upper limit b |
a<=b | (a+b)/2 |
Geometric | 0,1,2,... | probability p | 1>=p>0 | (1-p)/p |
Hypergeometric | 0,1,...,min(m,n) | number of successes m, sample size n, population size N |
N>=m>=0, N>=n>=1 |
mn/N |
Negative Binomial | k,k+1,... | probability p, number of successes k |
1>=p>0, k>0 |
k/p |
Poisson | 0,1,2,... | mean lambda | lambda>0 | lambda |
Name | Range of X | Parameters | Restrictions | Mean |
Beta | 0<=X<=1 | shape alpha1, shape alpha2 |
alpha1>0, alpha2>0 |
alpha1/(alpha1+alpha2) |
Cauchy | all real X | median theta, shape beta |
beta>0 | not defined |
Chi-Square | X>=0 | degrees of freedom v | v>0 | v |
Erlang | X>=0 | shape alpha, scale lambda |
integer alpha>=1, lambda>0 |
alpha/lambda |
Exponential | X>=0 | scale lambda | lambda>0 | 1/lambda |
Extreme Value | all real X | shape alpha, scale beta |
beta>0 | alpha-0.57721*beta |
F | X>=0 | num. d.f. v, den. d.f. w |
integer v>=1, integer w>=1 |
w/(w-2) |
Gamma | X>=0 | shape alpha, scale lambda |
alpha>0, lambda>0 |
alpha/lambda |
Laplace | all real X | mean mu, scale lambda |
lambda>0 | mu (note: sigma=sqrt(2)/lambda) |
Logistic | all real X | mean mu, std. dev. sigma |
sigma>0 | mu |
Lognormal | X>0 | mean mu, std. dev. sigma |
sigma>0 | exp(mu+sigma*sigma/2) |
Normal | all real X | mean mu, std. dev. sigma |
sigma>0 | mu |
Pareto | X>=1 | scale c | c>0 | c/(c-1) |
Student's t | all real X | degrees of freedom v | v>=1 | 0 |
Triangular | a<=X<=b | minimum a, mode c, maximum b |
a<=c<=b | (a+b+c)/3 |
Uniform | a<=X<=b | minimum a, maximum b |
a<=b | (a+b)/2 |
Weibull | X>=0 | shape alpha, scale beta |
alpha>0, beta>0 |
(beta*gamma(1/alpha))/alpha |
© 2025 Statgraphics Technologies, Inc.
The Plains, Virginia
CONTACT USHave you purchased Statgraphics Centurion or Sigma Express and need to download your copy?
CLICK HERE