Fit Nonparametric and Parametric Distributions to Weighted Data
Generate random reals from
to
and weight them according to the PDF of a NormalDistribution using WeightedData:
![](Files/FitNonparametricAndParametricDistributionsToWeightedData.en/1.png)
![](Files/FitNonparametricAndParametricDistributionsToWeightedData.en/2.png)
Create a WeightedData object and compute its mean and variance:
Fit to a NormalDistribution using maximum likelihood estimation:
Use HistogramDistribution to create a weighted histogram: