avgWeighted
Calculates the weighted arithmetic mean.
Syntax
Arguments
x
— Values.weight
— Weights of the values.
x
and weight
must both be
Integer or floating-point,
but may have different types.
Returned value
NaN
if all the weights are equal to 0 or the supplied weights parameter is empty.- Weighted mean otherwise.
Return type is always Float64.
Example
Query:
Result:
Example
Query:
Result:
Example
Query:
Result:
Example
Query:
Result: