WOLFRAM

finds the parameter estimates for the distribution dist from data.

FindDistributionParameters[data,dist,{{p,p0},{q,q0},}]

finds the parameters p, q, with starting values p0, q0, .

Details and Options

  • FindDistributionParameters returns a list of replacement rules for the parameters in dist.
  • The data must be a list of possible outcomes from the given distribution dist.
  • The distribution dist can be any parametric univariate, multivariate, or derived distribution with unknown parameters.
  • The following options can be given:
  • AccuracyGoalAutomaticthe accuracy sought
    ParameterEstimator "MaximumLikelihood"what parameter estimator to use
    PrecisionGoalAutomaticthe precision sought
    WorkingPrecision Automaticthe precision used in internal computations
  • The following basic settings can be used for ParameterEstimator:
  • "MaximumLikelihood"maximize the loglikelihood function
    "MethodOfMoments"match raw moments
    "MethodOfCentralMoments"match central moments
    "MethodOfCumulants"match cumulants
    "MethodOfFactorialMoments"match factorial moments
  • The maximum likelihood method attempts to maximize the log-likelihood function , where are the distribution parameters and is the PDF of the distribution.
  • The method of moments solves , , where is the ^(th) sample moment and is the ^(th) moment of the distribution with parameters .
  • Method-of-moment-based estimators may not satisfy all restrictions on parameters.

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Obtain the maximum likelihood parameter estimates assuming a Laplace distribution:

Out[1]=1

Obtain the method of moments estimates:

Out[2]=2

Estimate parameters for a multivariate distribution:

Out[2]=2

Compare the difference between the original and estimated PDFs:

Out[3]=3

Estimate parameters from quantity data:

Out[1]=1
Out[2]=2

Scope  (15)Survey of the scope of standard use cases

Basic Uses  (5)

Estimate both parameters for a binomial distribution:

Out[2]=2

Estimate p, assuming n is known:

Out[3]=3

Estimate n, assuming p is known:

Out[4]=4

Get the distribution with maximum likelihood parameter estimate for a particular family:

Out[2]=2

Check goodness of fit by comparing a histogram of the data and the estimate's PDF:

Out[3]=3

Perform goodness-of-fit tests with null distribution from res:

Out[4]=4

Perform tests correcting for estimation of the parameter:

Out[5]=5

Estimate parameters by maximizing the loglikelihood:

Out[2]=2

Plot the loglikelihood function to visually check that the solution is optimal:

Out[3]=3

Visualize a loglikelihood surface to find rough values for the parameters:

Out[2]=2

Supply those rough values as starting values for the estimation:

Out[3]=3

Mark the optimal point on the contour plot:

Out[4]=4

Estimate the normal approximation of Poisson data:

Out[2]=2

Obtain estimate to 20 digits:

Out[3]=3

Univariate Parametric Distributions  (2)

Estimate parameters for a continuous distribution:

Out[2]=2

Estimate parameters for a discrete distribution:

Out[2]=2

Compare the fitted and empirical CDFs:

Out[3]=3

Multivariate Parametric Distributions  (2)

Estimate parameters for a discrete multivariate distribution:

Out[2]=2

Estimate parameters for a continuous multivariate distribution:

Out[2]=2

Visualize the density functions for the marginal distributions:

Out[3]=3

Obtain the covariance matrix from the formula:

Derived Distributions  (6)

Estimate parameters for a truncated normal:

Out[7]=7

Estimate parameters for a constructed distribution:

Out[1]=1
Out[3]=3

Visualize the optimal point:

Out[4]=4

Estimate parameters for a product distribution:

Out[2]=2

Estimate parameters for a copula distribution:

Out[2]=2

Estimate parameters for a component mixture:

Out[3]=3

Estimate the mixture probabilities assuming the component distributions are known:

Out[5]=5

Visualize the two estimates against the data:

Out[6]=6

Estimate parameters for a distribution in specified units:

Out[1]=1
Out[2]=2

Options  (4)Common values & functionality for each option

ParameterEstimator  (3)

Estimate parameters by matching cumulants:

Out[2]=2

Other momentbased methods typically give similar results:

Out[3]=3
Out[4]=4

Estimate parameters based on default moments:

Out[2]=2

Estimate parameters from the first and fourth moments:

Out[3]=3

Obtain the maximum likelihood estimates using the default method:

Out[2]=2

Use FindMaximum to obtain the estimates:

Out[3]=3

Use EvaluationMonitor to extract the points sampled:

Visualize the sequences of sampled and values:

Out[5]=5

WorkingPrecision  (1)

Use machine precision for continuous parameters by default:

Out[2]=2

Obtain a higher-precision result:

Out[3]=3

Applications  (17)Sample problems that can be solved with this function

Use One Parameter Estimator to Get Starting Values for Another  (1)

Get the method of moments estimate:

Out[1]=1

Use the method of moments estimate as the starting value for ml estimation:

Out[1]=1

Obtain ml estimates for a gamma distribution:

Out[1]=1

Use those as starting values for the method of moments:

Out[1]=1

Obtain Starting Values for Another Estimation  (1)

Estimate Laplace parameters for data from an ExponentialPowerDistribution:

Out[2]=2

Use the Laplace estimate as a starting point for estimating exponential power parameters:

Out[3]=3

Compare the data with the Laplace and exponential power estimates:

Out[4]=4

Parameter Estimation of Similarly Shaped Distributions  (1)

Model lognormal distributed data with a gamma distribution:

Out[3]=3

Compare the distributions of the simulation and estimated distributions:

Out[4]=4

Accident Claims  (1)

The number of accident claims per policy per year from an insurance company:

Estimate the parameter for a logarithmic series distribution for policy claims shifted by 1:

Out[2]=2

See that the estimate gives a maximal result:

Out[3]=3

Word Lengths in Different Languages  (1)

Get word length data for several languages:

Model the word lengths for each language as binomially distributed with :

Out[3]=3

Compare the actual and estimated distributions:

Out[4]=4

Bootstrap the distribution of p values based on these 9 results:

Out[6]=6

Estimate the expected value of p and a standard deviation for the estimate:

Out[7]=7

Text Frequency  (1)

The word count in a text follows a Zipf distribution:

Fit a ZipfDistribution to the word frequency data:

Out[3]=3

Fit a truncated ZipfDistribution to counts at most 50 using rhohat as a starting value:

Out[4]=4

Visualize the CDFs up to the truncation value:

Out[5]=5

Estimate the proportion of the original data not included in the truncated model:

Out[6]=6
Out[7]=7

Earthquake Magnitudes  (1)

Find estimates for a multimodal MixtureDistribution model:

Out[1]=1

The magnitudes of earthquakes in the United States in the selected years have two modes:

Out[3]=3

Fit distribution from possible mixtures of one NormalDistribution with another:

Out[5]=5

Extract the means of the components:

Out[6]=6

The components' means are far enough apart that they are still the modes:

Out[7]=7

Wind Speed Analysis  (1)

Model monthly maximum wind speeds in Boston:

Fit the data to a RayleighDistribution:

Out[2]=2

An ExtremeValueDistribution:

Out[3]=3

Compare the empirical and fitted quantiles to see where the models deviate from the data:

Out[4]=4

Distribution of Incomes  (1)

Model incomes at a large state university:

Out[1]=1

Assume the salaries are Dagum distributed:

Out[4]=4

Assume they follow a more general Pareto distribution:

Out[5]=5

Compare the subtle differences in the estimated distributions:

Out[6]=6

Market Change in Stock Values  (1)

Use a beta distribution to model the proportion of Dow Jones Industrial stocks that increase in value on a given day:

Out[3]=3

Find daily change for Dow Jones Industrial stocks:

Number of days for each financial entity:

Out[5]=5

Extract values from time series for each entity and normalize numeric quantities:

Check if each entity has the same length of data:

Out[7]=7
Out[8]=8

Calculate the daily ratio of companies with an increase in value:

Find parameter estimates, excluding days with zero or all companies having an increase in value:

Out[11]=11

Visualize the likelihood contours and mark the optimal point:

Out[12]=12

Automobile Fuel Efficiency  (1)

The average city and highway mileage for midsize cars follows a binormal distribution:

Assume city and highway miles per gallon are normally distributed and correlated:

Out[2]=2

Extract the estimated average city and highway mileages:

Out[3]=3

Extract the estimated correlation between city and highway mileages:

Out[4]=4

Visualize the joint density on a logarithmic scale with the mean mileage marked with a blue point:

Out[5]=5

Earthquake Waiting Times  (1)

The data contains waiting times in days between serious (magnitude at least 7.5 or over 1000 fatalities) earthquakes worldwide, recorded from 12/16/1902 to 3/4/1977:

Model waiting times by an ExponentialDistribution:

Out[2]=2

Estimate the average and median number of days between major earthquakes:

Out[3]=3

Earthquake Frequency  (1)

The number of earthquakes per year can be modeled by SinghMaddalaDistribution:

Out[1]=1
Out[2]=2

Fit the distribution to the data:

Out[3]=3

Compute the maximized loglikelihood:

Out[4]=4

Visualize the loglikelihood profiles near the optimal parameter values:

Out[5]=5

Time between Geyser Eruptions  (1)

Mixtures can be used to model multimodal data:

Out[1]=1

A histogram of waiting times for eruptions of the Old Faithful geyser exhibits two modes:

Out[3]=3

Fit a mixture of gamma and normal distributions to the data:

Out[5]=5

Compare the histogram to the PDF of the estimated distribution:

Out[6]=6

Stock Price Distribution  (1)

Lognormal distribution can be used to model stock prices:

Fit the distribution to the data:

Out[10]=10

Visualize the profile likelihoods, fixing one parameter at the fitted value:

Out[18]=18

Water Flow Rates  (1)

Consider the annual minimum daily flows given in cubic meters per second for the Mahanadi river:

Model the annual minimum mean daily flows as a MinStableDistribution:

Out[2]=2

Simulate annual minimum mean daily flows for the next 30 years:

Out[3]=3

Population Sizes  (1)

Use a Pareto distribution to model Australian city population sizes:

Out[3]=3

Get the probability that a city has a population at least 10000 under a Pareto distribution:

Out[4]=4

Compute the probability given the parameter estimates:

Out[5]=5

Compute the probability based on the original data:

Out[6]=6

Properties & Relations  (8)Properties of the function, and connections to other functions

FindDistributionParameters gives estimates as replacement rules:

Out[1]=1

EstimatedDistribution gives a distribution with parameter estimates inserted:

Out[2]=2

FindProcessParameters returns a list of parameter estimates for a random process:

Out[2]=2

FindDistributionParameters returns a list of parameter estimates for a distribution:

Out[4]=4

Estimate distribution parameters by maximum likelihood:

Out[2]=2

Use DistributionFitTest to test quality of the fit:

Out[3]=3

Extract the fitted distribution parameter:

Out[4]=4

Obtain a table of relevant test statistics and pvalues:

Out[5]=5

Estimate parameters in a parametric distribution:

Out[2]=2

Get a nonparametric kernel density estimate using SmoothKernelDistribution:

Out[3]=3

Compare the PDFs for the nonparametric and parametric distributions:

Out[4]=4

Visualize the nonparametric density using SmoothHistogram:

Out[5]=5

Get a maximum likelihood estimate of parameters:

Out[2]=2

Compute the likelihood using Likelihood:

Out[3]=3

Compute the loglikelihood using LogLikelihood:

Out[4]=4

Estimate parameters by matching raw moments:

Out[2]=2

Compute raw moments from the data using Moment:

Out[3]=3

Compute the same moments from the beta distribution for the estimated parameters:

Out[4]=4

Estimate parameters for a Weibull distribution:

Out[2]=2

Use QuantilePlot to visualize the empirical quantiles versus the theoretical quantiles:

Out[3]=3

Obtain the same visualization when the estimation is done within QuantilePlot:

Out[4]=4

FindDistributionParameters ignores time stamps in TimeSeries and EventSeries:

Out[2]=2

The same as:

Out[3]=3

For TemporalData, all the path structure is ignored:

Out[5]=5

The same as:

Out[6]=6

Possible Issues  (3)Common pitfalls and unexpected behavior

Solutions of method-of-moment equations can give parameters that are not valid:

Out[1]=1
Out[2]=2

For a continuous distribution:

Out[4]=4
Out[5]=5

Good starting values may be needed to obtain a good solution:

Out[2]=2
Out[3]=3

Good starting values may result in quicker results:

Out[2]=2
Out[3]=3
Wolfram Research (2010), FindDistributionParameters, Wolfram Language function, https://reference.wolfram.com/language/ref/FindDistributionParameters.html.
Wolfram Research (2010), FindDistributionParameters, Wolfram Language function, https://reference.wolfram.com/language/ref/FindDistributionParameters.html.

Text

Wolfram Research (2010), FindDistributionParameters, Wolfram Language function, https://reference.wolfram.com/language/ref/FindDistributionParameters.html.

Wolfram Research (2010), FindDistributionParameters, Wolfram Language function, https://reference.wolfram.com/language/ref/FindDistributionParameters.html.

CMS

Wolfram Language. 2010. "FindDistributionParameters." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindDistributionParameters.html.

Wolfram Language. 2010. "FindDistributionParameters." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindDistributionParameters.html.

APA

Wolfram Language. (2010). FindDistributionParameters. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindDistributionParameters.html

Wolfram Language. (2010). FindDistributionParameters. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindDistributionParameters.html

BibTeX

@misc{reference.wolfram_2025_finddistributionparameters, author="Wolfram Research", title="{FindDistributionParameters}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/FindDistributionParameters.html}", note=[Accessed: 29-March-2025 ]}

@misc{reference.wolfram_2025_finddistributionparameters, author="Wolfram Research", title="{FindDistributionParameters}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/FindDistributionParameters.html}", note=[Accessed: 29-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_finddistributionparameters, organization={Wolfram Research}, title={FindDistributionParameters}, year={2010}, url={https://reference.wolfram.com/language/ref/FindDistributionParameters.html}, note=[Accessed: 29-March-2025 ]}

@online{reference.wolfram_2025_finddistributionparameters, organization={Wolfram Research}, title={FindDistributionParameters}, year={2010}, url={https://reference.wolfram.com/language/ref/FindDistributionParameters.html}, note=[Accessed: 29-March-2025 ]}