Interpreting odds ratio units I'm running logistic regressions in Python using statsmodels logit and, downstream, am calculating odds ratios for each independent variable.
I know that, conventionally, an odds ratio is interpreted per "one unit" increase in the value of the variable. I think my ultimate question is how can I determine with certainty what "one unit" really is for each variable, and if it depends upon the precision of the data for the relevant column.
One parameter, respiratory_rate, has values in integers (22, 26, 30, 12, etc.). So I think I can assume a one unit increase in respiratory_rate would be one whole number.
However, a second parameter, temperature, has values with decimal points to the tenths place (97.8, 98.4, 99.5, 100.3, etc.). Here, for the odds ratio for temperature, would the "one unit increase" be an increase in tenths, i.e., an increase of 0.1?
 A: In the simplest terms, an odds ratio (OR) is the relationship between the probability P of the occurrence of an event A and the probability 1 - P(A) of event A not occuring. The mathematical expression is
P(A)/(1-P(A)). OR > 1 imply that A has a greater probability of happening than not happening, OR < 1 is the opposite. The numerator is the probability between 0 and 1.0 of the event occurring. The denominator is the probability between 0 and 1.0 of the event not occurring. The sum of both probabilities equals 1.0 which explains the subtraction from 1.0 to obtain the probability of the event not occurring after you know the probability of the event occurring. Here is a good explanation https://en.wikipedia.org/wiki/Odds_ratio.
A: It's literally the derivative.
$$
odds\_ratio = \beta_0 + \beta_1x$$
$$\dfrac{\partial odds\_ratio}{\partial x} = \beta_1
$$
Then $x$ increases by one, the odds ratio increases by $\beta_1$.
Let's do a concrete example with numbers.
$$
odds\_ratio = 1 + 2x\\
\beta_0 = 1\\
\beta_1 = 2
$$
When $x=0$, $odds\_ratio = 1$.
When $x$ increases by $1$ to give $x=1$, $odds\_ratio = 3$.
When $x$ increases by $1$ again to give $x=2$, $odds\_ratio = 5$.
As an exercise, what is the odds ratio for $x = 1.5$, and how does that compare to when $x=1$ or when $x=2?$
