Skip to content
Get started

OLS slope from four points

MediumStatistics4 min

You regress a signal yy on a feature xx over four observations (x,y)=(1,2),(2,2),(3,4),(4,5)(x,y)=(1,2),(2,2),(3,4),(4,5) using ordinary least squares. What is the estimated slope β^1\hat\beta_1? Give a decimal to two places.

Show hints (2)+
  1. Build ∑x,∑y,∑xy,∑x2\sum x,\sum y,\sum xy,\sum x^2, then use β^1=n∑xy−∑x∑yn∑x2−(∑x)2\hat\beta_1=\dfrac{n\sum xy-\sum x\sum y}{n\sum x^2-(\sum x)^2}.
  2. The slope is Cov⁡(x,y)/Var⁡(x)\operatorname{Cov}(x,y)/\operatorname{Var}(x) - use all four points, not just the ends.

Answer

Reveal answer →

1.1 (± 0.001)

Create a free account to see the full worked solution and track your progress.

Interview format: Hedge Fund Quant, Prop Trading

Related questions