Representing a Categorical Variable with Graphs · 用图表表示分类变量
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| bar chart/bɑː tʃɑːt/ | 条形图 | tiáo xíng tú |
| pie chart/paɪ tʃɑːt/ | 饼图 | bǐng tú |
| association/əˌsəʊsɪˈeɪʃn/ | 关联 | guān lián |
Picturing categories
- A table of counts is fine, but a picture makes patterns jump out.
- For a categorical variable, the two workhorses are the bar chart 条形图 and the pie chart 饼图.
- Both show how individuals split across categories — bar charts by height, pie charts by slice.
- Choosing and reading them correctly is a core skill.
把类别画出来
- 一张计数表不错,但图能让规律跳出来。
- 对分类变量,两大主力是条形图和饼图。
- 两者都显示个体如何在各类别间划分——条形图看高度,饼图看扇区。
- 正确选择和阅读它们是核心技能。
Bar charts
- A bar chart draws one bar per category, its height the frequency or relative frequency.
- Bars are separated (categories are distinct groups, not a continuous scale).
- The tallest bar is the most common category; comparing heights compares groups.
- Bars can be ordered any way — often tallest-to-shortest for clarity.
条形图
- 条形图为每个类别画一根条,其高度是频数或相对频数。
- 条之间分开(类别是不同的组,而非连续刻度)。
- 最高的条是最常见的类别;比较高度就是比较组。
- 条可以任意排序——为清晰常从高到低。
In a bar chart, the height of each bar represents... · 在条形图中,每个条形的高度代表……
Bar height = count (or proportion) in that category. · 条形高度 = 该类别的数量(或比例)。
Bar chart bars are separated, unlike a histogram's touching bars. · 条形图的条形是分开的,不像直方图的条形是相连的。
Categorical bars are separated; quantitative histogram bars touch. · 分类变量的条形是分开的;定量变量的直方图条形是相连的。
In a bar chart, the most common category is the one with the... · 在条形图中,最常见的类别是……
Tallest bar = highest frequency. · 最高条形 = 最高频率。
Pie charts
- A pie chart shows each category as a slice of the whole circle.
- Slice size = that category's share (relative frequency) of the total.
- It's best when you care about parts of a whole and there are only a few categories.
- All slices add to $100\%$ — a pie always represents one complete group.
饼图
- 饼图把每个类别显示为整圆的一块扇区。
- 扇区大小 = 该类别占总数的份额(相对频数)。
- 当你关心整体的部分且类别不多时最好用它。
- 所有扇区加起来是 $100\%$——饼图总代表一个完整的组。
Categories as slices · 类别作为切片
A pie chart shows each category as a share of the whole — all slices sum to 100%. · 饼图将每个类别显示为整体的一部分——所有切片总和为100%。
All the slices of a pie chart add up to ____ percent. · 饼图的所有切片加起来等于____百分比。
A pie represents one complete whole. · 饼图代表一个完整的整体。
Comparing two categorical variables
- To compare a categorical variable across groups, use a side-by-side or segmented (stacked) bar chart.
- Side-by-side puts groups' bars next to each other; segmented stacks the categories within one bar per group.
- Look for an association 关联: do the category proportions differ between groups?
- If the proportions look the same across groups, there's little association.
比较两个分类变量
- 要跨组比较一个分类变量,用并列或分段(堆叠)条形图。
- 并列把各组的条并排放;分段把类别堆叠在每组一根条内。
- 寻找关联:类别比例在各组之间不同吗?
- 若各组比例看起来相同,关联就很弱。
To judge an association between two categorical variables, compare... · 要判断两个分类变量之间的关联,请比较……
Different group sizes make counts misleading; compare proportions. · 不同的群体大小会使计数产生误导;应比较比例。
Which charts display two categorical variables together? · 哪些图表展示了两个分类变量在一起?
Side-by-side and segmented bars show two categorical variables. · 并排和分段条形图可展示两个分类变量。
Bar charts are for categorical data — their bars are separated, unlike a histogram's touching bars for quantitative data. Don't confuse the two. And to judge association between two categorical variables, compare proportions (relative frequencies) across groups, not raw counts — different group sizes make counts misleading.
条形图用于分类数据——它的条是分开的,不同于直方图为数量数据画的相接的条。别把两者搞混。而要判断两个分类变量间的关联,跨组比较比例(相对频数),而非原始计数——不同组大小会让计数误导人。
$120$ students: maths $30$, science $50$, arts $40$.
- Bar chart: three separated bars of heights $30$, $50$, $40$ — science is tallest.
- Pie chart: slices of $25\%$, $\approx42\%$, $\approx33\%$ of the circle.
- Split by grade with a segmented bar chart, differing slice proportions would suggest an association with grade.
$120$ 名学生:数学 $30$、科学 $50$、艺术 $40$。
- 条形图: 三根分开的条,高度 $30$、$50$、$40$——科学最高。
- 饼图: 圆的 $25\%$、$\approx42\%$、$\approx33\%$ 的扇区。
- 用分段条形图按年级分,不同的扇区比例会暗示与年级有关联。
Display a categorical variable with a bar chart (separated bars, height = frequency or relative frequency) or a pie chart (slices = share of the whole). For two categorical variables, use side-by-side or segmented bar charts, and compare proportions across groups to spot an association.
用条形图(分开的条,高度 = 频数或相对频数)或饼图(扇区 = 占整体的份额)展示分类变量。对两个分类变量,用并列或分段条形图,并跨组比较比例以发现关联。