Steady State
İST205 / Lecture 2
Lecture 2 · Week 2 · Lind, Marchal & Wathen ch. 2 · about 45 min

Frequency Tables and Graphs

How to summarize data with tables and graphs: frequency and relative frequency tables for qualitative data, bar and pie charts, frequency distributions built with the 2 to the k rule, histograms, frequency polygons, and cumulative distributions.

By the end you can
  • Build frequency and relative frequency tables for qualitative data
  • Read and choose between bar charts and pie charts
  • Construct a frequency distribution: number of classes, class interval, class limits and midpoints
  • Draw and interpret histograms and frequency polygons
  • Use cumulative frequency polygons to estimate values and percentages
  • Avoid the classic exam traps in frequency tables and graphs

Summarizing qualitative data with frequency tables

Descriptive statistics organize data so that the general pattern, the values where data concentrate, and extreme values all become visible. The first tool is the frequency table.

Qualitative variables are nonnumeric labels: dealership location, vehicle type, method of payment. To summarize them, we count how many observations carry each label.

Example (the chapter’s LO2-1). The Applewood Auto Group sold 180 vehicles last month at four dealerships. Counting sales by location gives the frequency table:

LocationFrequency (cars)Relative frequency
Kane5252/180=0.28952/180 = 0.289
Olean4040/180=0.22240/180 = 0.222
Sheffield4545/180=0.25045/180 = 0.250
Tionesta4343/180=0.23943/180 = 0.239
Total1801.000

A relative frequency is a class frequency divided by the total number of observations, f/nf/n. It answers “what fraction of the whole is this class?” Multiply by 100 for the percentage: Kane’s share is 28.9% of all sales.

Relative frequencyFormula sheet →
relative frequency=fn\text{relative frequency} = \frac{f}{n}
ff
class frequency
nn
total number of observations

Use it when you want the share of the total that falls in a class rather than the raw count.

Your turn

In a website usability survey, 58 of 200 users rated the navigation excellent. What is the relative frequency of the Excellent class?

Bar charts and pie charts

The frequency table is the summary; a chart is the picture. For qualitative data there are two standard pictures.

The chapter’s example is a SkiLodges.com usability survey: 200 randomly selected users rated the ease of navigation of a new website as awesome (102), excellent (58), good (30), or poor (10). The rating scale is ordinal — the categories are ranked — but the distance between neighboring ratings is unknown, so we cannot say “good” is twice “poor”.

RatingFrequencyRelative frequencyPercent
Awesome1020.5151%
Excellent580.2929%
Good300.1515%
Poor100.055%
Total2001.00100%
Chart · SkiLodges.com navigation ratingsn = 200
0%20%40%60%51%Awesome29%Excellent15%Good5%Poor
Class
Awesome
Frequency f
102
Relative frequency f/n
0.510
Pie angle (× 360°)
183.6°

Click a bar. 102 of 200 users is a relative frequency of 102/200 = 0.510. The bars have gaps because the classes are categories, not ranges of numbers.

Because a pie slice’s share of the circle is its relative frequency, the central angle of a slice is the relative frequency times 360 degrees:

Pie slice angleFormula sheet →
slice angle=relative frequency×360∘\text{slice angle} = \text{relative frequency} \times 360^\circ
relativefrequencyrelative frequency
class share of the total, as a fraction
360∘360^\circ
the full circle

Use it when you are drawing a pie chart and need the central angle of one class's slice.

Example: Applewood’s 180 vehicle sales by type are sedan 72 (40%), SUV 54 (30%), compact 27 (15%), truck 18 (10%), hybrid 9 (5%). The sedan slice is 0.40×360∘=144∘0.40 \times 360^\circ = 144^\circ, and the hybrid slice is only 0.05×360∘=18∘0.05 \times 360^\circ = 18^\circ.

Chart · Applewood sales by vehicle typen = 180
0%10%20%30%40%40%Sedan30%SUV15%Compact10%Truck5%Hybrid
Class
Sedan
Frequency f
72
Relative frequency f/n
0.400
Pie angle (× 360°)
144.0°

Click a bar. 72 of 180 vehicles is a relative frequency of 72/180 = 0.400. The bars have gaps because the classes are categories, not ranges of numbers.

Check your understanding

A pie chart shows the market share of cola products, and the slice for Pepsi-Cola has a central angle of 90 degrees. What is Pepsi-Cola's market share?

Your turn

A vehicle type accounts for 30% of all vehicle sales. What is the central angle of its slice in a pie chart, in degrees?

Frequency distributions for quantitative data

When the variable is quantitative (profit, age, lead time), the summary is a frequency distribution. The mechanics are similar to a frequency table, but now the classes are intervals of numbers, and building them takes four steps.

The chapter’s running example: Applewood Auto Group earned a profit on each of the 180 vehicles sold. The profits are raw data; scanning the list we can find the minimum (294) and the maximum (3,292) dollars, but patterns are hard to see. The goals of the summary: the typical profit, the extremes, and where profits cluster.

Step 1 — decide the number of classes: the 2 to the k rule

The 2 to the k ruleFormula sheet →
2k>n2^k \gt n
kk
number of classes
nn
number of observations

Use it when you must choose how many classes a frequency distribution should have; pick the smallest k that satisfies the rule.

For Applewood, n=180n = 180. Try k=7k = 7: 27=1282^7 = 128, which is less than 180, so 7 classes are too few. Try k=8k = 8: 28=2562^8 = 256, which is greater than 180. So we use 8 classes.

Step 2 — determine the class interval

Class intervalFormula sheet →
i=Maximum−Minimumki = \frac{\mathrm{Maximum} - \mathrm{Minimum}}{k}
ii
class interval
MaximumMaximum
largest data value
MinimumMinimum
smallest data value
kk
number of classes

Use it when the number of classes is chosen and you need the width of each class.

For Applewood: i=(3292−294)/8=374.75i = (3292 - 294)/8 = 374.75. In practice, round the interval up to a convenient number, usually a multiple of 10 or 100 — here 400. Rounding up matters: rounding down would leave part of the data range uncovered.

Step 3 — set the class limits

Class limits must not overlap, or an observation could fall into two classes. The book’s convention is “up to”: in the classes “1,300 up to 1,400” and “1,400 up to 1,500”, the value 1,400 clearly belongs to the second class.

Because the rounded interval covers a bit more range than needed, the excess is split between the two tails. A useful guide is to start the first class at a convenient lower limit, ideally a multiple of the interval. For Applewood, eight classes of width 400 cover 8×400=3,2008 \times 400 = 3{,}200 while the data range is only 3,292−294=2,9983{,}292 - 294 = 2{,}998; starting at 200 and ending at 3,400 splits the extra 202 dollars between the tails.

Step 4 — tally, and define the midpoint

Tally each observation into its class and count. The number of observations in a class is its class frequency; frequencies must sum to the total number of observations. Each class also gets a class midpoint, the single value that best represents the class.

Class midpointFormula sheet →
midpoint=L+U2\mathrm{midpoint} = \frac{L + U}{2}
LL
lower limit of the class
UU
upper limit of the same class

Use it when you need one typical value to represent a class, for instance to plot a frequency polygon.

Example: the first class runs from 200 up to 600, so its midpoint is (200+600)/2=400(200 + 600)/2 = 400. The class 1,800 up to 2,200 has midpoint (1,800+2,200)/2=2,000(1{,}800 + 2{,}200)/2 = 2{,}000.

Worked example · Building the Applewood profit distribution0/5

Applewood sold 180 vehicles; the profit per vehicle ranges from a minimum of 294 dollars to a maximum of 3,292 dollars. Organize the profits into a frequency distribution.

Profit (dollars)MidpointFrequency
200 up to 6004008
600 up to 1,00080011
1,000 up to 1,4001,20023
1,400 up to 1,8001,60038
1,800 up to 2,2002,00045
2,200 up to 2,6002,40032
2,600 up to 3,0002,80019
3,000 up to 3,4003,2004
Total180
Your turn

A data set has 38 observations. Using the 2 to the k rule, how many classes should the frequency distribution have?

Your turn

A data set contains 45 observations ranging from 0 to 29. What class interval do you recommend?

Check your understanding

A frequency distribution uses the classes 1,300 up to 1,400 and 1,400 up to 1,500. A profit of exactly 1,400 dollars belongs to which class?

Relative frequency distributions

A frequency distribution counts; a relative frequency distribution divides. Each class frequency is divided by nn, the total number of observations, and the relative frequencies sum to 1 (100%). This is what lets you read statements like “12.8% of the vehicles earned a profit between 1,000 and 1,400.”

Cumulative relative frequencyFormula sheet →
cumulative relative frequency=cumulative frequencyn\text{cumulative relative frequency} = \frac{\text{cumulative frequency}}{n}
cumulativefrequencycumulative frequency
number of observations below a class upper limit
nn
total number of observations

Use it when you want the share of observations below a value rather than a single class share.

For Applewood, dividing each frequency by 180 gives:

Profit (dollars)FrequencyRelative frequencyFound by
200 up to 60080.0448/1808/180
600 up to 1,000110.06111/18011/180
1,000 up to 1,400230.12823/18023/180
1,400 up to 1,800380.21138/18038/180
1,800 up to 2,200450.25045/18045/180
2,200 up to 2,600320.17832/18032/180
2,600 up to 3,000190.10619/18019/180
3,000 up to 3,40040.0224/1804/180
Total1801.000

Reading the table: one quarter of the vehicles (0.250) earned between 1,800 and 2,200 — the most common class; about 87% earned between 1,000 and 3,000. A relative frequency histogram would have exactly the same shape as the histogram of counts, only the vertical axis would show percentages instead of vehicles.

The same idea applies to any distribution. Consider the chapter’s electronics-imports example, where 50 suppliers report annual imports:

Imports (millions of dollars)Number of suppliersRelative frequency
2 up to 560.12
5 up to 8130.26
8 up to 11200.40
11 up to 14100.20
14 up to 1710.02
Total501.00
Your turn

In the imports table, 20 of the 50 suppliers imported between 8 and 11 million dollars. What is the relative frequency of that class?

Histograms

Chart · Applewood profit per vehicle8 classes · width 400 · n = 180
01020304050811233845321942006001000140018002200260030003400Profit ($), class limits
Class
1,800 up to 2,200
Midpoint
2,000
Frequency
45
Relative frequency
0.250
Cumulative (less than 2,200)
125

Click a bar. The bars touch because the classes are adjacent ranges of a quantitative variable: there is no gap between 'up to 1,800' and 'from 1,800'.

Reading the histogram gives the same statements as reading the table: profits range from about 200 to 3,400 dollars; the class interval is 400; profits concentrate between 1,000 and 3,000 (157 of 180 vehicles, about 87%); the tallest bar is the 1,800 up to 2,200 class with 45 vehicles and midpoint 2,000 — the typical profit of the most common class. If you plot relative frequencies instead of counts, the shape is identical and only the vertical axis changes to percentages.

Describing the shape of a distribution

Every histogram has a shape, and naming it is a standard exam question. The three benchmark shapes:

Interactive · shape, mean, median and moderight tail
meanmedianmodevalue →
Mean − median
0.17
Pearson sk = 3(x̄ − median)/s
0.52

Positively (right) skewed: the long right tail drags the mean to the right. The median moves less, the mode stays at the peak. Order: mode < median < mean.

Check your understanding

A histogram of household incomes is strongly right-skewed: most households earn modest amounts, with a long tail of very large incomes. What is the relation between the mean and the median?

Frequency polygons

Construction with the Applewood profits: compute each class midpoint, plot the points (400, 8), (800, 11), (1,200, 23), (1,600, 38), (2,000, 45), (2,400, 32), (2,800, 19), (3,200, 4), and connect them. To close the polygon on the axis, anchor at zero frequency with two extra midpoints: one class interval below the lowest midpoint (400−400=0400 - 400 = 0) and one above the highest (3,200+400=3,6003{,}200 + 400 = 3{,}600), giving endpoints (0, 0) and (3,600, 0).

Chart · Applewood profit per vehicle8 classes · width 400 · n = 180
0102030405004008001200160020002400280032003600Profit ($), class midpoints
Class
1,800 up to 2,200
Midpoint
2,000
Frequency
45
Relative frequency
0.250
Cumulative (less than 2,200)
125

Click a point. Each point sits at a class midpoint at the height of the class frequency. The line is closed with zero-frequency points one class below and one class above, so it starts and ends on the axis.

Worked example · Plotting the imports polygon0/4

Fifty suppliers report annual imports in millions of dollars. The distribution: 2 up to 5 (six suppliers), 5 up to 8 (thirteen), 8 up to 11 (twenty), 11 up to 14 (ten), 14 up to 17 (one). Give the coordinates of the frequency polygon.

Your turn

A frequency polygon has a first class of 0 up to 5 days with frequency 6. What is the x-coordinate of its first plotted point, that is, the class midpoint?

Cumulative frequency distributions

A frequency distribution answers “how many observations are in this class?” A cumulative frequency distribution answers a different, very practical question: “how many observations are below this value?” — for example, how many vehicles earned a profit of less than 1,400 dollars.

Profit (dollars)FrequencyCumulative frequencyCumulative relative frequency
Less than 600888/180=0.044=4.4%8/180 = 0.044 = 4.4\%
Less than 1,000111919/180=0.106=10.6%19/180 = 0.106 = 10.6\%
Less than 1,400234242/180=0.233=23.3%42/180 = 0.233 = 23.3\%
Less than 1,800388080/180=0.444=44.4%80/180 = 0.444 = 44.4\%
Less than 2,20045125125/180=0.694=69.4%125/180 = 0.694 = 69.4\%
Less than 2,60032157157/180=0.872=87.2%157/180 = 0.872 = 87.2\%
Less than 3,00019176176/180=0.978=97.8%176/180 = 0.978 = 97.8\%
Less than 3,4004180180/180=1.000=100%180/180 = 1.000 = 100\%

The running totals: 8 vehicles earned less than 600; those 8 plus the 11 in the next class make 19 below 1,000; plus 23 makes 42 below 1,400; and so on until all 180 are below 3,400. Read across the fourth column: 44.4% of the vehicles earned less than 1,800 dollars.

To graph it, plot the upper limit of each class against the cumulative frequency, beginning with a point at zero: (200, 0), (600, 8), (1,000, 19), (1,400, 42), (1,800, 80), (2,200, 125), (2,600, 157), (3,000, 176), (3,400, 180). Connect the points to get the cumulative frequency polygon. The line always rises from left to right (nothing is below the minimum), and the right-hand axis can carry the percentage scale instead of the count scale.

Chart · Applewood profit per vehicle8 classes · width 400 · n = 180
0501001500%25%50%75%100%2,3252006001000140018002200260030003400Profit ($), class limits
75% of 180
135.0
Class holding it
2,200–2,600
Reading
≈ 2,325

About 75% of the vehicles are below 2,325. Go across from 75% on the right axis to the curve, then down. By straight-line interpolation: 2,200 + (135.0 − 125) / 32 × 400 = 2,325.

Worked example · Reading the cumulative polygon0/5

Using the Applewood cumulative distribution with n = 180, find the profit level below which 75% of the vehicles fall.

Two more readings from the same graph: 60 vehicles correspond to about 1,600 dollars, and a profit level of 2,000 dollars corresponds to roughly 80+0.5×45=102.580 + 0.5 \times 45 = 102.5 vehicles, that is about 57% of the total — close to the chapter’s “about 56%”.

Your turn

From the Applewood cumulative table, what percentage of the 180 vehicles earned less than 1,000 dollars? (cumulative frequency 19)

Choosing the right table or graph

Question to answerVariableTool
Summarize the classes and their countsqualitativefrequency table
Compare shares of a wholequalitativepie chart
Compare counts across classesqualitativebar chart
Summarize numeric data in intervalsquantitativefrequency distribution
See shape, highs and lows at a glancequantitativehistogram
Compare two distributionsquantitativefrequency polygon
“How many below a value?”quantitativecumulative frequency polygon
Check your understanding

You want to compare the number of vehicles sold at four dealerships. Which graph is the best choice?

Exam practice

Exam question 1

A data set consists of 145 observations ranging from 56 to 490. What class interval do you recommend?

Exam question 2

Which statement about frequency distributions and their graphs is correct?

Exam question 3

In the Applewood distribution, 80 of the 180 vehicles had a profit below 1,800 dollars. What percentage of the vehicles earned less than 1,800 dollars?

Exam question 4

A survey asks 1,000 graduates how they found their job. Networking and connections account for 70% of the answers. How many graduates found their job through networking and connections?

Exam question 5

On the Applewood cumulative frequency polygon, the 75% mark on the right-hand axis corresponds to about 2,300 dollars on the horizontal axis. What does this mean?

Summary and review

Review deck · 18 cards0/18 mastered