As in the topic. I always thought, that we have a clear, well established definition of a quantile over a vector of numbers. For example - median is such observation, that splits the data set in so, that 50% of data are >= than it and 50% are <= than it. In case of even number of numbers, we take the average of the two consecutive mid-values. And that's clear. Same can be said about other quantiles, as needed, if we only change the fractions.
Then I read, that quantiles - quartiles, percentiles, deciles and all other "-iles" are inferred from the cumulative distribution function, but - at the end of the day - it leads to the same outcomes.
Then I started learning and used two software to practise, SAS, R and SQL. When I compared quartiles calculated by the three tools, I got different results for the median! I read the documentation and found, that there are lots of ways to calculate the quantiles. When I set appropriate option in R or SAS, the discrepancies disappeared, which is fine, but still my concerns didn't disappear.
Isn't median just median? If we have the clear definition taught in school and textbooks, why do we have to care on the right type of quantiles calculated?
And which is better? Is there anything behind the choice? I assume statisticians making SAS and R are well educated people in statistics, so they know what they do. And yet - they chose different algorithms, so even the professionals aren't consistent in this matter.
I heard something that this returns an estimator of the quantile, but if I have my entire data set, the population per se, I don't haver to estimate anything! Which one should I choose then?
Please enlighten me, why the "classic median" calculated by hand hardly matches the results by professional statistical software? Of course, the differences are minor, like 0.5, but they do exist.
If I am asked by my Employer and Clients why I get different medians depending on software, rather than just using the method taught at school, I will have to justify it somehow...