New in Wolfram
Mathematica
8: Probability and Statistics Solvers and Properties
◄
previous
|
next
►
Core Algorithms
Estimate Parameters and Test Goodness of Fit
Compare the PDF of the fitted distribution with a histogram of the data and generate a table of goodness-of-fit statistics.
In[1]:=
X
vals = RandomVariate[NakagamiDistribution[2, 3], 10^4]; h = DistributionFitTest[vals, NakagamiDistribution[\[Mu], \[Omega]], "HypothesisTestData"]; Row[{Show[Histogram[vals, 25, "PDF"], Plot[PDF[h["FittedDistribution"], x], {x, 0, 5}, PlotStyle -> Thick]], h[{"TestDataTable", All}]}]
Out[1]=