weightedStandardDeviation
weightedStandardDeviation(
x,weights):number
Defined in: src/weighted_standard_deviation.js:16
The weighted standard deviation is the square root of the weighted variance.
This is a population weighted standard deviation.
Parameters
Section titled “Parameters”number[]
population of one or more data points
weights
Section titled “weights”number[]
non-negative weights for each data point
Returns
Section titled “Returns”number
weighted standard deviation
Throws
Section titled “Throws”if x is empty, weights is a different length than x, all weights are zero, or a weight is negative
Example
Section titled “Example”weightedStandardDeviation([2, 4, 4, 4, 5, 5, 7, 9], [1, 1, 1, 1, 1, 1, 1, 1]); // => 2