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)