Question
A hotel analyst receives four equally weighted observations, each a pair (room price in dollars, guest rating out of 5). The budget hotels have ($80, 4) and ($100, 5); the luxury hotels have ($200, 2) and ($220, 3). Management notices that higher prices accompany higher ratings within either category, but a scatterplot pooling all four hotels slopes downwards.
Calculate the pooled ordinary-least-squares slope of rating on price, and the common slope when the regression includes a separate intercept for budget and luxury hotels. Use a covariance decomposition to account for the apparent reversal. Would either slope alone establish that changing a room's price changes guest satisfaction?
Get hint
Hint 1
Compute deviations from the overall mean price and mean rating for the pooled slope. For the category-adjusted slope, subtract each category’s means first.
Check your answer
Solution
Across all four observations, the mean price is $150 and the mean rating is 3.5. The unnormalised cross-products are \((-70)(0.5)+(-50)(1.5)+(50)(-1.5)+(70)(-0.5)=-220\), and the corresponding sum of squared price deviations is \(70^{2}+50^{2}+50^{2}+70^{2}=14,800\). Thus pooled OLS slope \(\beta=-\frac{220}{14,800}=-\frac{11}{740}\) rating points per dollar.
The group means are (90,4.5) for budget and (210,2.5) for luxury. Within each group, prices deviate by ±10 and ratings by ±0.5 in the same direction, so the within-group covariance (using equal population weights) is 5, and within-group price variance is 100. After including a group intercept, the Frisch–Waugh–Lovell residualised slope is \(\frac{5}{100}=0.05\) per dollar.
For the pooled mixture, \(\mathbb{E}[\operatorname{Cov}(\text{price},\text{rating}\mid\text{group})]=5\). Its between-group covariance is \(\frac{1}{4}(210-90)(2.5-4.5)=-60\). Their sum is −55, the pooled covariance \((-\frac{220}{4})\). Likewise overall price variance is within variance 100 plus between variance \((\frac{120^{2}}{4})=3,600\), totalling 3,700. Therefore \(-\frac{55}{3,700}=-\frac{11}{740}\). The lower-rated luxury group has a much higher average price; its between-group shift outweighs the positive within-category relation. Neither association identifies a causal price effect: features of the rooms, guests and categories may influence ratings and prices.
Assumptions
Each observation has equal weight; a regression includes an intercept.
The category-adjusted model uses a separate intercept but one common price slope.
Ratings are measured on the same numeric scale across categories.
Final Answer
Pooled slope = \(-\frac{11}{740}\approx-0.0149\) rating points per $1. Category-adjusted slope = \(+\frac{1}{20}=+0.05\) per $1. The reversal is between-group composition, not evidence of a negative within-category relationship; neither regression proves causality.