Weighted Mean¶
Global Algorithm - One-Dimensional Algorithm
Weighted Mean of a data set is similar to the mean, but the values in the data set are weighted differently. The basic formula is stated as follows:
μweighted=∑Ni=1wi⋅Yi∑Ni=1wi,
where Yi is the ith value in the data set, N is the length of the data vector and μweighted is the weighted mean value.
Input Parameters
Parameter | Type | Constraint | Description | Remarks |
---|---|---|---|---|
Y | Y∈RN | N∈N | Input data vector of length N | |
W | W∈RN | N∈N | Input weighting vector of length N | If ∑wi=1 , the algorithm simplifies to μweighted=∑wi⋅Yi . |
Output Parameters
Parameter | Type | Constraint | Description | Remarks |
---|---|---|---|---|
μweighted | μweighted∈R | Weighted mean value of data Y | The result is sensitive to improper values such as ‘nan’, ‘inf’, ‘null’, etc. |
Single Steps using the Algorithm