Website Worth

Total Pageviews

Tuesday

Weighted Mean in Statistics

There are several ways to know 'the average' in statistics. One of them is to calculate the weighted mean. We will do this when different values of a certain variable have different levels of 'importance'.

 

Suppose we want to know the average length of stay of hospitalized patients in a district.

We know that there are two hospitals in the district, one is A, the other is B.

We also know the discharge time in hospital A and B is 2 and 3 days, respectively.

Last 7 days, hospital A has 230 visitors, while hospital B has 100 visitor.

We can calculate the mean:

Mean = (2+3)/2 = 2.5 days.

 

But we also note that the number of visitors in two hospitals are different. We want to take this into account. We can now calculate the weighted mean by using 'number of visitor in each hospital' as a weight.

Here we have weight for hospital A = 230, and weight for hospital B = 100.

Weighted mean = (value1*weight1 + value2*weight2)/(weight1 + weight2)

 

Where "value" is the discharge time, we have value1 (or discharge time in hospital A) is 2 days, value2 (or discharge time in hospital B) is 3 days.

weight1 (note that weight1 is the weight associated with value1) is 230, weight2 (note that weight2 is the weight associated with value2) is 100.

We have:

Weighted mean = (2*230 + 3*100)/(230+100) = 2.3 days. The weighted mean is lower than the mean we have calculated above because we have taken the difference in visitors in our consideration.

 

Now, it's just like when you calculate your GPA: Imagine you study Sociology and Psychology. You want to know the average mark of these two subjects.

In sociology, you got 7, the subject gives you 10 credits.

In psychology, the subject gives you 8 credit, you got 5.

It is certainly not fair if somebody says you got only 6 on average.

To get a fair result, you should 'weight' for the credits.

Weighted mean = (7*10 + 5*8)/(10+8) = 120/18 = 6.66

In this case the weighed mean is larger than the 'normal' mean.