One can define an upper quartile for a population and a upper quartile for a sample.
Population: Let X be a random variable. The the upper population quartile is the value, x, for which Prob { X <=x } = 0.75. Or, in words, the probability of drawing a value from the population that is less than its upper quartile is 0.75, by definition.
Sample: Let x1,x2, ... xn be a sample drawn independently from the same population. Sort them from smallest to largest to form the so-called order statistics: x(1), x(2), ... x(n). For simplicity let's assume that n=100. Then the smallest three-quarters of the values are x(1), x(2), ... x(75), and we would call x(75) the upper sample quartile. If you had only ten values, say, then you might use some value between x(7) and x(8) as the sample upper quartile. For this and other reasons the sample quartile may only be useful where large samples are involved.
Chat with our AI personalities
lower quartile = 1/4(n+1) upper quartile = 3/4(n+1) where n is the number of the values. Obviously the values have to be ordered from the lower to the higher: the number you'll get is the position in this order. Let's say you get 4 for your lower quartile, it means that the 4th value is your lower quartile.
By definition, a quarter of the observations are at most as large as the lower quartile. Therefore it is possible to have an observation, X, which is smaller than the lower quartile, L. That is X <= L Again, by definition, a quarter of the observations are at least as large as the lower quartile. Therefore it is possible to have an observation, Y, which is larger than the upper quartile, U. That is U <= Y So X <= L <= U <= Y Therefore U - L <= Y - X That is, the IQR must be less than or equal to the range.
These are sometimes considered outliers but there is no formal definition for them.
If the result is 1.5 x Inter Quartile Range (or more) above the Upper Quartile or 1.5 x Inter Quartile Range (or more) below the Lower Quartile.
you do work out the upper and lower quartile