What is the third quartile when there are no data above the median?

960 Views Asked by At

I'm a programmer, so apologies if this is a bad question. I'm writing some code that needs to detect outliers. I am currently calculating first and third quartiles. In a sample set of data, I have the following numbers:

179,179,179,178,177

The median comes out to 179 and the first quartile 178, but since there is no number above the median what should I do? Or what if all the numbers were the same? Is the quartile the median? This is my reference.

1

There are 1 best solutions below

3
On

Yes. Essentially you are looking for the data value in the position where ~75% of the data lies below. For five pieces of data, 75% would be .75(5) = 3.75, so take the 4th data value (from lowest to highest). This would give you the 179.