[Math] How to get a Percentage of how far the value is from expected Value

statistics

I have an expected value say 5(minimum) or 6(minimum).

Then I have 4 values [3, 10, 6, 8]

I would like to compute the percentage on how far the 4 values are from the expected value in terms of percentage. Given 100% means they are all within the minimum and maximum and the farther they are from the expected the lower the percentage would be.

I was looking for a mathematical way of computing this. One way is to assign true or false score for each. Meaning either they match or not the minimum or maximum value.

[3(0.0), 10(0.0), 6(1.0), 8(0.0)] would give 25%

But this solution is too crude because I want to give more fine grained computation for how far I am from the expected value.

[3(0.0), 10(0.0), 6(1.0), 8(0.0)] would give X%
[1(0.0), 10(0.0), 6(1.0), 9(0.0)] would give Y%

Y% should be lower than X% since their value deviates farther from the mean than X%.

I do have a boundary of expected values, 1 to 30. I tried to read on statistics like standard deviation but it is the deviation from the mean. Even If i change it to deviation from expected value, How do I get percentage of how far is it from expected value?

Updated:
I guess I already got an idea on this one. Let say there are N=20 available number to be taken. Then there are X=4 who would share this 20 slots. What I will do is get the average which is A=N/X=5. So I would compute for the summation of the difference of each item from the average. S=sum(abs(Ni-A)) I get the sum of the difference from the maximum.

The percentage would be 1-(S/N)

Best Answer

Do you mean 5 (minimum) to 6 (maximum)? You could calculate how many ranges away each item is. So 3 would get a score of 2 (from being 2 away from 5). 10 would get a score of 4 (10-6). 6 would get a score of 0 for being in range and 8 would get a score of 2. This doesn't tell you what percentage are in range, but it does tell you how far out the others are. Then if your range was 5 to 7 the scores would be 1 for 3, 3/2 for 10, and 1/2 for 8. Maybe you need both figures.

Related Question