# Confidence interval for a variable which is function of the coefficients of a linear regression, $\frac{\hat{\beta}_1}{\hat{\beta}_2}$

Consider the following linear regression $$Y = \beta_1X_1 + \beta_2X_2 + \epsilon$$

Can I compute a confidence interval for the estimate of the quantity ? $$\frac{\beta_1}{\beta_2}$$

# Load the mtcars dataset
data(mtcars)

# Fit a linear regression model with two predictor variables (e.g., mpg and hp)
lm_model <- lm(mpg ~ 0 + hp + wt, data = mtcars)

# Summarize the model
summary(lm_model)

Coefficients:
Estimate Std. Error t value Pr(>|t|)
hp -0.03394    0.03940  -0.861   0.3959
wt  6.84045    1.89425   3.611   0.0011 **


I don't want to resort to the Delta method or bootstrap.

• Do you mean confidence interval for $\beta_1 / \beta_2$ rather than $\hat{\beta}_1 / \hat{\beta}_2$? Also the example regression has an intercept, so it's $E(Y) = \beta_0 + \beta_1 x_1 + \beta_2 x_2$. Usually it makes sense to include the intercept term. Sep 2 at 11:28
• This is a minor variation of your previous question and can be addressed in the same manner described there. The question of how to estimate the ratio $\beta_1/\beta_2$ was recently posed at stats.stackexchange.com/questions/625150/…. For closely related threads (which likely already have answers) see this site search.
– whuber
Sep 2 at 14:20
• Why not use the Delta method or the bootstrap? Sep 2 at 17:53
• @jbowman: If $\beta_2$ is close to zero, that can be imprecise, just use the profile likelihood as outlined in the post linked by whuber (and answered by me) Sep 2 at 18:42
• The delta method leads to symmetric confidence intervals which are not realistic here. That would cause at least one of the tails to not have accurate non-coverage probability (e.g., 0.1 when you hope for 0.025 for a two-sided 0.95 CI). If you fit a Bayesian regression you simply examine all the posterior draws of the ratio and construct an exact (aside from simulation error) uncertainty interval (highest posterior density interval or credible interval). Sep 3 at 11:57