<s>
A	O
weight	B-Algorithm
function	I-Algorithm
is	O
a	O
mathematical	O
device	O
used	O
when	O
performing	O
a	O
sum	O
,	O
integral	O
,	O
or	O
average	O
to	O
give	O
some	O
elements	O
more	O
"	O
weight	O
"	O
or	O
influence	O
on	O
the	O
result	O
than	O
other	O
elements	O
in	O
the	O
same	O
set	O
.	O
</s>
<s>
The	O
result	O
of	O
this	O
application	O
of	O
a	O
weight	B-Algorithm
function	I-Algorithm
is	O
a	O
weighted	B-Algorithm
sum	I-Algorithm
or	O
weighted	B-Algorithm
average	O
.	O
</s>
<s>
Weight	B-Algorithm
functions	I-Algorithm
occur	O
frequently	O
in	O
statistics	O
and	O
analysis	O
,	O
and	O
are	O
closely	O
related	O
to	O
the	O
concept	O
of	O
a	O
measure	O
.	O
</s>
<s>
Weight	B-Algorithm
functions	I-Algorithm
can	O
be	O
employed	O
in	O
both	O
discrete	O
and	O
continuous	O
settings	O
.	O
</s>
<s>
They	O
can	O
be	O
used	O
to	O
construct	O
systems	O
of	O
calculus	O
called	O
"	O
weighted	B-Algorithm
calculus	O
"	O
and	O
"	O
meta-calculus	O
"	O
.	O
</s>
<s>
In	O
the	O
discrete	O
setting	O
,	O
a	O
weight	B-Algorithm
function	I-Algorithm
is	O
a	O
positive	O
function	O
defined	O
on	O
a	O
discrete	O
set	O
,	O
which	O
is	O
typically	O
finite	O
or	O
countable	O
.	O
</s>
<s>
The	O
weight	B-Algorithm
function	I-Algorithm
corresponds	O
to	O
the	O
unweighted	O
situation	O
in	O
which	O
all	O
elements	O
have	O
equal	O
weight	O
.	O
</s>
<s>
One	O
common	O
application	O
of	O
weighted	B-Algorithm
sums	I-Algorithm
arises	O
in	O
numerical	B-Algorithm
integration	I-Algorithm
.	O
</s>
<s>
Weighted	B-Algorithm
means	O
are	O
commonly	O
used	O
in	O
statistics	O
to	O
compensate	O
for	O
the	O
presence	O
of	O
bias	O
.	O
</s>
<s>
The	O
expected	O
value	O
of	O
a	O
random	O
variable	O
is	O
the	O
weighted	B-Algorithm
average	O
of	O
the	O
possible	O
values	O
it	O
might	O
take	O
on	O
,	O
with	O
the	O
weights	O
being	O
the	O
respective	O
probabilities	O
.	O
</s>
<s>
More	O
generally	O
,	O
the	O
expected	O
value	O
of	O
a	O
function	O
of	O
a	O
random	O
variable	O
is	O
the	O
probability-weighted	O
average	O
of	O
the	O
values	O
the	O
function	O
takes	O
on	O
for	O
each	O
possible	O
value	O
of	O
the	O
random	O
variable	O
.	O
</s>
<s>
In	O
regressions	B-General_Concept
in	O
which	O
the	O
dependent	O
variable	O
is	O
assumed	O
to	O
be	O
affected	O
by	O
both	O
current	O
and	O
lagged	O
(	O
past	O
)	O
values	O
of	O
the	O
independent	O
variable	O
,	O
a	O
distributed	O
lag	O
function	O
is	O
estimated	O
,	O
this	O
function	O
being	O
a	O
weighted	B-Algorithm
average	O
of	O
the	O
current	O
and	O
various	O
lagged	O
independent	O
variable	O
values	O
.	O
</s>
<s>
Similarly	O
,	O
a	O
moving	O
average	O
model	O
specifies	O
an	O
evolving	O
variable	O
as	O
a	O
weighted	B-Algorithm
average	O
of	O
current	O
and	O
various	O
lagged	O
values	O
of	O
a	O
random	O
variable	O
.	O
</s>
<s>
In	O
this	O
context	O
,	O
the	O
weight	B-Algorithm
function	I-Algorithm
is	O
sometimes	O
referred	O
to	O
as	O
a	O
density	O
.	O
</s>
<s>
See	O
the	O
entry	O
on	O
orthogonal	O
polynomials	O
for	O
examples	O
of	O
weighted	B-Algorithm
orthogonal	B-Algorithm
functions	I-Algorithm
.	O
</s>
