You are on page 1of 230

Weighted mean

From Wikipedia, the free encyclopedia

The weighted mean is similar to an arithmetic mean (the most common type of average), where instead of each of the data points contributing equally to the final average, some data points contribute more than others. The notion of weighted mean plays a role in descriptive statistics and also occurs in a more general form in several other areas of mathematics. If all the weights are equal, then the weighted mean is the same as the arithmetic mean. While weighted means generally behave in a similar fashion to arithmetic means, they do have a fewcounterintuitive properties, as captured for instance in Simpson's paradox. The term weighted average usually refers to a weighted arithmetic mean, but weighted versions of other means can also be calculated, such as the weighted geometric mean and the weighted harmonic mean.
Contents
[hide]

1 Example 2 Mathematical definition 3 Length-weighted mean 4 Convex combination 5 Statistical properties 6 Dealing with variance

6.1 Correcting for over- or under-dispersion

7 Weighted sample variance 8 Vector-valued estimates 9 Accounting for correlations 10 Decreasing strength of interactions 11 Exponentially decreasing weights 12 Weighted averages of functions 13 See also 14 Notes 15 Further reading 16 External links

[edit]Example

Given two school classes, one with 20 students, and one with 30 students, the grades in each class on a test were: Morning class = 62, 67, 71, 74, 76, 77, 78, 79, 79, 80, 80, 81, 81, 82, 83, 84, 86, 89, 93, 98 Afternoon class = 81, 82, 83, 84, 85, 86, 87, 87, 88, 88, 89, 89, 89, 90, 90, 90, 90, 91, 91, 91, 92, 92, 93, 93, 94, 95, 96, 97, 98, 99 The straight average for the morning class is 80 and the straight average of the afternoon class is 90. The straight average of 80 and 90 is 85, the mean of the two class means. However, this does not account for the difference in number of students in each class, and the value of 85 does not reflect the average student grade (independent of class). The average student grade can be obtained by averaging all the grades, without regard to classes:

Or, this can be accomplished by weighting the class means by the number of students in each class (using a weighted mean of the class means):

Thus, the weighted mean makes it possible to find the average student grade in the case where only the class means and the number of students in each class are available.
[edit]Mathematical

definition

Formally, the weighted mean of a non-empty set of data

with non-negative weights

is the quantity

which means:

Therefore data elements with a high weight contribute more to the weighted mean than do elements with a low weight. The weights cannot be negative. Some may be zero, but not all of them (since division by zero is not allowed). The formulas are simplified when the weights are normalized such that they sum up to 1,

i.e.

. For such normalized

weights the weighted mean is

simply

The common mean

is a special

case of the weighted mean where all data have equal weights, wi = w. When the weights are normalized then
[edit]Length-weighted

mean

This is used for weighting a response variable based upon its dependency on x, a distance variable.

[edit]Convex

combination

Since only the relative weights are relevant, any weighted mean can be expressed using coefficients that sum to

one. Such a linear combination is called a convex combination. Using the previous example, we would get the following:

This simplifies to:

[edit]Statistical

properties
The weighted sample mean, , with

normalized weights (weights summing to one) is itself a random variable. Its expected value and standard deviation are related to the expected values and standard deviations of the observations as follows. If the observations have expected values

then the weighted sample mean has expectation

Particularly, if the expectations of all observations are equal, , then the expectation of the weighted sample mean will be the same,

For uncorrela ted observati ons with standard deviation s i, the weighted sample mean has standard deviation

Con sequ ently , whe n the stan dard devi ation s of all obse rvati ons are equa l, i

= d,
the weig hted sam ple mea n will have stan dard devi ation

. Here

V2 is
the quan tity

s u c h

t h a t

I t

a t t a i n s

i t s

i n i m u m

v a l u e

f o r

e q u a l w e i g h t s ,

a n d

t s

m a x i m u m

w h e n

a l l w e i g h t s

e x c e p t

o n

a r e

z e r o .

I n

t h e

f o r m e r

c a s e

w e

h a

v e

w h i c h

i s

r e l a t e d

t o

t h e

c e n t r a

l l i m i t

t h e o r e m .
[ e d i t ]

D e a l i n g w i t h v

a r i a n c e
S e e

a l s o :

L e a s t _ s q u a r e s # W e i g

h t e d _ l e a s t _ s q u a r e s

S e e

a l s o :

L i n e a r

_ l e a s t _ s q u a r e s _ ( m a t h e m a t i c s ) # W e i g h t e

d _ l i n e a r _ l e a s t _ s q u a r e s

F o r

t h e

w e i g

h t e d

m e a n

o f

l i s t

o f

d a t a

f o r

w h i c

e a c h

e l e m e n t

c o m e s

f r o m

d i f f e r

e n t

p r o b a b i l i t y

d i s t r i b u t i o n

w i t h

k n

o w n

v a r i a n c e

o n e

p o s s i b l e

c h o i c e

f o r

t h e

w e i g h t s

i s

g i v e n

b y :

T h e

e i g h t e d

m e a n

i n

t h i s

c a s e

i s :

a n d

t h e

v a r i a n c e

o f

t h e

w e i g h t e d

m e a n

s :

w h i c h

r e d u c e s

t o

w h e n

a l l

T h e

s i g n i f i c a n c e

o f

t h i s

c h o i c e

i s

h a t

t h i s

w e i g h t e d

m e a n

i s

t h e

m a x i m u

l i k e l i h o o d

e s t i m a t o r

o f

t h e

m e a n

t h e

p r o b a b i l i t y

d i s t r i b u t i o n s

u n d e

t h e

a s s u m p t i o n

t h a t

t h e y

a r e

i n d e p

e n d e n t

a n d

n o r m a l l y

d i s t r i b u t e d

w i t h

t h e

s a m e

m e a n .
[ e d i t ]

C o r r e c t i n g f o r

o v e r o r u n d e r d i s p e r s i o n

W e i g h t e d

m e a n s

a r e

t y p i c a l l y

u s e d

t o

f i n d

t h

w e i g h t e d

m e a n

o f

e x p e r i m e n t a l

d a t a

r a t h e r

t h a n

t h e o r e t i c a l l y

g e n e r a t e

d a t a .

I n

t h i s

c a s e ,

t h e r e

w i l l

b e

s o m e

e r r o r

i n

t h e

v a r i a n c e

o f

e a c h

a t a

p o i n t .

T y p i c a l l y

e x p e r i m e n t a l

e r

r o r s

m a y

b e

u n d e r e s t i m a t e d

d u e

t o

t h

e x p e r i m e n t e r

n o t

t a k i n g

i n t o

a c c o u

n t

a l l

s o u r c e s

o f

e r r o r

i n

c a l c u l a t i

n g

t h e

v a r i a n c e

o f

e a c h

d a t a

p o i n t .

I n

t h i s

e v e n t ,

t h e

v a r i a n c e

i n

t h e

e i g h t e d

m e a n

m u s t

b e

c o r r e c t e d

t o

a c

c o u n t

f o r

t h e

f a c t

t h a t

i s

t o o

l a

r g e .

T h e

c o r r e c t i o n

t h a t

m u s t

b e

m a d

i s

You might also like