A weight function is a mathematical device used when performing a sum, integral, or average to give some elements more "weight" or influence on the result than other elements in the same set. The result of this application of a weight function is a weighted sum or weighted average. Weight functions occur frequently in statistics and analysis, and are closely related to the concept of a measure. Weight functions can be employed in both discrete and continuous settings. They can be used to construct systems of calculus called "weighted calculus"[1] and "meta-calculus".[2]
In the discrete setting, a weight function
w\colonA\to\R+
A
w(a):=1
If the function
f\colonA\to\R
f
A
\sumaf(a);
but given a weight function
w\colonA\to\R+
\sumaf(a)w(a).
One common application of weighted sums arises in numerical integration.
If B is a finite subset of A, one can replace the unweighted cardinality |B| of B by the weighted cardinality
\sumaw(a).
1 | |
|A| |
\sumaf(a)
\sumaf(a)w(a) | |
\sumaw(a) |
.
In this case only the relative weights are relevant.
Weighted means are commonly used in statistics to compensate for the presence of bias. For a quantity
f
fi
2 | |
\sigma | |
i |
The expected value of a random variable is the weighted average of the possible values it might take on, with the weights being the respective probabilities. More generally, the expected value of a function of a random variable is the probability-weighted average of the values the function takes on for each possible value of the random variable.
In regressions in which the dependent variable is assumed to be affected by both current and lagged (past) values of the independent variable, a distributed lag function is estimated, this function being a weighted average of the current and various lagged independent variable values. Similarly, a moving average model specifies an evolving variable as a weighted average of current and various lagged values of a random variable.
The terminology weight function arises from mechanics: if one has a collection of
| ||||||||||
i}{\sum |
n | |
i=1 |
wi},
which is also the weighted average of the positions
In the continuous setting, a weight is a positive measure such as
w(x)dx
\Omega
\Rn
\Omega
[a,b]
dx
w\colon\Omega\to\R+
w(x)
If
f\colon\Omega\to\R
\int\Omegaf(x) dx
can be generalized to the weighted integral
\int\Omegaf(x)w(x)dx
Note that one may need to require
f
w(x)dx
If E is a subset of
\Omega
\intEw(x) dx,
If
1 | |
vol(\Omega) |
\int\Omegaf(x) dx
by the weighted average
\int\Omegaf(x)w(x)dx | |
\int\Omegaw(x)dx |
If
\langlef,g\rangle:=\int\Omegaf(x)g(x) dx
to a weighted bilinear form
\langlef,g\rangle:=\int\Omegaf(x)g(x) w(x) dx.
See the entry on orthogonal polynomials for examples of weighted orthogonal functions.