EasyFit – Easily Fit Distributions to Your Data!
EasyFit Help HomeLearn More About EasyFit

Worksheet Functions

EasyFitXL makes a number of new high-performance worksheet functions available to Excel users. These functions can be applied in any worksheet on a computer with a licensed copy of EasyFit installed.

Note for Excel 2010 and 2007 users: EasyFitXL supports the multi-threaded calculation feature of the latest Excel versions, enabling you to decrease the calculation times on multi-core computers.

Function Names and Arguments

The following table lists the worksheet functions supported by EasyFitXL:

Function Name
Distribution Fitting DistFit Distribution;Data;[Options] =DistFit("Normal";A1:A100)
Distribution Functions
Probability Density
DistributionPdf x;parameters =NormalPdf(1.5;1;0)
DistPdf "Distribution(parameters)";x =DistPdf("Normal(1;0)";1.5)
Cumulative Distribution
DistributionCdf x;parameters =NormalCdf(1.5;1;0)
DistCdf "Distribution(parameters)";x =DistCdf("Normal(1;0)";1.5)
Survival Function DistSurv "Distribution(parameters)";x =DistSurv("Normal(1;0)";1.5)
Hazard Function DistributionHaz x;parameters =NormalHaz(1.5;1;0)
DistHaz "Distribution(parameters)";x =DistHaz("Normal(1;0)";1.5)
Cumulative Hazard
DistCumHaz "Distribution(parameters)";x =DistCumHaz("Normal(1;0)";1.5)
Inverse CDF
(Quantile Function)
DistributionInv P;parameters =NormalInv(0.5;1;0)
DistInv "Distribution(parameters)";P =DistInv("Normal(1;0)";0.5)
Random Number Generation
Random Numbers DistributionRand parameters =NormalRand(1;0)
DistRand "Distribution(parameters)" =DistRand("Normal(1;0)")
Distribution Statistics
Mode DistMode "Distribution(parameters)" =DistMode("Normal(1;0)")
Mean DistributionMean parameters =NormalMean(1;0)
DistMean "Distribution(parameters)" =DistMean("Normal(1;0)")
Variance DistributionVar parameters =NormalVar(1;0)
DistVar "Distribution(parameters)" =DistVar("Normal(1;0)")
Standard Deviation DistributionStdev parameters =NormalStdev(1;0)
DistStdev "Distribution(parameters)" =DistStdev("Normal(1;0)")
Skewness DistSkew "Distribution(parameters)" =DistSkew("Normal(1;0)")
(Excess) Kurtosis DistKurt "Distribution(parameters)" =DistKurt("Normal(1;0)")

To obtain the function name and the argument list for a particular distribution:

  • replace "distribution" with the specific distribution code name;
  • replace "parameters" with the actual list of distribution parameters (semicolon-separated); note that the parameters should be specified in the same order as described in this manual (see continuous and discrete distributions);
  • replace "x" and "P" with the function-specific argument values.

Some of the functions listed above are not available for some specific distributions. For instance, the Hazard Function and the Inverse CDF are only available for continuous distributions. Please refer to the documentation on particular distributions for information on which functions are supported.

The functions work in the same way as the standard Excel functions — you can combine them, use in more complex formulas, use cell references instead of constant argument values etc.

Distribution Fitting

The DistFit(Distribution;Data;[Options]) function lets you estimate the parameters of a specified distribution. This function accepts three arguments:

  • Distribution is the code name of the distribution you want to fit to your data (e.g. "Weibull");
  • Data is the input data set you want to analyze — this can be either a cell range reference (A1:C10) or an array ({1, 4.5, 7, 3.2, 6});
  • Options is an optional text parameter allowing to set some of the distribution parameters to fixed values to prevent them from being estimated. For example, specifying "gamma=0" when fitting the Gamma distribution will force EasyFitXL to set =0 and fit the two-parameter Gamma distribution (it will only estimate the and parameters). Note that this option only works with specific distributions and specific parameters — please refer to the documentation on supported continuous and discrete distributions to learn which options can be specified.

Return Value:

  • on success, DistFit returns the resulting model as text in the form "Distribution(parameters)" which can be passed to other functions such as DistPdf, DistCdf etc. to perform specific calculations using the selected model (see examples below);
  • on failure, DistFit returns an error message as text.

Note: If the distribution fitting process takes too much time, DistFit will display the progress indicator in the caption of the Excel window. You can cancel the operation by pressing the Esc key — in this case DistFit will return "No fit".

Using the Function Wizard

To insert a particular function into the current worksheet, click the Insert Function icon, and select one of the following categories depending on the function type you want to insert:

Category Name
Functions in a Category
EasyFitXL (Functions) Fit,Pdf,Cdf,Surv,Haz,CumHaz,Inv
EasyFitXL (Random Numbers) Rand
EasyFitXL (Statistics) Mode,Mean,Var,Stdev,Skew,Kurt

Excel will update the function list depending on the category you select. Choose a function and proceed to the next step. Excel will display a dialog where you can specify the function arguments. Click OK to insert the function you selected into the worksheet.


The following examples highlight the various aspects of using worksheet functions:

Excel Formula
=DistFit("Logarithmic"; A1:A10)
Fitting the Logarithmic distribution to a data set passed in as a reference. Assuming the data set {1,3,6,5,1,1,1,8,1,1} is contained in cells A1:A10, the resulting model will have parameter =0.834208.
=DistFit("Exp"; A1:B5; "gamma=0")
Fitting the Exponential distribution to a data set passed in as a reference. The third argument "gamma=0" indicates that the location parameter is set to a fixed value of 0, and the one-parameter Exponential distribution is fitted. Assuming the data set {362,33,588,149,151,122,34,350,123,139} is contained in cells A1:B5, the resulting model will have parameter =0.004876.
=DistFit("Exp"; A1:B5)
Exp(0.005811; 33.0)
Fitting the Exponential distribution to a data set passed in as a reference. The data set used in this example is the same as in the previous one. Since the third function argument is omitted, all distribution parameters are estimated. The resulting model has parameters =0.005811, =33.
=DistFit("DUniform"; {1,2,3,4,5,6})
DUniform(1; 6)
Fitting the Discrete Uniform distribution to a data set {1,2,3,4,5,6} passed in as an array. The resulting model has parameters a=1, b=6.
=NormalPdf(0.5; 1; 0)
PDF of the Normal distribution with parameters =1, =0 calculated at x=0.5.
=DistCdf("Normal(1;0)"; 2)
CDF of the Normal distribution with parameters =1, =0 calculated at x=2.
=DistPdf(DistFit("DUniform"; {1,2,3,4,5,6}); 3)
First, the Discrete Uniform distribution is fitted to a data set {1,2,3,4,5,6} passed in as an array. Then, the PDF of the resulting model is evaluated at x=3.
=WeibullInv(0.75; 1.5; 2; 0.5)
Inverse CDF of the Weibull distribution with parameters =1.5, =2, =0.5 calculated at P=0.75.
=GammaVar(3; 2)
Variance of the Gamma distribution with parameters =3, =2.

Note that GammaVar takes two arguments, while the Gamma distribution, in general, has three parameters. In this case, the third parameter (gamma) will be assigned 0. This applies to all non-negative distributions which have the location parameter : you can simply omit this parameter if it equals zero.
Mean of the Exponential distribution with parameter =0.

The value cannot be calculated because the parameter of this distribution must be greater than zero.
Mode of the Binomial distribution with parameters n=25, p=0.2.
Skewness of the Pareto distribution with parameters =5, =1.
=PoissonRand(10)   Random numbers from the Poisson distribution with parameter =10.

The function value will change every time the worksheet is recalculated. You can force Excel to recalculate the current worksheet by pressing F9.

Copyright © MathWave Technologies