Statistic to consider while analysing a value with previous set of values
As I'm understanding it, you want some measure of central tendency. There are three of these: mean, median, and mode. Which one you want to use depends on your goals and priorities. Mean is very popular and understandable to people. It has a lot of useful statistical properties. However, it is subject to outliers. On the other hand, mode and median are not (as) influenced by outliers, but they have fewer statistical usages. Further, in the case of the median and mean, the value you calculate may not actually be in your data set, whereas the mode will.
Which of these considerations matter for you?
But even after you pick the measure of central tendency you like, how are you going to determine when something is "too far" out of the set? In your question you're doing it as just a percentage, but this might not be the best way.
For most problems, I would probably use the mean as my measure of central tendency and use standard deviation as the statistic to determine if a figure is "off the mark." But something else might work better for you.
I am trying to find a good statistical method to compare a given value with an existing set of values. Currently I am considering mean of the existing numbers and comparing it with the given value. If the value is off by 50% of the mean then I would say it is off the flow. I am using python programming language for all calculations. Is there any other method possible which is more efficient?
Ex: 1,4,7,0,0,0 are the values that exist currently.
I get the mean of these : 2
If the given value is 10, I would say it is off the mark.
Can there be a more efficient way?