17.1.9.3 Algorithms (Distribution Fit)
distribution-fit-Algorithm
Use the Distribution Fit to fit a distribution to a variable.
There are seven distributions can be used to fit a given variable. We calculate the Maximum Likelihood Estimation(MLE) as parameters estimators. For some continuous distributions, we not only give Confidence Limit but also offer Goodness of Fit test.
Distributions and Maximum Likelihood Estimation(MLE)
Normal Distribution
PDF
where and . With and .
Maximum Likelihood Estimation(MLE)
Parameters
-
- .
Confidence Intervals
The confidence interval for and are:
where is the critical value for the standard normal distribution in which is the confidence level. And is standard error for while is for .
LogNormal Distribution
PDF
- ,
where and . With and .
Maximum Likelihood Estimation(MLE)
Parameters
- .
Confidence Interval
The confidence interval for and are:
where is the critical value for the standard normal distribution in which is the confidence level. And is standard error for while is for .
Weibull Distribution
PDF
where . With and .
Maximum Likelihood Estimation(MLE)
Origin calls a NAG function nag_estim_weibull (g07bec), for the MLE of statistics of weibull distribution. Please refer to related NAG document, for more details on the algorithm.
Exponential Distribution
PDF
- ,
where and . With and .
Maximum Likelihood Estimation(MLE)
Parameters
Confidence Interval
The confidence interval for is:
where is the critical value for the standard normal distribution in which is the confidence level. And is standard error for .
Gamma Distribution
PDF
where . With and .
Maximum Likelihood Estimation(MLE)
Parameters
It's not easy to calculate MLE of and by hand. But with Newton-Raphson method, we can easily get what we want. In order to obtain good root of likelihood equation, we need to offer a proper initial estimator, which can be given by:
Confidence Interval
The confidence interval for and are:
where is the critical value for the standard normal distribution in which is the confidence level. And is standard error for while is for .
Binomial Distribution
PDF
where and . With and .
Given a number of success and sample size
Maximum Likelihood Estimation(MLE)
Parameters
Confidence Interval
where is the critical value for the standard normal distribution in which is the confidence level.
Possion Distribution
PDF
where . With .
Maximum Likelihood Estimation(MLE)
Parameters
.
Confidence Interval
The confidence interval for are:
where is the critical value for the standard normal distribution in which is the confidence level.
Goodness of Fit
Kolmogorov-Smirnov
Origin calls a NAG function nag_1_sample_ks_test (g08cbc) , to compute the statistics. Please refer to related NAG document, for more details on the algorithm.
Kolmogorov-Smirnov(Modified)
- Modified Kolmogorov-Smirnov Statistic
The modified Kolmogorov-Smirnov statisticis a modification of the Kolmogorov-Smirnov Statistic based on different distribution.
The p-value for the Kolmogorov-Smirnov statistic is computed based on critical values table below, provided by D’Agostino and Stephens (1986). If the value of D is between two probability levels, then linear interpolation is used to estimate the p-value.
Here is the Kolmogorov-Smirnov statistic
Normal/Lognormal Distribution
- Modified Kolmogorov-Smirnov Statistic:
D
|
<0.775 |
0.775 |
0.819 |
0.895 |
0.995 |
1.035 |
>1.035
|
P-Value
|
>=0.15 |
0.15 |
0.10 |
0.05 |
0.025 |
0.01 |
<=0.01
|
Weibull distribution
- Modified Kolmogorov-Smirnov Statistic:
D
|
<1.372 |
1.372 |
1.477 |
1.577 |
1.671 |
>1.671
|
P-Value
|
>=0.1 |
0.1 |
0.05 |
0.025 |
0.01 |
<=0.01
|
Exponential Distribution
- Modified Kolmogorov-Smirnov Statistic:
D
|
<0.926 |
0.926 |
0.995 |
1.094 |
1.184 |
1.298 |
>1.298
|
P-Value
|
>=0.15 |
0.15 |
0.10 |
0.05 |
0.025 |
0.01 |
<=0.01
|
Gamma Distribution
- Modified Kolmogorov-Smirnov Statistic:
D
|
<0.74 |
0.74 |
0.780 |
0.800 |
0.858 |
0.928 |
0.990 |
1.069 |
1.13 |
>1.13
|
P-Value
|
>=0.25 |
0.25 |
0.20 |
0.15 |
0.10 |
0.05 |
0.025 |
0.01 |
0.005 |
<=0.005
|
Anderson-Darling
- Anderson-Darling Statistics
- where
- is the cumulative distribution function of the specified distribution
- are ordered data points:
- P-value
- The p-value for the Adjusted Anderson-Darling statistics is computed based on critical values table below, provided by D’Agostino and Stephens (1986). If the value of is between two probability levels, then linear interpolation is used to estimate the p-value.
Normal/Lognormal Distribution
- Adjusted Anderson-Darling Statistics
Weibull distribution
- Adjusted Anderson-Darling Statistics
-
|
<0.474 |
0.474 |
0.637 |
0.757 |
0.877 |
1.038 |
>1.038
|
P-Value
|
>=0.25 |
0.25 |
0.10 |
0.05 |
0.025 |
0.01 |
<=0.01
|
Exponential Distribution
- Adjusted Anderson-Darling Statistics
-
Gamma Distribution
|
<0.486 |
0.486 |
0.657 |
0.786 |
0.917 |
1.092 |
1.227 |
>1.227
|
P-Value
|
>=0.25 |
0.25 |
0.10 |
0.05 |
0.025 |
0.01 |
0.005 |
<=0.005
|
|
<0.473 |
0.473 |
0.637 |
0.759 |
0.883 |
1.048 |
1.173 |
>1.173
|
P-Value
|
>=0.25 |
0.25 |
0.10 |
0.05 |
0.025 |
0.01 |
0.005 |
<=0.005
|
|
<0.470 |
0.470 |
0.631 |
0.752 |
0.873 |
1.035 |
1.159 |
>1.159
|
P-Value
|
>=0.25 |
0.25 |
0.10 |
0.05 |
0.025 |
0.01 |
0.005 |
<=0.005
|
Mean Test
Z-Test
Test Statistics
where
-
- : The specified test mean
- : The specified standard deviation
P-Value
The , is returned based on an approximate Normal test statistics .
Confidence Intervals
For the specified significance level, the confidence interval for the sample mean is:
Null Hypothesis
|
Confidence Interval
|
|
|
|
|
|
|
T-Test
Algorithms (One-Sample T-Test).
|