structural:summarization, structural:expansion, information:extraction, stylistic:style_transfer
Weighted samples

In a weighted sample, each vector x i {\displaystyle \textstyle {\textbf {x}}_{i}} (each set of single observations on each of the K random variables) is assigned a weight w i ≥ 0 {\displaystyle \textstyle w_{i}\geq 0}. Without loss of generality, assume that the weights are normalized:

(If they are not, divide the weights by their sum).Then the weighted mean vector x ¯ {\displaystyle \textstyle \mathbf {\bar {x}} } is given by

and the elements q j k {\displaystyle q_{jk}} of the weighted covariance matrix Q {\displaystyle \textstyle \mathbf {Q} } are

If all weights are the same, w i = 1 / N {\displaystyle \textstyle w_{i}=1/N}, the weighted mean and covariance reduce to the (biased) sample mean and covariance mentioned above.