Quartiles of six unsorted values
Quartiles of six unsorted values
Quartiles of six unsorted values · IQR,Q₁,Q₂,Q₃
- 262 bytes
- COMP mode
Worked examples
Example 1
Six completion times in minutes, recorded as 9, 1, 7, 3, 11 and 5, are to be analysed by the median-of-halves method. What is their interquartile range?
Answer
Standard solution (without a calculator)
- Order the observations: 1≤3≤5≤7≤9≤11 minutes.
- Split into halves: The lower three are 1,3,5 and the upper three are 7,9,11.
- Read the quartiles: Q₁=3 min and Q₃=9 min; the overall median is Q₂=(5+7)/2=6 min.
- Subtract the quartiles: IQR=Q₃−Q₁=9−3=6 min.
- Choose the option: The interquartile range is 6 min, option C.
Example 2
Six temperatures in °C are recorded as 8, −2, 4, 10, 0 and 6. Using the median-of-halves convention, what is their interquartile range?
Answer
Standard solution (without a calculator)
- Order the readings: −2≤0≤4≤6≤8≤10 °C.
- Split into halves: The lower three are −2,0,4 and the upper three are 6,8,10.
- Read the quartiles: Q₁=0 °C and Q₃=8 °C; Q₂=(4+6)/2=5 °C.
- Subtract: IQR=Q₃−Q₁=8−0=8 °C.
- Choose the option: The IQR is 8 °C, option D.
Example 3
Six sample mass deviations in grams, in recorded order, are 2.5, −1.5, 2.5, 0, 4 and 0. Order them and find Q₁, median Q₂, Q₃ and IQR by the median-of-halves method.
Answer
Standard solution (without a calculator)
- Keep repeated values: Ordered data are −1.5≤0≤0≤2.5≤2.5≤4 g. Both zeros and both 2.5 values count separately.
- Split the list: Lower half (−1.5,0,0) has median Q₁=0 g; upper half (2.5,2.5,4) has median Q₃=2.5 g.
- Find the overall median: Q₂=(0+2.5)/2=1.25 g.
- Find the spread: IQR=Q₃−Q₁=2.5−0=2.5 g.
- State all results: Q₁=0 g, Q₂=1.25 g, Q₃=2.5 g and IQR=2.5 g.
When to use it
For exactly six observations, order the data a₁≤a₂≤a₃≤a₄≤a₅≤a₆. Under the median-of-halves convention, Q₁=a₂, Q₂=(a₃+a₄)/2 and Q₃=a₅; the interquartile range is Q₃−Q₁. The program performs the necessary comparisons from unsorted input.
Enter six observations
- Enter the six raw values in their recorded order at A?, B?, C?, D?, X? and Y?. Negative values, decimals and repeated values are allowed; do not sort them before entry unless the question already presents them sorted.
- Each observation must use the same unit. Enter a zero explicitly. The program expects six individual values, not class boundaries, frequencies or a variable-sized sample.
Read four statistics
- Read IQR first, then Q₁, Q₂ and Q₃. Press EXE at the first three Disp pauses and AC after the final Q₃ screen.
- Use the median-of-halves definition for six values. Other textbook quartile conventions can give different Q₁ and Q₃, especially for small datasets.
Question types
- Original HKDSE Mathematics Compulsory Part practice asks students to order raw data, identify quartiles and interpret the interquartile range. Show the ordered list in written work.
Before you start
- Use COMP and an empty P1 with at least 262 bytes; P1–P4 share 680 bytes. The program sets Norm 1 and does not use angles, so Deg is unnecessary.
- Exactly six raw observations are required. Negative numbers, decimals and ties are valid. This is not a frequency-table or arbitrary-sample-size routine.
- Q₁ and Q₃ are the medians of the lower and upper three values. Q₂ is the mean of the two central values. Confirm the question uses this quartile convention.
- Enter all six values. Blank EXE may retain an old register value; it is not a zero. Use (−) for a negative input.
- The program overwrites A, B, C, D, X, Y and uses M as a swap temporary; save stored values first. Its first screen is IQR, not Q₁.
- Use the same unit for every value. IQR and quartiles use that unit; an IQR of zero can be valid when Q₁=Q₃.
- Very large common baselines with tiny differences can lose precision. For such data, subtract a common baseline first, then add it back to quartiles but not to IQR.
Checking access…