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:
In[3]:=
Click for copyable input
Create a WeightedData object and compute its mean and variance:
In[5]:=
Click for copyable input
Out[6]=
Fit to a NormalDistribution using maximum likelihood estimation:
In[7]:=
Click for copyable input
Out[8]=
Use HistogramDistribution to create a weighted histogram:
In[9]:=
Click for copyable input
Out[10]=
In[11]:=
Click for copyable input
Out[11]=
New to Mathematica? Find your learning path »
Have a question? Ask support »