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:
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: