Skip to content
BI & Data ScienceCharts, maps and dashboards

Formulas for this chapter

Relative frequency

relative frequency = count in category / n Excel: =COUNTIF(range, category) / COUNTA(range)

Turning a raw categorical column into a distribution that can be charted. The relative frequencies must sum to 1.

count in category
Number of observations with that value
n
Total number of observations, not the number of categories

Row and column percentage in a cross-tab

row % = cell / row total column % = cell / column total

Reading a cross-tabulation. Decide first which conditional question you are asking; the two percentages answer different questions and rarely agree.

cell
Count in one row-column combination
row total, column total
Margin totals of the cross-tab

Equal-interval class width for a choropleth

class width = (max - min) / number of classes

Choosing shading bands for a map. Compare against quantile bands before publishing: the same data looks calm or alarming depending on the choice.

max, min
Largest and smallest values in the variable
number of classes
How many shading bands the legend will have
Step 5 of 23
Quick checkTheory

A manager needs to quote each month's exact average AQI in a board note. Table or chart?