Solution (source code)

= Solution

The plug-in estimate is
$$
\boxed{\widehat\theta=\widehat\beta_1\widehat\beta_2.}
$$
For a concrete <bootstrap> construction, suppose the rows $(x_i,y_i)$ are <independent and identically distributed>, $\mathbb E(e_i\mid x_i)=0$, the design moment matrix is nonsingular, and the required moments exist. Use a <paired bootstrap>: sample $n$ rows with replacement, form $X^*,Y^*$, refit by <ordinary least squares>, and compute $\widehat\theta^*=\widehat\beta_1^*\widehat\beta_2^*$. Repeat many times. Singular resampled designs require a suitable rank-preserving implementation or replacement replicate; with a regular continuous design their frequency vanishes asymptotically.

The <bootstrap-t confidence interval> method also needs a <standard error> in the original sample and every replicate. One asymptotically valid heteroscedasticity-robust <covariance> estimate is
$$
\widehat V=(X^\top X)^{-1}\left(\sum_i x_ix_i^\top\widehat e_i^2\right)(X^\top X)^{-1}.
$$
The <delta method> for the coefficient product gives
$$
d=(\widehat\beta_2,\widehat\beta_1)^\top,\qquad
\boxed{\widehat s=(d^\top\widehat Vd)^{1/2}.}
$$
Recompute $\widehat V^*,d^*,\widehat s^*$ in each paired replicate. This is <bootstrap inference for a product of regression coefficients>.

With fixed rather than random design, resample centered residuals if errors are identically distributed with <homoskedasticity>, or use a properly specified <wild bootstrap> for heteroscedastic errors, keeping $X$ fixed and refitting after generating $Y^*$. The printed assumption $\mathbb E e_i=0$ alone does not establish <independent> observations or validity of a <bootstrap confidence interval>. The formulas below give asymptotic 95% coverage under the stated regularity conditions, not an exact finite-sample guarantee. In particular the ordinary first-order studentization needs $(\beta_1,\beta_2)\ne(0,0)$ and a nonzero asymptotic <variance>; when both coefficients vanish the product has nonstandard behavior.