Hi, I’m having trouble to find how write moments of random variables in symbolic terms. For instance, say I define z = x + y
then I want to compute the variance of z in terms of moments of x and y. I would like Mathematica to return this:
Variance(z) = variance(x) + variance(y) + 2*covariance(x,y)
(All in symbolic terms)
My actual problem is a bit more complicated. I have that the data generating process of a scalar random variable X is an AR(p):
X_{t} = \sum_{j=1}^{p} A_{j} X_{t-j} + u_{t}
where A_{j}'s are scalars, for some white noise u_{t}. I don’t want to specify a distribution for u_{t}, and there is NO data nor estimation involved. This is a population exercise.
I want to compute the variance of X_{t} as a function of p, the A_{j}'s, and probably the variance of u_{t}. The process is stationary.
MY QUESTION: can mathematica give me the expression of Variance(X_{t} ) in symbolic terms?
Thanks!!! All help/comments welcome!
PS Just in case I’m familiar with the well known formula for it, but I don’t want to write that directly. I want mathematic to tell me the expression. The reason is that I also have more complicated processes to look into where deriving the variance is a mess, so I would like mathematica to do it for me. For instance, I have VAR(p) processes for X and Y.