# On Parameter Estimation using FindDistributionParameters

I would like to estimate the parameters associated with a distribution following the Laplace distribution.

I have created experimental data following the Laplace distribution, using the following code:

data = RandomVariate[ExponentialPowerDistribution[1, 0.5, 1], 1000];


Given the data, I found the shape, location, and scale parameters by using FindDistributionParameters:

FindDistributionParameters[data, ExponentialPowerDistribution[Kappa, Mu, Sigma]]


The obtained result was {1.11375, 0.504605, 1.10716}.

But, if my understanding is correct, the Laplacian distribution is not differentiable at "Mu" (the single peak of the distribution), which gives me trouble understanding the estimation results because MLE assumes the differentiability of the distribution function. So, my questions are:

(Q1) Are the above estimation results reliable (reasonable, or plausible)?

(Q2) If the answer to (Q1) is yes, what is the algorithm used in FindDistributionParameters dealing with the non-differentiability of the distribution function?

(Q3) If the answer to (Q1) is no, then, is there any reasonable way to come up with the parameter estimation for the above example? (In fact, I would like to obtain the standard error of each parameter in a reasonable way too.)

• I don't know how Mathematica does this, but I suspect that for most built-in distributions it already knows the MLE of different parameters. You will find a derivation for this in various statistics books. If you plug in the explicit PDF instead of using a built-in distribution, it will resolve to numerical maximization which will be much slower. – Szabolcs Jun 15 '14 at 15:29
• @David: Thank you very much for editing. I highly appreciate it! – user14070 Jun 16 '14 at 16:20
• @Szabolcs: Thank you very much for your comment. Ok, I take your suggestion seriously. After reading a textbook of mathematical statistics, I now understand how to come up with the mean (= median) and the variance in the current case. But I have a trouble finding the standard errors for the parameters. In fact, I will post a question about it sometime later. Anyway, thank you very much again! – user14070 Jun 16 '14 at 16:20
• How to find the errors is a very good question. There doesn't seem to be a built-in direct way to do it. Please see here. – Szabolcs Jun 16 '14 at 16:44
• Maximum likelihood estimation does not require differentiability to obtain maximum likelihood estimates of the parameters. However, lack of differentiability does affect how one might go about estimating the variance of a maximum likelihood estimate. In such cases, the bootstrap (parametric or nonparametric) is likely your best bet. – JimB Jan 14 '17 at 0:50

dist = ExponentialPowerDistribution[1, 0.5, 1];

data = RandomVariate[dist, 1000];

param = FindDistributionParameters[data,
ExponentialPowerDistribution[\[Kappa], \[Mu], \[Sigma]]]


{\[Kappa] -> 1.01183, \[Mu] -> 0.45847, \[Sigma] -> 1.02004}

distEst = ExponentialPowerDistribution[
\[Kappa], \[Mu], \[Sigma]] /. param;


Alternatively, the estimated distribution can be found using EstimatedDistribution

distEst ===
EstimatedDistribution[data,
ExponentialPowerDistribution[\[Kappa], \[Mu], \[Sigma]]]


True

Show[
Histogram[data, Automatic, "PDF"],
Plot[Evaluate[PDF[#, x] & /@ {dist, distEst}], {x, Min[data], Max[data]},
PlotStyle -> {Directive[Blue, AbsoluteDashing[{5, 3}]],
Directive[Red, AbsoluteDashing[{7, 3}]]}],
PlotRange -> All]


The maximum likelihood method attempts to maximize the log-likelihood function so it is the log-likelihood function rather than the PDF being differentiated with respect to the parameters.

• Thank you very much for your answer. I highly appreciate it. In fact, I have a trouble finding the standard errors for the estimated parameters in the current case. So, I will post a question about it sometime later. Anyway, thank you very much again! – user14070 Jun 16 '14 at 16:24
• @user14070 see documentation for DistributionFitTest at reference.wolfram.com/mathematica/ref/DistributionFitTest.html – Bob Hanlon Jun 16 '14 at 17:02
data = RandomVariate[ExponentialPowerDistribution[1, 0.5, 1], 1000];

ListLinePlot@data


exp = FindDistributionParameters[data, ExponentialPowerDistribution[Kappa, Mu, Sigma]];


{Kappa -> 0.998864, Mu -> 0.511828, Sigma -> 0.988751}

pdf = PDF[ExponentialPowerDistribution[Kappa, Mu, Sigma] /. exp, x]*400;

hist = Histogram@data;

plot = Plot[pdf, {x, -5, 5}, PlotRange -> All, PlotStyle -> Directive[Red, Thick]];

Show[hist, plot]


Your Q1: The result is reliable (see plot)

Your Q2: Read the excellent documentation for FindDistributionParameters

Show[Plot[pdf, {x, -6, 6}, PlotRange -> All, PlotStyle -> Red], SmoothHistogram@data]