# Algorithm used for variance of WeightedData

There are multiple definitions of the sample variance of weighted data in the literature. Which one does Mathematica use? An equation in terms of the arguments provided to WeightedData[] would be best.

• You can use symbolic arguments in WeightedData. You can try, for example, FullSimplify@Variance[WeightedData[Array[d, 3], Array[w, 3]]] – kglr Feb 5 '20 at 14:17
• Also note that the documentation of Variance mentions that the estimator for WeightedData is unbiased. That should rule out some of the definitions (like maximum likelihood estimators). – Sjoerd Smit Feb 5 '20 at 14:50
• Thanks! There are at least two different unbiased estimators; e.g., see Wikipedia:Weighted arithmetic mean. The FullSimplify trick shows that Mathematica is providing what is called there the "reliability weighted sample variance." – David S Feb 6 '20 at 16:27
• I've found the lack of explict mathematical formulae a problem in some other cases in the Mathematica documentation, particularly when there are multiple definitions in use. It would be useful if the "Details" section were always specific enough to enable to formula to be deduced. – David S Feb 6 '20 at 16:31