📚 AS Eduqas Statistics: Case Study Practical Drills | AS Eduqas 统计:案例分析实战演练
This article takes you through a full, exam-style case study that weaves together the key topics of the AS Eduqas Statistics specification. You will work with a realistic data set from a coffee shop, applying descriptive statistics, probability, discrete random variables, binomial and normal distributions, and hypothesis testing. Each section presents a practical task, followed by detailed bilingual commentary so you can sharpen both your statistical reasoning and your bilingual fluency.
本文带你从头到尾完成一个完整的考试风格案例分析,它融合了 AS Eduqas 统计课程的所有核心主题。你将使用一组来自咖啡店的真实数据,练习描述性统计、概率、离散型随机变量、二项分布与正态分布以及假设检验。每一节都提出一个实操任务,并配有详细的中英双语解析,帮助你在提升统计推理能力的同时强化双语表达。
1. Introducing the BrewStats Case Study Data | 介绍 BrewStats 案例数据
BrewStats is a small chain of specialist coffee shops. As part of a quality review, the manager collects data from a random sample of 50 customers during a weekday morning. The variables recorded are: spend per visit (£, to the nearest 0.10), drink temperature (°C), satisfaction (yes/no), sex (F/M), and cup size (Small, Medium, Large). The raw data are presented in a table at the end of this section. Before any analysis, you must clean the data and classify the variables.
BrewStats 是一家小型精品咖啡连锁店。作为质量审查的一部分,经理在一个工作日早晨从随机抽取的 50 名顾客中收集了数据。记录的变量包括:每次消费金额(英镑,精确到 0.10)、饮品温度(°C)、满意度(是/否)、性别(女/男)以及杯型(小、中、大)。原始数据列在本节末尾的表格中。在进行分析之前,你需要先清理数据并对变量进行分类。
The variable types are: spend (continuous numerical), temperature (continuous numerical), satisfaction (categorical, binary), sex (categorical, binary), and cup size (categorical, ordinal). All entries are complete, so no missing data treatment is needed. For categorical variables, we will later group data appropriately. Spend values are rounded to one decimal place, and temperature values are recorded as integers.
变量类型如下:消费金额(连续数值型)、温度(连续数值型)、满意度(分类、二值)、性别(分类、二值)、杯型(分类、有序)。所有记录完整,因此无需处理缺失数据。对分类变量后续我们会进行适当的分组。消费金额四舍五入到一位小数,温度记录为整数。
Exam tip: Always start a case study by identifying variable types and checking for impossible or outlying values. For example, a temperature of 100°C would be suspicious for a served drink and should be verified or corrected.
备考提示:开始案例分析时一定要先确定变量类型,并检查是否存在不可能或异常值。例如,饮品温度若为 100°C 就值得怀疑,应加以核实或修正。
Extract of the data set (first 10 rows shown out of 50):
数据集摘录(展示前 10 行,共 50 行):
| Customer | Spend (£) | Temp (°C) | Satisfied | Sex | Cup Size |
|---|---|---|---|---|---|
| 1 | 4.5 | 64 | Yes | F | Medium |
| 2 | 3.8 | 60 | No | M | Small |
| 3 | 5.2 | 68 | Yes | F | Large |
| 4 | 4.0 | 65 | Yes | M | Medium |
| 5 | 4.9 | 70 | Yes | F | Medium |
| 6 | 6.1 | 62 | No | M | Large |
| 7 | 3.2 | 63 | No | F | Small |
| 8 | 4.7 | 66 | Yes | M | Medium |
| 9 | 3.9 | 59 | No | F | Small |
| 10 | 5.5 | 67 | Yes | F | Large |
The full 50-row dataset will be referenced throughout the case study. All numerical summaries used below have been computed from the complete data.
整个案例分析过程将引用完整的 50 行数据集。下文所有数值汇总均基于完整数据计算得出。
2. Visualising Categorical Data: Bar Charts and Two‑way Tables | 分类数据的可视化:条形图与双向表
We begin with the three categorical variables: satisfaction, sex and cup size. A bar chart is an appropriate graph to display the frequency of each category. You should ensure that axes are clearly labelled and that bars are of equal width.
我们从三个分类变量入手:满意度、性别和杯型。条形图是展示各类别频数的合适图形。你需要确保坐标轴标注清晰,条形等宽。
From the full data: 32 customers were satisfied and 18 were not satisfied. The frequency bar chart for satisfaction shows a clear majority of positive responses. For cup size, the frequencies are: Small 12, Medium 20, Large 18. Bar charts reveal that Medium is the most popular size, followed closely by Large.
根据完整数据:32 名顾客满意,18 名不满意。满意度频数条形图显示肯定回答明显占多数。杯型频数为:小杯 12 杯,中杯 20 杯,大杯 18 杯。条形图表明中杯最受欢迎,大杯紧随其后。
Constructing a two‑way table between sex and satisfaction helps examine association. The table below shows observed frequencies.
构建性别与满意度之间的双向表有助于检查关联性。下表展示观测频数。
| Sex \ Satisfied | Yes | No | Total |
|---|---|---|---|
| Female | 18 | 7 | 25 |
| Male | 14 | 11 | 25 |
| Total | 32 | 18 | 50 |
The proportion of satisfied female customers is 18/25 = 0.72, while for males it is 14/25 = 0.56. Although there appears to be a difference, later hypothesis testing can determine if it is statistically significant.
女性顾客的满意比例为 18/25 = 0.72,而男性为 14/25 = 0.56。尽管看似存在差异,后续的假设检验可以判断这一差异是否具有统计显著性。
3. Numerical Measures of Central Tendency | 数值数据的集中趋势度量
For the continuous variable spend (£), we calculate measures of central tendency using the full sample of n=50. The mean spend is given by:
对于连续变量消费金额(英镑),我们用全部 50 个样本计算集中趋势度量。平均消费金额为:
Mean x̄ = Σxᵢ / n = 223.5 / 50 = 4.47
The median is the average of the 25th and 26th ordered values. After sorting the spend data, these values are 4.4 and 4.5, so the median is 4.45. The mode is the most frequent value; in this data set, the value 4.5 occurs 6 times, making it the mode.
中位数是第 25 和第 26 个排序值的平均。将消费数据排序后,这两个值为 4.4 和 4.5,因此中位数为 4.45。众数是出现次数最多的值;本数据集中 4.5 出现了 6 次,为众数。
With mean ≈ median ≈ mode, the distribution of spend appears roughly symmetric. For temperature, the mean is 65.0°C and the median is 65°C, again suggesting symmetry.
由于均值 ≈ 中位数 ≈ 众数,消费金额的分布大致对称。温度方面,均值为 65.0°C,中位数为 65°C,同样表明对称性。
Exam tip: Always report the appropriate measure depending on the shape of the data. For skewed data, the median is preferred.
备考提示:根据数据形态选择合适的度量指标。对于偏态分布,宜采用中位数。
4. Measures of Dispersion: Range, IQR and Standard Deviation | 离散程度度量:全距、四分位距与标准差
Dispersion tells us how spread out the data are. For spend, the minimum is 2.50 and the maximum is 6.80, so the range is 6.80 – 2.50 = 4.30. The interquartile range (IQR) is found from the first and third quartiles. The quartiles from the ordered spend data are Q₁ = 3.80 and Q₃ = 5.20, giving IQR = 5.20 – 3.80 = 1.40.
离散程度告诉我们数据分布有多广。消费金额的最小值为 2.50,最大值为 6.80,因此全距为 6.80 – 2.50 = 4.30。四分位距(IQR)由第一和第三四分位数求得。排序后的消费数据中,Q₁ = 3.80,Q₃ = 5.20,因此 IQR = 5.20 – 3.80 = 1.40。
The standard deviation is more informative because it uses all data values. Using the formula for sample standard deviation:
标准差涵盖所有数据值,因此信息量更大。使用样本标准差公式:
s = √[ Σ(xᵢ – x̄)² / (n – 1) ]
For spend, Σ(xᵢ – 4.47)² = 31.36, so s = √(31.36 / 49) = √0.640 = 0.80 (2 d.p.). Thus, the typical deviation from the mean spend is about £0.80.
对消费金额而言,Σ(xᵢ – 4.47)² = 31.36,因此 s = √(31.36 / 49) = √0.640 = 0.80(保留两位小数)。因此,消费金额与均值的典型偏差大约为 0.80 英镑。
For temperature, the sample standard deviation is 5.1°C. Comparing the coefficient of variation (CV = s / x̄ × 100%), spend CV = 0.80/4.47 × 100% ≈ 17.9%, while temperature CV = 5.1/65 × 100% ≈ 7.8%, showing temperature is less variable relative to its mean.
温度的样本标准差为 5.1°C。比较变异系数(CV = s / x̄ × 100%),消费金额的 CV = 0.80/4.47 × 100% ≈ 17.9%,而温度的 CV = 5.1/65 × 100% ≈ 7.8%,这表明温度相对于其均值的变异更小。
5. Box Plot Construction and Outlier Detection | 箱线图构建与异常值检测
A box plot provides a visual five‑number summary of a data set. For spend, the five‑number summary is: Min = 2.50, Q₁ = 3.80, Median = 4.45, Q₃ = 5.20, Max = 6.80. The IQR = 1.40. Fences for outliers are calculated as:
箱线图提供了数据集的五数概括可视化。消费金额的五数概括为:最小值 = 2.50,Q₁ = 3.80,中位数 = 4.45,Q₃ = 5.20,最大值 = 6.80。IQR = 1.40。用于检验异常值的边界计算如下:
Lower fence = Q₁ – 1.5 × IQR = 3.80 – 1.5 × 1.40 = 1.70
Upper fence = Q₃ + 1.5 × IQR = 5.20 + 1.5 × 1.40 = 7.30
Since all spend values lie between the fences, there are no outliers. The box plot for spend is roughly symmetric, with the median slightly closer to Q₃ than to Q₁, indicating very mild left‑skewness.
由于所有消费金额都在边界内,因此没有异常值。消费金额的箱线图大致对称,中位数略靠近 Q₃ 而非 Q₁,表明极其轻微的左偏。
For temperature, the five‑number summary is: Min = 55, Q₁ = 61, Median = 65, Q₃ = 69, Max = 75. IQR = 8. The fences are 61 – 12 = 49 and 69 + 12 = 81, so again no outliers. The box plot reveals a symmetric distribution. Always draw box plots to scale and label the axis clearly.
温度的五数概括为:最小值 = 55,Q₁ = 61,中位数 = 65,Q₃ = 69,最大值 = 75。IQR = 8。边界为 61 – 12 = 49 与 69 + 12 = 81,因此同样无异常值。箱线图显示出对称分布。务必按比例绘制箱线图并清晰标注坐标轴。
6. Probability Foundations: Single Events and Combinations | 概率基础:单一事件与组合概率
Probability questions often appear embedded within case studies. Here, we define events using the data. Let S be the event that a randomly chosen customer is satisfied. P(S) = 32/50 = 0.64. Let M be the event that the customer is male: P(M) = 25/50 = 0.5. The event S ∩ M (satisfied and male) has frequency 14, so P(S ∩ M) = 14/50 = 0.28.
概率问题经常嵌入在案例分析之中。这里我们借助数据定义事件。设事件 S 为随机抽取的一名顾客满意。P(S) = 32/50 = 0.64。设事件 M 为顾客为男性:P(M) = 25/50 = 0.5。事件 S ∩ M(既满意又为男性)的频数为 14,故 P(S ∩ M) = 14/50 = 0.28。
Using the addition rule: P(S ∪ M) = P(S) + P(M) – P(S ∩ M) = 0.64 + 0.5 – 0.28 = 0.86. This is the probability that a randomly chosen customer is either satisfied or male (or both).
运用加法法则:P(S ∪ M) = P(S) + P(M) – P(S ∩ M) = 0.64 + 0.5 – 0.28 = 0.86。这是随机抽取一名顾客其满意或为男性(或两者兼有)的概率。
Conditional probability: P(S | M) = P(S ∩ M) / P(M) = 0.28 / 0.5 = 0.56. Compared with the unconditional P(S) = 0.64, this suggests satisfaction is somewhat lower among males. However, with a small sample we cannot be certain; a hypothesis test is needed.
条件概率:P(S | M) = P(S ∩ M) / P(M) = 0.28 / 0.5 = 0.56。与无条件概率 P(S) = 0.64 相比,这表明男性的满意度略低。但样本量较小,尚无法确定,需要假设检验。
For independent events we would require P(S | M) = P(S). Since 0.56 ≠ 0.64, satisfaction and sex appear not to be perfectly independent, but are they significantly dependent? We will test this later.
对于独立事件,要求 P(S | M) = P(S)。由于 0.56 ≠ 0.64,满意度与性别似乎并非完全独立,但它们是否显著相关?稍后将进行检验。
7. Discrete Random Variable: Cup Size Price Model | 离散型随机变量:杯型价格模型
We can model cup size as a discrete random variable X that represents the price (£) associated with each size: Small = 2.80, Medium = 3.50, Large = 4.20. From the sample, the probability distribution is estimated by relative frequencies.
我们可以将杯型建模为一个离散型随机变量 X,表示各杯型对应的价格(英镑):小杯 = 2.80,中杯 = 3.50,大杯 = 4.20。根据样本,概率分布用相对频数估计。
| x (£) | 2.80 | 3.50 | 4.20 |
|---|---|---|---|
| P(X = x) | 0.24 | 0.40 | 0.36 |
The expected value is E(X) = Σ x・P(X = x) = 2.80×0.24 + 3.50×0.40 + 4.20×0.36 = 0.672 + 1.400 + 1.512 = 3.584. So the average cup price is approximately £3.58. The variance is Var(X) = E(X²) – [E(X)]². First, E(X²) = 2.80²×0.24 + 3.50²×0.40 + 4.20²×0.36 = 1.8816 + 4.9000 + 6.3504 = 13.132. Therefore Var(X) = 13.132 – (3.584)² = 13.132 – 12.845 = 0.287. The standard deviation is √0.287 ≈ 0.536.
期望值为 E(X) = Σ x・P(X = x) = 2.80×0.24 + 3.50×0.40 + 4.20×0.36 = 0.672 + 1.400 + 1.512 = 3.584。因此平均杯价约为 3.58 英镑。方差为 Var(X) = E(X²) – [E(X)]²。首先,E(X²) = 2.80²×0.24 + 3.50²×0.40 + 4.20²×0.36 = 1.8816 + 4.9000 + 6.3504 = 13.132。故 Var(X) = 13.132 – (3.584)² = 13.132 – 12.845 = 0.287。标准差为 √0.287 ≈ 0.536。
8. Binomial Distribution: Modelling the Number of Satisfied Customers | 二项分布:建模满意顾客人数
A binomial random variable Y counts the number of successes in a fixed number of independent trials with constant probability of success p. In our sample, we treat the 50 observations as trials, and define a satisfied customer as a success. However, the sample itself gives p̂ = 0.64. For future samples of size n, we can use the binomial model with n trials and p = 0.64, provided the assumptions hold: fixed number of trials, two outcomes, constant probability, independent trials.
二项随机变量 Y 统计在固定次数、成功概率恒为 p 的独立试验中成功的次数。在我们的样本中,我们将 50 次观测视为试验,满意顾客定义为成功。但样本本身给出 p̂ = 0.64。对未来抽取的样本量为 n 的样本,若满足固定试验次数、两种结果、概率恒定、试验独立等假设,我们可使用参数为 n 与 p = 0.64 的二项模型。
Suppose the manager takes a new random sample of 10 customers. Let Y ~ B(10, 0.64). The probability of exactly 7 satisfied customers is:
假设经理重新随机抽取 10 名顾客。令 Y ~ B(10, 0.64)。恰好有 7 名顾客满意的概率为:
P(Y = 7) = ₁₀C₇ × (0.64)⁷ × (0.36)³
Using the binomial coefficient ₁₀C₇ = 120, compute (0.64)⁷ × (0.36)³ ≈ 0.0442 × 0.046656 ≈ 0.00206, so P(Y = 7) ≈ 120 × 0.00206 ≈ 0.247. Meaning there is about a 24.7% chance of observing exactly 7 satisfied customers in a sample of 10 under the assumed probability 0.64.
利用二项式系数 ₁₀C₇ = 120,计算 (0.64)⁷ × (0.36)³ ≈ 0.0442 × 0.046656 ≈ 0.00206,故 P(Y = 7) ≈ 120 × 0.00206 ≈ 0.247。这意味着在成功概率为 0.64 的假设下,10 名顾客中恰好有 7 名满意的可能性约为 24.7%。
Similarly, cumulative probabilities such as P(Y ≥ 8) can be found using tables or a calculator: P(Y ≥ 8) = P(Y=8) + P(Y=9) + P(Y=10). After calculation, P(Y ≥ 8) ≈ 0.263 + 0.115 + 0.021 = 0.399. These binomial probabilities are essential for hypothesis testing.
类似地,通过查表或计算器可求累积概率,如 P(Y ≥ 8) = P(Y=8) + P(Y=9) + P(Y=10)。计算得 P(Y ≥ 8) ≈ 0.263 + 0.115 + 0.021 = 0.399。这些二项概率对假设检验至关重要。
9. Normal Distribution: Spend per Visit | 正态分布:单次消费金额
The histogram of the 50 spend values suggests an approximately normal shape. Using the sample mean x̄ = 4.47 and sample standard deviation s = 0.80 as estimates of μ and σ, we can model the spend X as X ~ N(4.47, 0.80²). This allows us to answer probability questions about a randomly selected customer.
50 个消费金额的直方图表明近似正态形态。用样本均值 x̄ = 4.47 与样本标准差 s = 0.80 作为 μ 与 σ 的估计,我们可以将消费金额 X 建模为 X ~ N(4.47, 0.80²)。这使我们能够回答关于随机抽取顾客的概率问题。
What proportion of customers spend more than £5.00? Standardise: Z = (X – μ) / σ = (5.00 – 4.47) / 0.80 = 0.6625. Using normal distribution tables, P(Z > 0.66) ≈ 1 – 0.745
Published by TutorHao | AS 统计 Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply