<< weighted_deciles Probas Stats weighted_median >>

Scilab Scholar module for schools >> Probas Stats > weighted_mean

weighted_mean

weighted mean (mean for frequency distribution)

Calling sequence

m = weighted_mean(v,n)

Arguments

v

vector of real numbers

n

vector of positive real numbers

m

real number

Description

weighted_mean(v,n) returns the mean of the components of the vector v weighted by the vector of numbers n with v and n of the same dimension n a vector of positive numbers or zeros but not all zeros

Examples

v=[8,10,11]
n=[3,5,1]
weighted_mean(v,n)

See also

<< weighted_deciles Probas Stats weighted_median >>