Representing a Categorical Variable with Tables · 用表格表示分类变量
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| frequency table/ˈfriːkwənsi ˈteɪbl/ | 频数表 | pín shuò biǎo |
| relative frequencies/ˈrelətɪv ˈfriːkwənsiz/ | 相对频数 | xiāng duì pín shuò |
| two-way table/tuː weɪ ˈteɪbl/ | 双向表 | shuāng xiàng biǎo |
| joint frequency/dʒɔɪnt ˈfriːkwənsi/ | 联合频数 | lián hé pín shuò |
| marginal/ˈmɑːdʒɪnl/ | 边际频数 | biān jì pín shuò |
Counting categories
- The simplest way to summarize a categorical variable is to count how many fall in each group.
- A frequency table 频数表 lists each category with its count (frequency).
- It turns a long list of labels into a compact, readable summary.
- From counts, you can compute proportions and compare groups.
给类别计数
- 汇总分类变量最简单的方式是数每个组里有多少。
- 频数表列出每个类别及其计数(频数)。
- 它把一长串标签变成紧凑、易读的汇总。
- 由计数,你能算出比例并比较各组。
Relative frequencies
- Raw counts don't show share of the whole — for that, use relative frequencies 相对频数.
- Divide each count by the total to get a proportion (or ×100 for a percentage).
- $30$ out of $120$ students prefer maths → relative frequency $\tfrac{30}{120}=0.25=25\%$.
- Relative frequencies let you compare data sets of different sizes fairly.
相对频数
- 原始计数不显示占整体的份额——为此用相对频数。
- 把每个计数除以总数得到比例(或 ×100 得百分比)。
- $120$ 名学生中有 $30$ 名偏好数学 → 相对频数 $\tfrac{30}{120}=0.25=25\%$。
- 相对频数让你公平地比较不同大小的数据集。
Shares of the whole · 整体的份额
Relative frequencies are each category's share of the total — exactly what a pie chart of the frequency table shows. · 相对频率是每个类别占总数的份额——这正是频率表饼图所展示的内容。
Of $120$ students, $30$ prefer maths. What is the relative frequency (as a decimal)? · 在$120$名学生中,$30$名喜欢数学。相对频率(小数形式)是多少?
$30/120=0.25$.
Of $120$ students, $40$ prefer arts. What percent is that (to the nearest whole)? · 在$120$名学生中,$40$名喜欢艺术。百分比是多少(四舍五入到整数)?
$40/120\approx33\%$.
Relative frequencies let you fairly compare groups of different sizes. · 相对频率使您可以公平地比较不同大小的群体。
Proportions remove the effect of group size. · 比例消除了群体大小的影响。
Two-way tables
- To show two categorical variables at once, use a two-way table 双向表 (contingency table).
- Rows are one variable's categories, columns the other's; each cell is a joint frequency 联合频数 (count in both).
- Example: rows = grade level, columns = favorite subject; each cell counts students in that combination.
- It reveals how the two variables relate.
双向表
- 要同时展示两个分类变量,用双向表(列联表)。
- 行是一个变量的类别,列是另一个的;每个单元格是一个联合频数(同时落在两者中的计数)。
- 例:行 = 年级,列 = 最喜欢的科目;每个单元格数出该组合的学生数。
- 它揭示两个变量如何相关。
A two-way table is used to display... · 双向表用于展示……
It cross-tabulates two categorical variables. · 它将两个分类变量进行交叉制表。
Marginal vs. joint frequencies
- Joint frequency: a single inner cell — individuals in both categories.
- Marginal frequency 边际频数: a row or column total — the count for one variable, found in the margins.
- The margins recover each variable's own distribution; the inner cells show the combinations.
- Reading which is which is a common exam skill.
边际 vs 联合频数
- 联合频数:单个内部单元格——同时在两个类别里的个体。
- 边际频数:一行或一列的总计——一个变量的计数,在边缘处找到。
- 边缘还原每个变量自己的分布;内部单元格显示组合。
- 读出哪个是哪个是常见的考试技能。
In a two-way table, a single inner cell count (both categories at once) is a... · 在双向表中,单个内部单元格计数(同时包含两个类别)是……
Inner cell = joint frequency. · 内部单元格 = 联合频率。
A row or column total · 总 in a two-way table is a ____ frequency. · 双向表中的行或列总计是____频率。
Marginal = the total for one variable. · 边缘频率 = 某一变量的总计。
Keep marginal and joint frequencies distinct: a joint frequency is one inner cell (both categories at once), while a marginal frequency is a row/column total (one variable only). And relative frequencies are counts ÷ total — decide whether "the total" is the grand total, a row total, or a column total, because each gives a different proportion.
把边际与联合频数分清:联合频数是一个内部单元格(同时在两个类别),而边际频数是一行/列的总计(仅一个变量)。而相对频数是计数 ÷ 总数——要决定"那个总数"是总计、行总计还是列总计,因为各给出不同比例。
$120$ students: $30$ prefer maths, $50$ science, $40$ arts.
- Frequency table: maths $30$, science $50$, arts $40$.
- Relative frequencies: $25\%$, $\approx41.7\%$, $\approx33.3\%$ (each count ÷ $120$).
- If also split by grade, a two-way table's cell "Grade 11 ∩ science" would be a joint frequency.
$120$ 名学生:$30$ 偏好数学,$50$ 科学,$40$ 艺术。
- 频数表: 数学 $30$、科学 $50$、艺术 $40$。
- 相对频数: $25\%$、$\approx41.7\%$、$\approx33.3\%$(各计数 ÷ $120$)。
- 若再按年级分,双向表的单元格"11 年级 ∩ 科学"就是一个联合频数。
Summarize a categorical variable with a frequency table of counts, then compute relative frequencies (count ÷ total) as proportions/percentages. A two-way table shows two categorical variables: inner cells are joint frequencies, and row/column totals are marginal frequencies.
用计数的频数表汇总分类变量,再算相对频数(计数 ÷ 总数)作为比例/百分比。双向表展示两个分类变量:内部单元格是联合频数,行/列总计是边际频数。