I am seeing some inconsistencies with regards to finding the upper and lower quartiles when you you have an odd number in your data set.

Which is correct, counting the median in both your upper and lower set, or ignoring it?

When finding the upper and lower quartiles of a data set with an odd number of observations, there are different conventions which can lead to the inconsistencies you mentioned. There are two common methods: including the median value in both the upper and lower sets, or excluding it.

1. Including the median in both sets: In this method, the median value is included in both the upper and lower sets. This means that when finding the upper quartile, the median value is also counted as part of the upper set.

2. Excluding the median: In this method, the median value is not included in either the upper or lower sets. When finding the upper quartile, the median value is disregarded and not counted in the upper set.

Both methods are technically correct, but they can yield slightly different results. The method used may depend on the context or the specific convention followed in a particular field of study or statistical software. It is important to clarify which method is being used when interpreting or comparing quartile values.

To find the quartiles, the data set needs to be divided into four equal parts. The first quartile (Q1) marks the 25th percentile, the second quartile (Q2) marks the 50th percentile (which is also the median), and the third quartile (Q3) marks the 75th percentile.

When you have an odd number of data points, there are two different methods to compute the quartiles: including the median in both sets or ignoring it.

1. Method 1: Including the Median in Both Sets
In this method, the median is included in both the lower and upper halves of the data. This means that the data set is split into two equal parts at the position of the median. For example, if you have 9 data points, the median (Q2) would be the value at position 5. So, the lower quartile (Q1) would be the median of the first four values (positions 1 to 4), and the upper quartile (Q3) would be the median of the last four values (positions 6 to 9).

2. Method 2: Ignoring the Median
In this method, the median is not included in either the lower or upper set of data. Instead, it is excluded while dividing the data set into two parts. Using the same example as before with 9 data points, the median (Q2) would be the value at position 5. In this case, the lower quartile (Q1) would be the median of the first four values (positions 1 to 4), and the upper quartile (Q3) would be the median of the last four values (positions 6 to 9). The median (Q2) is not used in the calculation of either Q1 or Q3.

Both methods are commonly used, but it's important to note which method is being followed when discussing quartiles, as this can affect the results.