3.7 Practice Problems

Problem 3.7.1. Consider the linear trend \(Y = \alpha + \beta T + U\), with \(Y\) observed annually for five years and \(T\) assigned the integer values \(-2\) to \(2\). Show that \[ b = \frac {\sum (Y_i - \bar Y)(T_i - \bar T)}{\sum (T_i - \bar T)^2} \] reduces to \(b = \sum Y_iT_i/\sum T_i^2\). What is the corresponding estimate of \(\alpha \), and how is it interpreted?

Show solution

Solution. \(\sum T_i = -2 - 1 + 0 + 1 + 2 = 0\), so \(\bar T = 0\) and \(T_i - \bar T = T_i\). The numerator is \(\sum (Y_i - \bar Y)T_i = \sum Y_iT_i - \bar Y\sum T_i = \sum Y_iT_i\), and the denominator is \(\sum T_i^2 = 10\). So \(b = \sum Y_iT_i/10\) (Theorem 3.1.1). The intercept is \(a = \bar Y - b\bar T = \bar Y\), the fitted value of \(Y\) at \(T = 0\), the middle year of the sample.

Problem 3.7.2. The annual consumption of petroleum in Zambia is believed to grow exponentially at a constant proportionate rate \(g\) per year:

Year 2014 2015 2016 2017 2018
Consumption 30.5 80.8 175.1 367.9 812.9

(a)
Estimate the annual growth rate \(g\) and interpret it.
(b)
Forecast consumption for 2019.
(c)
Estimate the constant monthly growth rate.
(d)
The residual variance of the log regression is \(s^2 = 0.00583\). Adjust the forecast in (b) to estimate mean consumption in 2019, and comment.

Show solution

Solution. (a) Code the years \(T = -2, \dots , 2\). The logarithms of consumption are \[ 3.4177,\quad 4.3920,\quad 5.1654,\quad 5.9078,\quad 6.7006, \] with mean \(5.1167\). Then \[ b = \frac {-2(3.4177) - 4.3920 + 5.9078 + 2(6.7006)}{10} = \frac {8.0816}{10} = 0.8082 , \] and \(\hat g = e^{0.8082} - 1 = 1.244\). Consumption grew by about \(124\%\) a year, more than doubling annually. The instantaneous rate is \(80.8\%\).

(b) 2019 is \(T = 3\), so \(\widehat {\log Y} = 5.1167 + 3(0.8082) = 7.5413\) and \(\hat Y = e^{7.5413} = 1884\).

(c) \(e^{0.8082/12} - 1 = 0.0697\), about \(7.0\%\) a month. Compounded over twelve months, \(1.0697^{12} = 2.244\), which recovers the annual factor.

(d) By Theorem 3.2.3, \(e^{s^2/2} = e^{0.00292} = 1.0029\), so the estimated mean is \(1884 \times 1.0029 = 1890\). The correction is under \(0.3\%\), small because the growth curve fits so closely. The much larger uncertainty is whether growth of \(124\%\) a year can continue at all: the forecast assumes the 2014–2018 pattern holds for another year.

Problem 3.7.3. Find the transformation that linearises \[ Y = \frac {e^{\alpha + \beta X}}{1 + e^{\alpha + \beta X}} . \] If \(Y = 0.2\) when \(X = 0\) and \(Y = 0.8\) when \(X = 2\), find \(\alpha \) and \(\beta \), and the value of \(X\) at which \(Y = \frac 12\).

Show solution

Solution. By Theorem 3.4.1, \(\log \bigl (Y/(1 - Y)\bigr ) = \alpha + \beta X\). At \(X = 0\), \(\alpha = \log (0.2/0.8) = \log 0.25 = -1.386\). At \(X = 2\), \(\log (0.8/0.2) = \log 4 = 1.386 = \alpha + 2\beta \), so \(\beta = 1.386\). \(Y = \frac 12\) where the log-odds are zero, at \(X = -\alpha /\beta = 1\). That is the midpoint, by the symmetry of the logistic curve about its point of inflection.

Problem 3.7.4. An estimated Phillips curve relates wage inflation \(\pi \) (% per year) to the unemployment rate \(U\) (%): \[ \hat \pi = 1.5 + \frac {12}{U} . \]

(a)
What does the model imply about inflation as unemployment becomes very high?
(b)
Find the marginal effect and the elasticity of inflation with respect to unemployment at \(U = 4\).
(c)
By how much must unemployment rise, from \(4\%\), to reduce inflation by one percentage point?

Show solution

Solution. (a) As \(U \to \infty \), \(\hat \pi \to 1.5\): wage inflation falls towards a floor of \(1.5\%\) but never below it.

(b) At \(U = 4\), \(\hat \pi = 1.5 + 3 = 4.5\). The marginal effect is \(-12/U^2 = -0.75\) percentage points of inflation per point of unemployment. The elasticity is \(-0.75 \times 4/4.5 = -0.667\).

(c) Inflation of \(3.5\) requires \(12/U = 2\), so \(U = 6\): unemployment must rise by two points. The marginal effect of \(-0.75\) would suggest \(1.33\) points, but it applies only to small changes, and the effect weakens as \(U\) rises.

Problem 3.7.5. In a wage equation \(\log w = \alpha + \beta S + \delta D + u\), where \(S\) is years of schooling and \(D = 1\) for workers in the formal sector, the estimates are \(b = 0.12\) and \(d = 0.35\). Interpret both, giving exact and approximate percentage effects, and explain which interpretation should be reported.

Show solution

Solution. An extra year of schooling multiplies the wage by \(e^{0.12} = 1.1275\), an exact effect of \(12.7\%\); the approximation \(100b\) gives \(12\%\). Formal sector workers earn \(e^{0.35} - 1 = 41.9\%\) more than otherwise similar informal workers, against an approximation of \(35\%\). The exact figures should be reported, especially for the dummy variable: a dummy changes discretely from \(0\) to \(1\), so the derivative-based approximation has no special claim to validity, and here it understates the gap by seven percentage points.

Problem 3.7.6. Prove that in the logistic model the elasticity of \(Y\) with respect to \(X\) is \(\beta X(1 - Y)\). Show that for small \(Y\) it is approximately the elasticity \(\beta X\) of the log-linear model, and explain why.

Show solution

Solution. By Theorem 3.4.1, \(dY/dX = \beta Y(1 - Y)\), so \(\eta = \beta Y(1 - Y)X/Y = \beta X(1 - Y)\). As \(Y \to 0\), \(1 - Y \to 1\) and \(\eta \to \beta X\), the elasticity of \(\log Y = \alpha + \beta X\) (Theorem 3.3.2). For small \(Y\), \(Y = e^z/(1 + e^z) \approx e^z\), because \(e^z\) is small, so the logistic is approximately the exponential curve and has the same elasticity. The factor \(1 - Y\) is the brake applied by saturation.

Problem 3.7.7. For a sample of \(40\) observations, the regression of \(Y\) on \(X\) has residual sum of squares \(12.6\) and the regression of \(\log Y\) on \(X\) has residual sum of squares \(0.84\). The geometric mean of \(Y\) is \(4.2\).

(a)
Explain why the two residual sums of squares cannot be compared directly.
(b)
Without re-estimating, compute the residual sums of squares of both models after \(Y\) is scaled by its geometric mean, and say which model the Box–Cox criterion prefers.

Show solution

Solution. (a) They are measured in different units: squared units of \(Y\) for the first and squared log units for the second.

(b) Scaling \(Y\) by \(\tilde Y = 4.2\) divides every residual of the linear model by \(4.2\), so its RSS becomes \(12.6/4.2^2 = 0.714\). In the log model, \(\log (Y/\tilde Y) = \log Y - \log \tilde Y\) only shifts the intercept, so the residuals and RSS are unchanged at \(0.84\). The linear model has the smaller scaled RSS, so it is preferred, with a log-likelihood margin of \(\frac {40}{2}\log (0.84/0.714) = 3.25\).

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.