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" and "meta-calculus".
In the discrete setting, a weight function is a positive function defined on a discrete set , which is typically finite or countable. The weight function corresponds to the unweighted situation in which all elements have equal weight. One can then apply this weight to various concepts.