# How does taking the log of the variable solve our problem of heteroscedasticity?

I have been taking online classes on linear regression, and in that the instructor told that heteroscedasticity can be solved by taking log of the variables, I was not much acquainted with the intuition behind logs, but a quick google search lent me the answer that, suppose if i have log 9 with base 3 , my answer will be 2, so log tells me what power is my base(3) raised to to get the answer 9.

So how is it that when we apply log to our variables, we solve the problem of heteroscedasticity? Can someone please explain me the intuition and technical and logical thinking behind it?

• As reported here, your instructor exaggerated, but if errors are multiplicative, they would be made additive by taking logarithms. This has only to be roughly true to be helpful. However, there are many threads here on transformations and heteroscedasticity, Apr 27, 2020 at 21:44

## 1 Answer

If the variance of the errors is proportional to the expected value then a logarithmic transform transform is appropriate. Other possible relationships between the first and the second moment would suggest another form of transformation. See When (and why) should you take the log of a distribution (of numbers)? and a spirited discussion here on SE Why do sample ACF/PACF suggest different TS models after box-cox transformation?,

Note that the variance of a series may change at particular points in time (if you have time series data or spatial data) and that conclusion would suggest Weighted Least Squares as detailed by Tsay here http://docplayer.net/12080848-Outliers-level-shifts-and-variance-changes-in-time-series.html.

In case one encounters possible anomalies one should treat them /isolate their effect/ mitigate their effect so they don't distort the empirical identification of any needed variance-stabilizing transform . Failure to do so this lead to a misleading log transforms of the classic Airline Series as pointed out by Chatfield and Prothero and elsewhere by Prof. Spyros Makridakis.

Transformations are like drugs ... "Some are good for you and some aren't !"

• Long-term members here are aware of your energy and engaging enthusiasm for treating every problem as being about time series even when that topic is not mentioned or even implied. Here the first paragraph bears on the question, but there are many other reasons for taking logarithms too, such as linearising a relationship or getting closer to additivity or symmetry of distribution. Apr 27, 2020 at 22:10