In-Class Exercise 4
Shih Chien University
2026-09-16
The following are the numbers of customers served on six consecutive days at two branches of a coffee shop.
Measures of Variation
For each branch, compute the range, the variance with var(), and the standard deviation with sd().
The two branches have the same mean. Which branch is more consistent from day to day? Explain in one sentence.
Coefficient of Variation
The coefficient of variation is
CVar=\frac{s}{\bar{X}}\cdot 100\%
Compute CVar for both branches in R.
Branch A is measured in customers per day and its manager also reports daily revenue in NT dollars. Explain in one sentence why CVar is useful when two variables are measured in different units.
Five-Number Summary and Outliers
For branchB:
fivenum().quantile().ggplot() and geom_boxplot().Elementary Statistics: A Step by Step Approach