# Should I log the quotient of 2 variables, or use the quotient of 2 logged variables?

I'm analyzing risk to drivers, i.e. driver deaths/distance driven.

Over time distance driven increases (people drive more) while ceteris paribus driver deaths decline (vehicles are safer.)

To deal with these unstable variances, should I define risk as

log(deaths/distance)


or

log(deaths)/log(distance)

• "Risk," as the object of investigation, has a definition independent of any statistical analysis you care to apply: it is conventionally taken to be the probability of an event multiplied by the cost of its occurrence. More generally, it is the expected cost of a random variable. In your application costs would often (but not invariably) be measured in terms of deaths per distance driven, whence neither of your proposed definitions would be correct. Regardless, note that the latter proposal is problematic (what happens for distance=1?) and arbitrarily depends on the unit of measurement.
– whuber
Commented Mar 17, 2014 at 15:00

log(deaths)/log(distance) will not get rid of the unstable variances, it will increase them, as log(distance) will always be smaller than distance and may (depending on distance) be 0 or negative. It still has all the problems of a ratio dependent variable.

log(deaths/distance), on the other hand = log(deaths) - log(distance). Is that what you want?

Or, perhaps, you want to add distance as an IV and use deaths as the DV?

Can you show some of your data and the results that trouble you?

• I think this confuses slightly (a) magnitude of variance (b) stability of variance. Consider $x=1,1,1,2,2,2,3,3,3$ and $y = 10^{-9}, 10^{-8}, 10^{-7},10^{-6},10^{-5},10^{-4},10^{-3},10^{-2},10^{-1}$. Then a log transformation results in negative values and bigger variances. But the bigger variances are just a side-effect of changing units and are not problematic. The key is that the variances of $\log y|x$ are constant and most statistically experienced researchers would choose logarithmic transformation here. That said, I agree that log(deaths/distance) definitely seems the thing to try. Commented Mar 17, 2014 at 0:25

Definitely go for the log(deaths/distance) first - statistically speaking you are going to push your model towards stationarity by doing this, which loosely stabilises the variance (there is still of course volatility involved, but it doesn't allow your curve to deviate massivley from the mean function).

This is common practice in pretty much all the regression type work out there, akin to talking about the use of first or second 'differences' to try normalising a distribution.