Computes weighted variance
weighted_var(x, w) wvar(x, w)
x
: A numeric vector of length .w
: A numeric vector of length .Numeric scalar with the weighted variance.
weighted_variance
implements weighted variance computation in the following form:
where , and .
This function is used in diffmap
.
Useful links