Sponsored Links
-->

Thursday, April 12, 2018

How to Calculate the Weighted Mean; Weighted Average; Overall Mean ...
src: i.ytimg.com

In statistics, a weighted median of a sample is the 50% weighted percentile. It was first proposed by F. Y. Edgeworth in 1888. Like the median, it is useful as an estimator of central tendency, robust against outliers. It allows for non-uniform statistical weights related to, e.g., varying precision measurements in the sample.


Video Weighted median



Definition

General case

For n {\displaystyle n} distinct ordered elements x 1 , x 2 , . . . , x n {\displaystyle x_{1},x_{2},...,x_{n}} with positive weights w 1 , w 2 , . . . , w n {\displaystyle w_{1},w_{2},...,w_{n}} such that ? i = 1 n w i = 1 {\displaystyle \sum _{i=1}^{n}w_{i}=1} , the weighted median is the element x k {\displaystyle x_{k}} satisfying

? i = 1 k - 1 w i <= 1 / 2 {\displaystyle \sum _{i=1}^{k-1}w_{i}\leq 1/2} and ? i = k + 1 n w i <= 1 / 2 {\displaystyle \sum _{i=k+1}^{n}w_{i}\leq 1/2}

Special case

Consider a set of elements in which two of the elements satisfy the general case. This occurs when both element's respective weights border the midpoint of the set of weights without encapsulating it; Rather, each element defines a partition equal to 1 / 2 {\displaystyle 1/2} . These elements are referred to as the lower weighted median and upper weighted median. Their conditions are satisfied as follows:

Lower Weighted Median

? i = 1 k - 1 w i < 1 / 2 {\displaystyle \sum _{i=1}^{k-1}w_{i}<1/2} and ? i = k + 1 n w i = 1 / 2 {\displaystyle \sum _{i=k+1}^{n}w_{i}=1/2}

Upper Weighted Median

? i = 1 k - 1 w i = 1 / 2 {\displaystyle \sum _{i=1}^{k-1}w_{i}=1/2} and ? i = k + 1 n w i < 1 / 2 {\displaystyle \sum _{i=k+1}^{n}w_{i}<1/2}

Ideally, a new element would be created using the mean of the upper and lower weighted medians and assigned a weight of zero. This method is similar to finding the median of an even set. The new element would be a true median since the sum of the weights to either side of this partition point would be equal.
Depending on the application, it may not be possible or wise to create new data. In this case, the weighted median should be chosen based on which element keeps the partitions most equal. This will always be the weighted median with the lowest weight.
In the event that the upper and lower weighted medians are equal, the lower weighted median is generally accepted as originally proposed by Edgeworth.


Maps Weighted median



Properties

The sum of weights in each of the two partitions should be as equal as possible.

If the weights of all numbers in the set are equal, then the weighted median reduces down to the median.


Excel 2013 Statistical Analysis #17: Weighted Mean & SUMPRODUCT ...
src: i.ytimg.com


Examples

For simplicity, consider the set of numbers { 1 ; 2 ; 3 ; 4 ; 5 ; } {\displaystyle \{1;2;3;4;5;\}} with each number having weights { 0.15 ; 0.1 ; 0.2 ; 0.3 ; 0.25 ; } {\displaystyle \{0.15;0.1;0.2;0.3;0.25;\}} respectively. The median is 3 and the weighted median is the element corresponding to the weight 0.3, which is 4. The weights on each side of the pivot add up to 0.45 and 0.25, satisfying the general condition.

Consider the set of numbers { 1 ; 2 ; 3 ; 4 ; } {\displaystyle \{1;2;3;4;\}} with each number having uniform weights { 0.25 ; 0.25 ; 0.25 ; 0.25 ; } {\displaystyle \{0.25;0.25;0.25;0.25;\}} respectively. Equal weights should result in a weighted median equal to the median. This median is 2.5 since it is an even set. The lower weighted median is 2 with partition sums of 0.25 and 0.5, and the upper weighted median is 3 with partition sums of 0.5 and 0.25. Note that these partitions each satisfy their respective special condition and the general condition. It is ideal to introduce a new pivot by taking the mean of the upper and lower weighted medians when they exist. With this, the set of numbers is { 1 ; 2 ; 2.5 ; 3 ; 4 ; } {\displaystyle \{1;2;2.5;3;4;\}} with each number having weights { 0.25 ; 0.25 ; 0 ; 0.25 ; 0.25 ; } {\displaystyle \{0.25;0.25;0;0.25;0.25;\}} respectively. This creates partitions that both sum to 0.5. It can easily be seen that the weighted median and median are the same for any size set with equal weights.

Similarly, consider the set of numbers { 1 ; 2 ; 3 ; 4 ; } {\displaystyle \{1;2;3;4;\}} with each number having weights { 0.49 ; 0.01 ; 0.25 ; 0.25 ; } {\displaystyle \{0.49;0.01;0.25;0.25;\}} respectively. The lower weighted median is 2 with partition sums of 0.49 and 0.5, and the upper weighted median is 3 with partition sums of 0.5 and 0.25. In the case of working with integers, the lower weighted median would be accepted since it is the lower weight of the pair and therefore keeps the partitions most equal. However, it is more ideal to take the mean of these weighted medians instead. Coincidentally, both the weighted median and median are equal to 2.5, but this will not always hold true for larger sets depending on the weight distribution.


Image Processing Algorithm: Weighted Median Filter - YouTube
src: i.ytimg.com


Algorithm

Weighted median can be computed by sorting the set of numbers and finding the smallest numbers which sums to half the weight of total weight. This algorithm takes O ( n log n ) {\displaystyle O(n\log n)} time. There is a better approach to find weighted median using a modified selection algorithm.


Mean Mean of Grouped Data Weighted Mean - YouTube
src: i.ytimg.com


See also

  • Weighted arithmetic mean
  • Least absolute deviations
  • Median filter
  • Quickselect

Average Stock Illustrations â€
src: thumbs.dreamstime.com


References

Source of the article : Wikipedia

Comments
0 Comments