WeightedData

WeightedData[{x1,x2,},{w1,w2,}]

represents observations xi with weights wi.

WeightedData[{x1,x2,},fn]

represents observations xi with weighting function fn.

Details

  • WeightedData augments data with weights for each data point.
  • The data {x1,x2,} and weights {w1,w2,} should be lists of equal length.
  • The weight function fn is applied to the list {x1,x2,} and should return an explicit list of weights {w1,w2,}.
  • WeightedData can be used in statistics functions including:
  • Mean,Variance,descriptive statistics functions
    EmpiricalDistribution,nonparametric distribution estimation
    EstimatedDistribution,parametric distribution estimation
  • WeightedData[{x1,x2,}] gives data with equal weights.
  • Properties of WeightedData can be obtained by specifying WeightedData[]["property"].
  • A list of available properties can be obtained using WeightedData[]["Properties"].
  • WeightedData has the following properties:
  • "EmpiricalPDF"data values and estimated weights
    "InputData"unweighted input data values
    "MetaInformation"a list containing meta-information rules
    "Weights"a list containing the data weights

Examples

open allclose all

Basic Examples  (1)

Create data with weights:

In[1]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Compute a weighted Mean and StandardDeviation:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=

Scope  (10)

Applications  (1)

Properties & Relations  (2)

See Also

Mean  Variance  StandardDeviation  EventData  EmpiricalDistribution  HistogramDistribution  SmoothKernelDistribution  KernelMixtureDistribution

Introduced in 2012
(9.0)