Sample and weighted average
The sample mean (or, average) of given numbers , is defined as
The sample average can be interpreted as a scalar product:
where is the vector containing the samples, and
, with
the vector of ones.
More generally, for any vector , with
for every
, and
, we can define the corresponding weighted average as
. The interpretation of
is in terms of a discrete probability distribution of a random variable
, which takes the value
with probability
,
. The weighted average is then simply the expected value (or, mean) of
under the probability distribution
. The expected value is often denoted
, or
if the distribution
is clear from context.