How to use these solu­tions

These are step-by-step solu­tions to the six Prac­tice ques­tions of the les­son Range and Mean Devi­a­tion. Work each one your­self first, then com­pare. Mean devi­a­tion ques­tions always fol­low the same three stages: find the cen­tral value (mean or median), find each dis­tance from it, then aver­age those dis­tances. The solu­tions keep those stages sep­a­rate so you can see where any slip hap­pened.

Ques­tion 1: Range and mean devi­a­tion about the mean

The prob­lem

Find the range and the mean devi­a­tion about the mean: 6,7,10,12,13,4,8,126, 7, 10, 12, 13, 4, 8, 12.

Under­stand­ing the prob­lem

You have n=8n = 8 raw obser­va­tions (no fre­quency table). You need the range, which depends only on the largest and small­est val­ues, and the mean devi­a­tion about the mean, which is the aver­age dis­tance of the obser­va­tions from xˉ\bar x.

The idea

Range == largest −- small­est. For the mean devi­a­tion use

MD(xˉ)=1n∑∣xi−xˉ∣.\displaystyle \text{MD}(\bar x) = \frac{1}{n}\sum \lvert x_i - \bar x \rvert.

Step-by-step solu­tion

Step 1. Find the range. The largest value is 1313 and the small­est is 44.

Range=13−4=9\text{Range} = 13 - 4 = 9

Step 2. Find the mean.

xˉ=6+7+10+12+13+4+8+128=728=9\displaystyle \bar x = \frac{6 + 7 + 10 + 12 + 13 + 4 + 8 + 12}{8} = \frac{72}{8} = 9

Step 3. Find each dis­tance from the mean. The absolute value makes every dis­tance pos­i­tive.

xix_i 66 77 1010 1212 1313 44 88 1212
∣xi−9∣\lvert x_i - 9 \rvert 33 22 11 33 44 55 11 33

Step 4. Add the dis­tances.

∑∣xi−9∣=3+2+1+3+4+5+1+3=22\displaystyle \sum \lvert x_i - 9 \rvert = 3 + 2 + 1 + 3 + 4 + 5 + 1 + 3 = 22

Step 5. Divide by n=8n = 8.

MD(xˉ)=228=2.75\displaystyle \text{MD}(\bar x) = \frac{22}{8} = 2.75

Check­ing the answer

With­out absolute val­ues, the devi­a­tions from the mean always add to 00: −3−2+1+3+4−5−1+3=0-3 - 2 + 1 + 3 + 4 - 5 - 1 + 3 = 0. This con­firms the mean 99 is right. A mean devi­a­tion of 2.752.75 is less than half the range, which is rea­son­able.

Answer

Range =9= 9; mean devi­a­tion about the mean =2.75= 2.75.

Com­mon mis­take to avoid

For­get­ting the absolute value. With­out it the sum is always 00 and tells you noth­ing.

Ques­tion 2: Mean devi­a­tion about the median

The prob­lem

Find the mean devi­a­tion about the median: 36,72,46,42,60,45,53,46,51,4936, 72, 46, 42, 60, 45, 53, 46, 51, 49.

Under­stand­ing the prob­lem

There are n=10n = 10 obser­va­tions, given in no par­tic­u­lar order. The cen­tral value to use is the median, so you must first sort the data.

The idea

For an even num­ber of obser­va­tions, the median is the aver­age of the two mid­dle val­ues (the n2\displaystyle \tfrac{n}{2}th and (n2+1)\displaystyle \left(\tfrac{n}{2} + 1\right)th). Then

MD(M)=1n∑∣xi−M∣.\displaystyle \text{MD}(M) = \frac{1}{n}\sum \lvert x_i - M \rvert.

Step-by-step solu­tion

Step 1. Arrange the data in increas­ing order.

36,  42,  45,  46,  46,  49,  51,  53,  60,  7236, \; 42, \; 45, \; 46, \; 46, \; 49, \; 51, \; 53, \; 60, \; 72

Step 2. With n=10n = 10, the mid­dle val­ues are the 55th and 66th: 4646 and 4949.

M=46+492=47.5\displaystyle M = \frac{46 + 49}{2} = 47.5

Step 3. Find each dis­tance from 47.547.5.

xix_i 3636 4242 4545 4646 4646 4949 5151 5353 6060 7272
∣xi−47.5∣\lvert x_i - 47.5 \rvert 11.511.5 5.55.5 2.52.5 1.51.5 1.51.5 1.51.5 3.53.5 5.55.5 12.512.5 24.524.5

Step 4. Add them. Adding the first five and last five sep­a­rately helps: 11.5+5.5+2.5+1.5+1.5=22.511.5 + 5.5 + 2.5 + 1.5 + 1.5 = 22.5 and 1.5+3.5+5.5+12.5+24.5=47.51.5 + 3.5 + 5.5 + 12.5 + 24.5 = 47.5.

∑∣xi−47.5∣=22.5+47.5=70\displaystyle \sum \lvert x_i - 47.5 \rvert = 22.5 + 47.5 = 70

Step 5. Divide by n=10n = 10.

MD(M)=7010=7\displaystyle \text{MD}(M) = \frac{70}{10} = 7

Check­ing the answer

Because the median has equal num­bers of val­ues on each side, the sum of dis­tances equals (sum of top five) −- (sum of bot­tom five): (49+51+53+60+72)−(36+42+45+46+46)=285−215=70(49 + 51 + 53 + 60 + 72) - (36 + 42 + 45 + 46 + 46) = 285 - 215 = 70. It agrees.

Answer

Mean devi­a­tion about the median =7= 7.

Ques­tion 3: Mean devi­a­tion about the mean for a fre­quency table

The prob­lem

Find the mean devi­a­tion about the mean:

xix_i 1010 3030 5050 7070 9090
fif_i 44 2424 2828 1616 88

Under­stand­ing the prob­lem

Each value xix_i occurs fif_i times. For exam­ple, 3030 occurs 2424 times. The total num­ber of obser­va­tions is N=∑fi\displaystyle N = \sum f_i.

The idea

Use the fre­quency ver­sions of the for­mu­las, as in Exam­ple 3:

xˉ=∑fixiN,MD(xˉ)=1N∑fi∣xi−xˉ∣.\displaystyle \bar x = \frac{\sum f_i x_i}{N}, \qquad \text{MD}(\bar x) = \frac{1}{N}\sum f_i \lvert x_i - \bar x \rvert.

Step-by-step solu­tion

Step 1. Find NN.

N=4+24+28+16+8=80N = 4 + 24 + 28 + 16 + 8 = 80

Step 2. Find ∑fixi\displaystyle \sum f_i x_i.

∑fixi=40+720+1400+1120+720=4000\displaystyle \sum f_i x_i = 40 + 720 + 1400 + 1120 + 720 = 4000

Step 3. Find the mean.

xˉ=400080=50\displaystyle \bar x = \frac{4000}{80} = 50

Step 4. Build the table of dis­tances and weighted dis­tances.

xix_i 1010 3030 5050 7070 9090
fif_i 44 2424 2828 1616 88
∣xi−50∣\lvert x_i - 50 \rvert 4040 2020 00 2020 4040
fi∣xi−50∣f_i\lvert x_i - 50 \rvert 160160 480480 00 320320 320320

Step 5. Add the last row and divide by NN.

∑fi∣xi−50∣=160+480+0+320+320=1280,MD(xˉ)=128080=16\displaystyle \sum f_i \lvert x_i - 50 \rvert = 160 + 480 + 0 + 320 + 320 = 1280, \qquad \text{MD}(\bar x) = \frac{1280}{80} = 16

Check­ing the answer

The weighted devi­a­tions with sign should total 00: below the mean −160−480=−640-160 - 480 = -640; above +320+320=+640+320 + 320 = +640. They bal­ance, so xˉ=50\bar x = 50 is right.

Answer

Mean devi­a­tion about the mean =16= 16.

Com­mon mis­take to avoid

Divid­ing by the num­ber of dis­tinct val­ues (55) instead of N=80N = 80.

Ques­tion 4: Mean devi­a­tion about the median for a fre­quency table

The prob­lem

Find the mean devi­a­tion about the median:

xix_i 55 77 99 1010 1212 1515
fif_i 88 66 22 22 22 66

Under­stand­ing the prob­lem

The val­ues are already in increas­ing order, each with a fre­quency. To find the median you must locate the mid­dle obser­va­tion(s), which needs cumu­la­tive fre­quen­cies.

The idea

Build the cumu­la­tive fre­quency (c.f.) col­umn. If NN is even, the median is the aver­age of the N2\displaystyle \tfrac{N}{2}th and (N2+1)\displaystyle \left(\tfrac{N}{2} + 1\right)th obser­va­tions; the c.f. col­umn tells you which value each falls on. Then use MD(M)=1N∑fi∣xi−M∣\displaystyle \text{MD}(M) = \frac{1}{N}\sum f_i \lvert x_i - M \rvert.

Step-by-step solu­tion

Step 1. Build the cumu­la­tive fre­quen­cies.

xix_i 55 77 99 1010 1212 1515
fif_i 88 66 22 22 22 66
c.f. 88 1414 1616 1818 2020 2626

So N=26N = 26.

Step 2. Locate the mid­dle obser­va­tions. NN is even, so we need the 1313th and 1414th obser­va­tions. The c.f. shows obser­va­tions 11 to 88 are 55, and obser­va­tions 99 to 1414 are 77. So both the 1313th and 1414th are 77.

M=7+72=7\displaystyle M = \frac{7 + 7}{2} = 7

Step 3. Find the dis­tances from 77 and mul­ti­ply by fre­quen­cies.

xix_i 55 77 99 1010 1212 1515
∣xi−7∣\lvert x_i - 7 \rvert 22 00 22 33 55 88
fi∣xi−7∣f_i\lvert x_i - 7 \rvert 1616 00 44 66 1010 4848

Step 4. Add and divide by NN.

∑fi∣xi−7∣=16+0+4+6+10+48=84\displaystyle \sum f_i \lvert x_i - 7 \rvert = 16 + 0 + 4 + 6 + 10 + 48 = 84

MD(M)=8426=4213≈3.23\displaystyle \text{MD}(M) = \frac{84}{26} = \frac{42}{13} \approx 3.23

Check­ing the answer

1313 obser­va­tions lie at or below 77 and 1313 at or above it, so 77 really splits the data in half. For com­par­i­son, the mean here is 99 and the mean devi­a­tion about it works out to 8826≈3.38\displaystyle \tfrac{88}{26} \approx 3.38, which is larger, as Ques­tion 6 pre­dicts.

Answer

Mean devi­a­tion about the median =4213≈3.23\displaystyle = \tfrac{42}{13} \approx 3.23.

Com­mon mis­take to avoid

Tak­ing the median as the mid­dle of the list of dis­tinct val­ues (99 or 1010). The median depends on the fre­quen­cies.

Ques­tion 5: Mean devi­a­tion about the mean for grouped data

The prob­lem

Find the mean devi­a­tion about the mean for:

Class 1010–2020 2020–3030 3030–4040 4040–5050 5050–6060
ff 55 1010 2020 1010 55

Under­stand­ing the prob­lem

The data are grouped into classes of width 1010, so you do not know the exact val­ues. The stan­dard approach is to treat every obser­va­tion in a class as if it were at the class mid­point.

The idea

Replace each class by its mid­point xi=lower+upper2\displaystyle x_i = \tfrac{\text{lower} + \text{upper}}{2} and then pro­ceed exactly as for a dis­crete fre­quency table (Exam­ple 4).

Step-by-step solu­tion

Step 1. Find the mid­points: 10+202=15\displaystyle \tfrac{10 + 20}{2} = 15, and so on.

xi=15,  25,  35,  45,  55x_i = 15, \; 25, \; 35, \; 45, \; 55

Step 2. Find NN and ∑fixi\displaystyle \sum f_i x_i.

N=5+10+20+10+5=50N = 5 + 10 + 20 + 10 + 5 = 50

∑fixi=75+250+700+450+275=1750\displaystyle \sum f_i x_i = 75 + 250 + 700 + 450 + 275 = 1750

Step 3. Find the mean.

xˉ=175050=35\displaystyle \bar x = \frac{1750}{50} = 35

This makes sense: the fre­quen­cies 5,10,20,10,55, 10, 20, 10, 5 are sym­met­ric about the mid­dle class, whose mid­point is 3535.

Step 4. Dis­tances from 3535 and weighted dis­tances.

xix_i 1515 2525 3535 4545 5555
fif_i 55 1010 2020 1010 55
∣xi−35∣\lvert x_i - 35 \rvert 2020 1010 00 1010 2020
fi∣xi−35∣f_i\lvert x_i - 35 \rvert 100100 100100 00 100100 100100

Step 5. Add and divide by NN.

∑fi∣xi−35∣=400,MD(xˉ)=40050=8\displaystyle \sum f_i\lvert x_i - 35 \rvert = 400, \qquad \text{MD}(\bar x) = \frac{400}{50} = 8

Check­ing the answer

The answer is less than the class width of 1010 and most of the data sit in the mid­dle class, so an aver­age dis­tance of 88 is sen­si­ble.

Answer

Mean devi­a­tion about the mean =8= 8.

Ques­tion 6: Why the median gives the smaller mean devi­a­tion

The prob­lem

Why is the mean devi­a­tion about the median never larger than that about the mean?

Under­stand­ing the prob­lem

You must explain a gen­eral fact: for any data set, MD(M)≤MD(xˉ)\text{MD}(M) \le \text{MD}(\bar x). This is a rea­son­ing ques­tion, not a cal­cu­la­tion.

The idea

Think of S(a)=∑∣xi−a∣\displaystyle S(a) = \sum \lvert x_i - a \rvert, the total dis­tance of all obser­va­tions from a point aa. The les­son states that S(a)S(a) is small­est when aa is the median. Since the mean is just one pos­si­ble choice of aa, it can­not beat the median.

Step-by-step solu­tion

Step 1. Define the total dis­tance from any point aa:

S(a)=∑∣xi−a∣\displaystyle S(a) = \sum \lvert x_i - a \rvert

Step 2. See what hap­pens when you move aa. Sup­pose aa is moved a small amount hh to the right, and there are pp obser­va­tions to the left of aa and qq to its right. Each of the pp left obser­va­tions becomes hh far­ther away, and each of the qq right obser­va­tions becomes hh closer. So S(a)S(a) changes by (p−q)h(p - q)h.

Step 3. Con­clude where S(a)S(a) is least. If more obser­va­tions lie on the right (q>pq > p), mov­ing right low­ers SS; if more lie on the left, mov­ing left low­ers SS. SS stops decreas­ing only when the obser­va­tions are bal­anced on each side, and that is exactly the median.

Step 4. Com­pare with the mean. The mean xˉ\bar x is just one value of aa, so

∑∣xi−M∣≤∑∣xi−xˉ∣\displaystyle \sum \lvert x_i - M \rvert \le \sum \lvert x_i - \bar x \rvert

Step 5. Divide both sides by nn (or NN):

MD(M)≤MD(xˉ)\text{MD}(M) \le \text{MD}(\bar x)

Equal­ity holds when the mean and median coin­cide, as in Ques­tion 5.

Check­ing the answer

In Ques­tion 4 the median is 77 with MD ≈3.23\approx 3.23, while the mean is 99 with MD ≈3.38\approx 3.38. The median gives the smaller value, as the argu­ment pre­dicts.

Answer

Because the total dis­tance ∑∣xi−a∣\displaystyle \sum \lvert x_i - a \rvert is least when aa is the median, the mean devi­a­tion about the median is the small­est pos­si­ble, so it can never exceed the mean devi­a­tion about the mean.