4.3 Coefficient Interpretation

Let’s take a look at the estimates from the model. What do they mean?

tidy(model.glm) %>%
  select(term, estimate)
## # A tibble: 2 x 2
##   term        estimate
##   <chr>          <dbl>
## 1 (Intercept)   15.0  
## 2 Temperature   -0.232

The slope coefficient (-0.232) tells you how much the predicted log odds of o-ring failure increase with an increase of 1 degree in temperature. But what does a 1 unit increase in log odds mean? We need to do a bit of algebra to get something more interpretable.

Our model is

\[\log\left(\frac{p}{1-p}\right) = \log\left(\frac{E[Y|X]}{1-E[Y|X]}\right) = \beta_0 +\beta_1X\]

Imagine considering a particular value of \(X=x\) (such as temperature = \(x\)),

\[\log\left(\frac{E[Y|X=x]}{1-E[Y|X=x]}\right) = \beta_0 +\beta_1x\]

If we increase \(X\) by 1, then we expected a change in our outcome or chance of success, \(E[Y|X = x+1]\),

\[\log\left(\frac{E[Y|X= x+1]}{1-E[Y|X= x+1]}\right) = \beta_0 +\beta_1(x+1)\]

Let’s find the difference between these two equations,

\[\log\left(\frac{E[Y|X=x+1]}{1-E[Y|X=x+1]}\right)- \log\left(\frac{E[Y|X=x]}{1-E[Y|X=x]}\right)= (\beta_0 +\beta_1(x+1)) - ( \beta_0 +\beta_1x)\] and simplify the right hand side (we love it when things cancel!),

\[\log\left(\frac{E[Y|X=x+1]}{1-E[Y|X=x+1]}\right)- \log\left(\frac{E[Y|X=x]}{1-E[Y|X=x]}\right)= \beta_1\] and then simplify the left hand side (using our rules of logarithms),

\[\log\left( \frac{E[Y|X=x+1]/(1-E[Y|X=x+1])}{E[Y|X=x]/(1-E[Y|X=x])}\right) = \beta_1\]

Let’s exponentiate both sides,

\[\left( \frac{E[Y|X=x+1]/(1-E[Y|X=x+1])}{E[Y|X=x]/(1-E[Y|X=x])}\right)= e^{\beta_1}\]

\[\left( \frac{\hbox{Odds of Success when }X=x+1}{\hbox{Odds of Success when }X=x}\right)= e^{\beta_1}\]

After that algebra, we find that \(e^{\beta_1}\) is equal to the odds ratio, the ratio of the odds of success between two groups of values (those with \(X=x+1\) and those with \(X=x\), 1 unit apart)

When we fit the model to the o-ring experimental data, we estimate the coefficients to be \(\hat{\beta}_0 = 15.04\) and \(\hat{\beta}_1 = -0.232\). So the estimated odds ratio is \(e^{\hat{\beta}_1} = e^{-0.232} = 0.793\) for an increase in one degree Fahrenheit in temperature (Temperature=T+1 v. Temperature=T).

tidy(model.glm) %>%
  select(term, estimate) %>%
  mutate(estimate_exp = exp(estimate)) %>%
  mutate(estimate_exp = round(estimate_exp,3)) #round to 3 decimal places
## # A tibble: 2 x 3
##   term        estimate estimate_exp
##   <chr>          <dbl>        <dbl>
## 1 (Intercept)   15.0    3412315.   
## 2 Temperature   -0.232        0.793
  • If a ratio is greater than 1, that means that the denominator is less than the numerator or equivalently the numerator is greater than denominator (odds of success are greater with T+1 as compared to T –> positive relationship between \(X\) variable and odds of success).

  • If a ratio is less than 1, that means that the denominator is greater than the numerator or equivalently the numerator is less than denominator (odds of success are less with T+1 as compared to T –> negative relationship between \(X\) variable and odds of success).

  • If the ratio is equal to one, the numerator equals the denominator (odds of success are equal for the two groups –> no relationship).

In this case, we have an odds ratio < 1 which means that the estimated odds of o-ring failure is lower for increased temperatures (in particular by increasing by 1 degree Fahrenheit). This makes sense since we saw in experimental data that the proportion of o-ring failures was lower in warmer temperatures.