# Expected value linearity

From the book A First Course in Probability 8th ed by Ross, expected value linearity is defined as $E[aX + b] = aE[X] + b$ where a and b are both constants and X is a random variable.

However a random process defined $X(t) = Kcos(wt)$ where K is a random variable has an expected value of $E[X(t)] = E[K]cos(wt)$. My question is how is this true when cosine is a function of t and not a constant.

Thanks.

-
@AndréNicolas. Even if the distribution of $K$ involved $t$ as a parameter, you would still be able to get $\cos(w t)$ outside of the expectation. – Learner Dec 8 '12 at 4:17
Yes, thank you, it was very imprecisely phrased. – André Nicolas Dec 8 '12 at 4:38

At this stage of your study, heuristically, you could consider constants everything that is not random. In the question, $X(t)=K \cos(w t)$ is a random function of $t$ only because $K$ is random. When you take the expectation, you could ignore everything that is not random. Were either $w$ or $t$ or both random, you would not be able to get $\cos( w t)$ outside of the expectation.
I am assuming this is the same case for variance? $Var(X(t)) = cos(wt)^2Var(K)$ ? – wi1 Dec 8 '12 at 6:14
Yes. Remember that $Var(X)=E[X^2]-E[X]^2$. So the rules that apply to the expectation follow for the variance from that formula. – Learner Dec 8 '12 at 6:22