# Is (covariance) stationarity preserved under log or exponential transformation?

In this lecture note, it (proposition 2) says that strict stationarity is preserved under transformation. However, it doesn't give the proof of this statement.

Second, what if the process is covariance stationary? I am particularly, interested in case of $$\log(.)$$ and $$\exp(.)$$ transformations. Given the extensive use of box-cox transformations, I think this must be true but I am unable to prove it.

The underlying idea is that equality of moments does not survive nonlinear transformations. In particular, when two variables $$X$$ and $$Y$$ have the same moments (up to some finite order) and $$f$$ is a nonlinear transformation, there is no assurance that $$f(X)$$ and $$f(Y)$$ will have any of the same moments.

Thus, when the marginal distributions of a weakly stationary process have different shapes, it's possible--even likely--that any given function of that process will produce a process that is not weakly stationary, even when the moments of everything involved are finite.

Lest this seem like so much hand-waving, I will provide a rigorous example.

For any number $$a\ge 1$$ let $$\mathcal{D}(a)$$ be the distribution assigning probability $$1/(2a^2)$$ to the values $$2\pm a$$ and putting the remaining probability of $$1-a^2$$ on the value $$2.$$ Compute that this distribution has expectation

$$\frac{2-a}{2a^2} + \frac{2+a}{2a^2} + 2\left(1-\frac{1}{a^2}\right) = 2$$

and variance

$$\frac{a^2}{2a^2} + \frac{a^2}{2a^2} + 0\left(1 - \frac{1}{a^2}\right) = 1$$

and notice that when $$a\lt 2,$$ the support of $$\mathcal{D}$$ is positive. Thus, all these distributions are bounded, of positive support, with equal means $$(2)$$ and equal variances $$(1).$$

When $$X$$ has distribution $$\mathcal{D}(a)$$ and $$f$$ is any transformation (a real-valued function of real numbers), compute that

$$E[f(X)] = \frac{f(2-a)}{2a^2} + \frac{f(2+a)}{2a^2} + f(2)\left(1 - \frac{1}{a^2}\right).$$

For example, when $$f$$ is the exponential,

$$E[e^X] = \frac{e^{2-a}}{2a^2} + \frac{e^{2+a}}{2a^2} + e^2\left(1 - \frac{1}{a^2}\right).\tag{*}$$

For $$1\le a \lt 2,$$ these values are all different. Here is a plot:

A similar analysis applies to $$\log(X),$$ showing it exists and has finite moments but that its expectation varies with $$a.$$

Consider a sequence of independent random variables $$(X_n)=X_1, X_2,X_3,\ldots$$ (a discrete time-series process) for which $$X_n$$ has $$\mathcal{D}(1 + \exp(-n))$$ for its distribution. Because $$2 \gt 1+\exp(-n)\gt 1,$$ all these variables are positive and bounded above by $$4.$$ Thus their logarithms and exponentials exist.

Since first and second moments of $$(X_n)$$ are finite and are equal, and all cross-moments are zero (by independence), this is a weakly stationary process. Nevertheless, as $$(*)$$ shows, the process $$(e^{X_n})$$ is not even weakly first-order stationary (despite having all finite moments) because its expectation varies with $$n;$$ and similarly $$\log(X_n),$$ although it is defined and has all finite moments, is also not weakly first-order stationary.

Weak stationarity is generally not preserved under exponential or logarithmic transformations.

Exponential transformation
Covariance (or weak) stationarity requires the second moment to be finite. If a random variable has a finite second moment, it is not guaranteed that the second (or even first) moment of its exponential transformation will be finite; think Student's $$t(2+\varepsilon)$$ distribution for a small $$\varepsilon>0$$. (See "Random variable with finite exponential first moment, infinite exponential variance" for details.) Thus, an exponential transformation can make a weakly stationary process nonstationary.

Logarithmic transformation
First of all, the logarithmic transformation needs to be well defined. For random variables that may take nonpositive values (e.g. a Normal random variable), this is violated. Hence, the logarithm of a stationary process with a Normal marginal distribution will not be a stationary process as it will not be well defined to begin with.
Regarding the cases where the logarithmic transformation is well defined, an analogous problem to the case of the exponential transformation may arise. If the original random variable has a sufficiently high density for values very close to zero, taking a logarithm will make them explode into large negative numbers. Then the variance (and perhaps even the mean) might become infinite. (See "Random variable with finite logarithmic first moment, infinite logarithmic variance" for details.)

• @Dayne, strict stationarity does not imply weak stationarity precisely because strict stationarity does not require finite second moments while weak stationarity does. This is well known and has been mentioned multiple times on Cross Validated. Regarding the first comment, see this to illustrate that there indeed exist random variables whose exponential mean is finite but exponential variance is not. Mar 4 '21 at 18:21
• I have upvoted this answer because it's correct. However, it really relies on a technicality. If one is transforming processes like this, then either (a) the form in which it has finite second moments will be preferred (which makes the question moot) or (b) both forms will have finite second moments. It would be more satisfactory (and insightful), then, to exhibit a process that is weakly stationary and a transformation to a process with finite second moments that is not weakly stationary (such situations exist).
– whuber
Mar 4 '21 at 18:43
• @mlofton Since weak stationarity (ws) is defined in terms of moments, requiring them to be finite makes sense; but this is irrelevant for strict stationarity and there's good reason not to rule out distributions with infinite moments.
– whuber
Mar 4 '21 at 19:41
• @mlofton For an example of a ws series whose transforms are not ws (but has all moments finite), let $X$ and $Y$ be variables with $\Pr(X=\pm1)=1/2,$ $\Pr(Y=\pm2)=1/8,$ and $\Pr(Y=0)=3/4,$ so that they have common expectations and variances. Let $(X_n)$ be a time series of independent copies of $X$ and $(Y_n)$ a series of independent copies of $Y$ (independent of $(X_n)$). Define $Z_{2k}=3+X_k,$ $Z_{2k+1}=3+Y_k.$ $(Z_n)$ is ws but neither $(e^{Z_n})$ nor $(\log(Z_n))$ is.
– whuber
Mar 4 '21 at 19:42
• @mlofton I posted an answer giving details of a similar construction.
– whuber
Mar 4 '21 at 20:16