# Why is $A\cos(2\pi f_ct)$ a non-stationary process?

I am studying analog communication and having Communication system - Simon Hykin as one of the reference.

There is a question

Consider the sinusoidal process$$X(t) = A\cos(2\pi f_ct)$$where the frequency $f_c$ is constant and amplitude $A$ is uniformly distributed: $f(a) = 1$ for $0\leq a \leq 1$ and $0$ otherwise. Determine weather or not this process is strictly stationary.

Now when I go through the solution it says it is not a stationary process and it is provided in the solution that:

if $A$ is uniformly distributed then $${p}_{X_i}(X_1) = \begin{cases} \displaystyle\frac{1}{\cos(2\pi f_c t_i)} &\text{for}\quad 0\leq X_1 \leq \cos(2\pi f_c t_i)\\[2ex]0 & \text{otherwise}\end{cases}$$

Now:

• How is this provided?
• And why is it concluded that it's non-stationary process?
• you're not saying what $X_i$ is in $${p}_{X_i}(X_1) = \begin{cases} \displaystyle\frac{1}{\cos(2\pi f_c t_i)} &\text{for}\quad 0\leq X_1 \leq \cos(2\pi f_c t_i)\\[2ex]0 & \text{otherwise}\end{cases}$$ is it a p.d.f. for $X(t)$? – robert bristow-johnson Jan 8 '17 at 1:34
• This answer to a related question might be helpful. – Matt L. Jan 8 '17 at 12:14

A random process is a collection of random variables, one random variable for each time instant. It is best to write the random process as $$\{X(t)\colon -\infty < t < \infty\} \tag{1}$$ where the $\{$ and $\}$ indicate that a set (or collection) of objects is being defined, and the interior says that a typical member of this set is denoted by $X(t)$ where $t$ is a real number. Think of $X$ as the family name of all the random variables in the set, and $t$ as the first name. Thus, $X(t_0)$ is just one of the random variables in this collection of random variables, the random variable for time $t_0$, while $X(t_1)$ is another random variable, the one corresponding to time $t_1$.

The statement $$X(t) = A\cos(2\pi f_ct)$$ is a loose way of writing the more formal definition $\{X(t) = A\cos(2\pi f_c t)\colon -\infty < t < \infty\}$. Thus, we have that $$X(t_0) = A\cos(2\pi f_ct_0),\\ X(t_1) = A\cos(2\pi f_ct_1),\\ \cdots$$

Since $\cos(2\pi f_ct_0)$, $\cos(2\pi f_ct_1)$ etc are just constants, what we immediately get is that each random variable $X(t_i)$ in this random process is a uniformly distributed random variable. Huh? How did we get that? Well, $A \sim U(0,1)$ is given, and hopefully you understand enough about random variables to know (or to be able to jump to the conclusion) that $bA \sim U(0,b)$ for $b >0$. If $b < 0$, then $bA \sim U(b,0)$.

So, now you have enough information to decipher the crappy notation in the solution given to you (which is not completely correct, anyway). The random variable $X(t_i)$ is given by $$X(t_i) = A\cos(2\pi f_ct_i) = bA \begin{cases} \sim (U(0,b), & b > 0,\\ = 0, & b = 0,\\\sim U(b,0), &b < 0,\end{cases}.$$ Thus, for $b > 0$, we can write the density function of $X(t_i)$ as $$f_{X(t_i)}(x) = \begin{cases} \displaystyle\frac 1b, & 0 < x < b,\\ 0, &\text{otherwise},\end{cases} = \begin{cases} \displaystyle \frac{1}{\cos(2\pi f_ct_i)}, & 0 < x < \cos(2\pi f_ct_i),\\ 0, &\text{otherwise},\end{cases} \tag 2$$ where of course $t_i$ is such that $\cos(2\pi f_ct_i) = b$.

So, the above derivation of $(2)$ answers your first question. For the second question re stationarity, the conditions that a random process must satisfy in order for it to be called a stationary process are quite onerous (see, for example, the first paragraph of this answer of mine to a different question for details) and this process fails to meet even the simplest of the necessary conditions: that all the random variables comprising the process have the same distribution function (which also means having the same density function if the random variables are continuous random variables). But, it is manifestly obvious from $(2)$ that $X(t_i)$ and $X(t_j)$ have different densities in general. That for certain specific choices of $t_i$ and $t_j$, $X(t_i)$ and $X(t_j)$ have the same density (in fact are the same random variable) is nice to know, but irrelevant. Not all random variables in the process can be said to have the same distribution, and this single inconvenient fact allows us to reject any overblown notions that we might be harboring that this process is a stationary process.

To avoid follow-on questions from readers, the process in question is not wide-sense stationary either (hint: because the mean function is time-varying).

• I should probably have taken the time to straighten out notation. Thanks! Have an upvote. – Marcus Müller Jan 8 '17 at 0:36
• Very nicely explained @Dilip. – QMC Jan 12 '17 at 23:14
• Yes, a clear description. @Dilip. – Michael_RW Jan 13 '17 at 13:32
• "Well, $A∼U(0,1)$ is given, and hopefully you understand enough about random variables to know (or to be able to jump to the conclusion) that $bA∼U(0,b)$ for $b>0$. If $b<0$, then $bA∼U(b,0)$."  why is that?  why isn't it: If $b<0$, then $bA∼U(0,-b)$? – robert bristow-johnson Aug 10 '17 at 23:42
• @robertbristow-johnson If I understood your concern right, then algebra can provide the answer: given a RV $X$ uniform in the range $0<X<1$, then the new random variable $Y = bX$ will be in the range; $0 \cdot b < bX < 1 \cdot b => 0 < bX < b$ hence $U(0,b)$ for $b$ positive number, and $0\cdot b > bX > 1 \cdot b => 0 > bX > b => b<bX <0$ hence $U(b,0)$ for $b$ a negative number; i.e., the inequality reverses direction when multiplied by a negative number. – Fat32 Aug 11 '17 at 0:26

In easy words:

A process is stationary if its stochastic properties are independent of the time you look at it.

Think of it like this: A stochastic process is just a Random Variable (RV) that, instead of giving you e.g. a real value gives you a function every time you look at it. We call that realizations.

If you now take a lot of these realizations, and compare them, you'll notice:

• For all $t_0 = \frac{2N+1}{4f_c},\,N\in\mathbb N$, the cosine becomes \begin{align} \cos(2\pi f_c t_0) &= \cos\left(2\pi f_c \frac{2N+1}{4f_c} \right)\\ &= \cos\left(2\pi \frac{2N+1}{4} \right)\\ &= \cos\left(\frac12\pi (2N+1) \right)&\text{\cos is 2\pi-periodic}\\ &= \cos\left(\frac12\pi (1) \right)\\ &= \cos\left(\frac\pi2 \right)\\ &=0\text, \end{align} and thus, $X(t_0)=0$, absolutely deterministic
• For all $t_1 = \frac{N}{f_c}$, the cosine becomes $\cos(2\pi f_c t ) = \cos(2 pi f_c \frac{N}{f_c}) = \cos (2 \pi N) = \cos (2\pi) = 1$, and therefore $$X(t_1) = A$$. In other words, whenever you look at that time, the RV is uniformly distributed like $A$.

So, for $t_0$ and $t_1$, $X(t)$ behaves very differently. If you want to formalize that, the variance is a good start:

$\text{var}\left(X(t_0)\right)=0$, because, obviously, the value of $0$ doesn't vary, and $\text{var}\left(X(t_1)\right)= \text{var}\left(A\right)=\frac1{12}(1-0)^2=12^{-1}$ (variance of a bounded uniform distribution).

You can even show that using the mean, because the mean of $X(t_0)=0$ is $0$, and the mean of $X(t_1) =A$ is $\frac12$.

You'll very likely get to know ergodic processes soon, so

What is a good example of an ergodic process?

might be of interest to you.