Skip to main content
Statistics LibreTexts

2.3: Quantifying Variability Relative to the Median

  • Page ID
    48754
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    In a previous lesson, we estimated the center, shape, and spread of distributions. We quantified the center by computing the mean and median for a data set. In this section, we will examine the spread or variability of a distribution.

    1. Given below are the dotplots for two samples of quiz scores.

      Scores for class A: [13,31,35,42,56,60,62,64,71,73,77,77,79,85,86,89,90,96,99,100]

      clipboard_ea6f90f1e32a762f4fec5a07b093bc00b.png

      Images are created with the graphing calculator, used with permission from Desmos Studio PBC.

      Scores for class B: [60,61,62,63,65,68,70,71,72,73,77,79,79,80,81,82,84,85,89,90]

      clipboard_e3378697bafec637b5d355c149358b1a5.png

      Images are created with the graphing calculator, used with permission from Desmos Studio PBC.

      Estimate the center, shape, and spread of the distributions. Then compare the two distributions. What do you notice is similar about the distributions? What do you notice is different about the distributions?




       

    2. In a previous section, we summarized the center of a distribution by using the sample mean and median. This is an important aspect of reading a graph, but it is not enough. The center of the distributions above are similar, but one distribution has more variability than the other distribution. Choose between the following two numbers to represent the variability for the class A distribution. Then explain your choice: 85 or 30



       

    Range

    1. One way to represent the variability in data is with the range. The range is the difference between the maximum and minimum data values.

      \[\text { range }=\text { maximum }- \text { minimum }\nonumber\]

      Compute the range for the two classes. Which class has the larger range?










       

    One issue with the range is that it is influenced by outliers. In other words, the range is not a resistant measure of spread. This is because the calculation of the range always uses the two most extreme data values in the set.
     

    Five Number Summary

    Another way to describe variability is with quartiles. When the data is sorted from lowest to greatest, the quartiles are numbers that divide the data into four equal parts. Recall that the median is the number that divides the data into two equal parts. 50% of the data is below the median, and 50% of the data is above the median.

    Let’s compute the quartiles for the class A scores. To find the quartiles, we should first compute the median.

    First, we make sure that the data are in order from smallest to largest.

    \[ [13,31,35,42,56,60,62,64,71,73,77,77,79,85,86,89,90,96,99,100] \nonumber \]

    There are 20 values in this set, so we divide 20 by 2 to find the location of the median. 20 divided by 2 is 10 so the median is between the 10th and 11th data values in the ordered list.

    \[[13,31,35,42,56,60,62,64,71,73]\text{ Median } [77,77,79,85,86,89,90,96,99,100]\nonumber\]

    \[\text { Median }=\dfrac{73+77}{2}=75\nonumber\]

    Notice that the median is not an existing value in the set. We see that the median divides the set into two new sets. To find the quartiles, we find the median of the lower half and upper half of the data set. There are 10 values to the left of the median. To find the location of the first quartile Q1, we divide 10 by 2 to get 5 and therefore, there will be 5 data values on each side of Q1. Similarly, to find the location of the third quartile Q3, there will be 5 data values on each side of Q3.

    \[[13,31,35,42,56]\text{ Q1 }[60,62,64,71,73]\text{ Median } [77,77,79,85,86]\text{ Q3 }[89,90,96,99,100]\nonumber \]

    \[\text{Q1}=\dfrac{56+60}{2}=58 \quad\quad\quad\quad\quad\quad\quad\quad\quad \text{Q3}=\dfrac{86+89}{2}=87.5\nonumber\]

    \[ [13,31,35,42,56] 58 [60,62,64,71,73] 75 [77,77,79,85,86] 87.5 [89,90,96,99,100]\nonumber \]






    The median, first quartile Q1, and third quartile Q3, together with the minimum and maximum values in the set, make up the five number summary. The five number summary is given in the table below:

    Class A Five Number Summary

    Minimum

    13

    Q1

    58

    Median = Q2

    75

    Q3

    87.5

    Maximum

    100

    1. Compute the five number summary from Class B’s scores.

       

      Class B Five Number Summary

      Minimum

       

      Q1

       

      Median

       

      Q3

       

      Maximum

       






    We have learned that quartiles are medians! When a set contains an odd number of values, the middle value is not included in the lower or upper half of the given data set to compute the quartiles.
     

    1. Another way to describe variability in a data set is to find the distance between the first and third quartiles (Q1 and Q3). This distance is called the interquartile range, abbreviated as IQR.

      \[\text{IQR}=\text{Q3}-\text{Q1}\nonumber\]

      The IQR gives the range of the middle 50% of the data. For class A, the IQR is \(\text{Q3}-\text{Q1}=87.5-58=29.5\) points. Calculate the IQR for the scores from class B.




       

    2. Compare the IQRs for scores for class A and class B. Does this comparison agree with your intuition about the spread of the distributions? Do you think the IQR is highly affected by extreme values?





       

    Boxplots (Box and Whisker Plots)

    The values in the five-number summary can be represented in a graph called a boxplot (sometimes referred to as a box and whiskers plot). Given below are the boxplots for the scores for each of the classes.

    clipboard_e6c38a05e3f41c8418fa6a181de6e6df2.png

    Images are created with the graphing calculator, used with permission from Desmos Studio PBC.

    1. Mark the minimum, Q1, median, Q3, and maximum on each of the boxplots above.




       
    2. Are the boxplots consistent with your interpretation of the spread of the distributions?




       
    3. What do you think the open circle on the boxplot for scores for class A indicates?



       

    This page titled 2.3: Quantifying Variability Relative to the Median is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Hannah Seidler-Wright.

    • Was this article helpful?