I understand quartiles are to be used in large data sets. But for pedagogical purposes,
What would be the Quartile1,Median and Quartile3 for a set consisting of same numbers?
What would be the quartiles of 7 times 3?
I understand quartiles are to be used in large data sets. But for pedagogical purposes,
What would be the Quartile1,Median and Quartile3 for a set consisting of same numbers?
What would be the quartiles of 7 times 3?
For corner cases like this, you need to consult your definition. All the definitions out there agree on large continuous data sets, but they differ in detail when individual observations matter. Wikipedia gives three methods for computing the quartiles. If your set is seven samples, each with a value 3, the only thing that makes sense to me is to have all three quartiles be 3 as well. All three Wikipedia approaches agree in this case.
There are many different definitions of 'quantile', and thus of the three quartiles. R statistical software supports nine of them. As the Question suggests, all the methods usually give about the same results for large samples, but they can give different results for certain small samples.
In the particular case of a sample with seven 3's, all nine of the methods give the result suggested in the answer by @RossMillikan. However, for a sample consisting of the integers 1 through 7, results are not the same. For some documentation and references, in R see
the page at help(quantile).
> x = 1:7
> x
[1] 1 2 3 4 5 6 7
> quantile(x, type=1)
0% 25% 50% 75% 100%
1 2 4 6 7
> quantile(x, type=2)
0% 25% 50% 75% 100%
1 2 4 6 7
> quantile(x, type=3) # Used for discrete data by SAS
0% 25% 50% 75% 100%
1 2 4 5 7
> quantile(x, type=4)
0% 25% 50% 75% 100%
1.00 1.75 3.50 5.25 7.00
> quantile(x, type=5)
0% 25% 50% 75% 100%
1.00 2.25 4.00 5.75 7.00
> quantile(x, type=6) # Used by Minitab and SPSS
0% 25% 50% 75% 100%
1 2 4 6 7
> quantile(x, type=7) # Default method in R
0% 25% 50% 75% 100%
1.0 2.5 4.0 5.5 7.0
> quantile(x, type=8)
0% 25% 50% 75% 100%
1.000000 2.166667 4.000000 5.833333 7.000000
> quantile(x, type=9)
0% 25% 50% 75% 100%
1.0000 2.1875 4.0000 5.8125 7.0000