📚 Case Study in Statistics: Practical Walkthrough | 统计案例分析实战演练
This case study applies the SQA Higher Statistics toolkit to a real-world business scenario. You will see how descriptive statistics, inference, and correlation analysis come together to answer meaningful questions about a chain of coffee shops. The step-by-step walkthrough mirrors the project-based approach expected in your exam and coursework.
本案例分析将 SQA Higher Statistics 工具包应用于真实商业场景。您将看到描述统计、推断分析和相关分析如何协同回答关于一家咖啡连锁店的有意义问题。分步演练呼应了考试与课程作业中要求的项目式方法。
1. Introduction to the Case Study | 案例分析简介
Brew & Bean, a popular coffee chain, wants to determine whether the average takeaway order spend exceeds £15 and whether there is a linear relationship between spend and customer satisfaction rating. A random sample of 25 takeaway orders was taken, recording the amount spent (in £) and the customer rating (on a 1–5 scale). This dataset forms the basis for a complete statistical investigation.
热门咖啡连锁店 Brew & Bean 希望确定外卖订单平均消费是否超过 £15,以及消费金额与顾客满意度评分之间是否存在线性关系。随机抽取了 25 份外卖订单,记录了消费金额(英镑)与顾客评分(1–5 分)。该数据集构成一项完整统计调查的基础。
2. Data Collection & Cleaning | 数据收集与清理
The dataset contains 25 records with two variables: Spend (continuous, £) and Rating (discrete, 1–5). Before analysis, we examine the data for missing values and invalid entries. All 25 orders are complete: Spend ranges from £10.20 to £22.50, and all Ratings fall within the permissible scale. No extreme outliers or data-entry errors are found, so the sample is clean and ready for analysis.
数据集包含 25 条记录,两个变量:Spend(连续型,£)与 Rating(离散型,1–5)。分析之前,检查缺失值与无效录入。全部 25 个订单完整:Spend 范围为 £10.20 至 £22.50,所有 Rating 均在有效尺度内。未发现极端异常值或录入错误,样本干净,可进行分析。
3. Exploring the Data: Descriptive Statistics | 数据探索:描述统计
The sample mean spend is x̄ = £16.48 with a sample standard deviation s = £3.12. The five-number summary for Spend is: minimum £10.20, first quartile £14.10, median £16.40, third quartile £18.90, and maximum £22.50. For Rating, the mean is 3.8 with s = 0.9. The table below summarises these key figures.
样本平均消费为 x̄ = £16.48,样本标准差 s = £3.12。Spend 的五数概括为:最小值 £10.20,第一四分位数 £14.10,中位数 £16.40,第三四分位数 £18.90,最大值 £22.50。Rating 均值为 3.8,标准差 0.9。下表汇总了这些关键数字。
| Statistic | Spend (£) | Rating |
|---|---|---|
| Mean | 16.48 | 3.8 |
| Standard deviation | 3.12 | 0.9 |
| Minimum | 10.20 | 2 |
| Q1 | 14.10 | 4 |
| Median | 16.40 | 4 |
| Q3 | 18.90 | 5 |
| Maximum | 22.50 | 5 |
4. Visualising Distributions | 分布可视化
A histogram of Spend reveals a roughly symmetric distribution with a slight right skew, and the boxplot confirms no distant outliers are present. The Rating distribution appears left-skewed because the majority of customers gave ratings of 4 or 5, with very few low scores. These visual impressions will guide our choice of parametric methods, particularly the assumption of normality for Spend.
Spend 的直方图显示分布大致对称,略有右偏;箱线图确认不存在远端异常值。Rating 分布呈左偏,因为绝大多数顾客给出 4 或 5 分,低分极少。这些视觉印象将指导我们选择参数方法,尤其是 Spend 的正态性假设。
5. Probability & Distributions | 概率与分布
Treating Spend as approximately normally distributed, we can calculate the probability that a randomly chosen order exceeds £20. Standardising gives z = (20 − 16.48) / 3.12 ≈ 1.13. Using standard normal tables, P(Z > 1.13) = 1 − 0.8708 = 0.1292. About 12.9% of orders are expected to be above £20. Given that n = 25, the Central Limit Theorem supports approximate normality of the sample mean even if the raw Spend data show mild skewness.
将 Spend 视为近似正态分布,可计算随机选择一单消费超过 £20 的概率。标准化后 z = (20 − 16.48) / 3.12 ≈ 1.13。查标准正态表,P(Z > 1.13) = 1 − 0.8708 = 0.1292。约有 12.9% 的订单预计超过 £20。考虑到样本容量 n = 25,中心极限定理保证即便原始数据有轻微偏态,样本均值仍近似正态。
6. Confidence Intervals | 置信区间
We construct a 95% confidence interval for the population mean spend μ. Because the population standard deviation is unknown, we use the t-distribution with df = 24. The critical value for a 95% confidence level (two-tailed, α/2 = 0.025) is t* = 2.064. The margin of error is t* × s / √n = 2.064 × 3.12 / 5 = 2.064 × 0.624 ≈ 1.288.
我们构建总体平均消费 μ 的 95% 置信区间。由于总体标准差未知,使用自由度为 24 的 t 分布。95% 置信水平对应的双侧临界值 t* = 2.064(α/2 = 0.025)。误差幅度为 t* × s / √n = 2.064 × 3.12 / 5 = 2.064 × 0.624 ≈ 1.288。
The 95% confidence interval is therefore (£16.48 − £1.288, £16.48 + £1.288) = (£15.19, £17.77). We are 95% confident that the true average takeaway spend for Brew & Bean lies between £15.19 and £17.77.
因此 95% 置信区间为 (£16.48 − £1.288, £16.48 + £1.288) = (£15.19, £17.77)。我们有 95% 的把握认为 Brew & Bean 真实平均外卖消费介于 £15.19 与 £17.77 之间。
7. Hypothesis Testing: One-Sample t-Test | 假设检验:单样本 t 检验
To formally test whether the mean spend is above £15, we set up a one-sample, one-tailed t-test. Hypotheses: H₀: μ = 15, H₁: μ > 15. Significance level α = 0.05.
为正式检验平均消费是否高于 £15,我们进行单样本单侧 t 检验。假设:H₀: μ = 15, H₁: μ > 15。显著性水平 α = 0.05。
The test statistic is t = (x̄ − μ₀) / (s / √n) = (16.48 − 15) / 0.624 = 1.48 / 0.624 ≈ 2.37. The critical value for t with 24 degrees of freedom at α = 0.05 (one-tailed) is 1.711. Since 2.37 > 1.711, we reject the null hypothesis. The p-value is approximately 0.013, which is less than 0.05, confirming statistical significance.
检验统计量 t = (x̄ − μ₀) / (s / √n) = (16.48 − 15) / 0.624 = 1.48 / 0.624 ≈ 2.37。自由度为 24、单侧 α = 0.05 的 t 临界值为 1.711。因为 2.37 > 1.711,拒绝原假设。p 值约为 0.013,小于 0.05,确认为统计显著。
We conclude that there is sufficient evidence at the 5% level to claim that the mean spend for takeaway orders exceeds £15. This result aligns with the confidence interval which excluded £15 on the lower side.
结论为,在 5% 显著性水平下有充分证据表明外卖平均消费超过 £15。这一结果与置信区间下限高于 £15 吻合。
8. Correlation & Regression | 相关与回归
We next investigate the relationship between Spend and Rating. The Pearson correlation coefficient is r = 0.65, indicating a moderate positive linear association. To test its significance, we set H₀: ρ = 0 against H₁: ρ ≠ 0. The test statistic is t = r √(n − 2) / √(1 − r²) = 0.65 × √23 / √(1 − 0.4225) = 0.65 × 4.7958 / 0.7599 ≈ 4.10. With df = 23, the critical two-tailed value at α = 0.05 is 2.069; the obtained |t| far exceeds this, giving p < 0.001.
接下来研究 Spend 与 Rating 的关系。皮尔逊相关系数 r = 0.65,表明存在中等程度的正向线性关联。为检验显著性,设 H₀: ρ = 0,H₁: ρ ≠ 0。检验统计量 t = r √(n − 2) / √(1 − r²) = 0.65 × √23 / √(1 − 0.4225) = 0.65 × 4.7958 / 0.7599 ≈ 4.10。自由度为 23,α = 0.05 的双侧临界值为 2.069;所得 |t| 远大于临界值,p < 0.001
Published by TutorHao | Year 12 统计 Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply