Message Boards Message Boards

1
|
8186 Views
|
8 Replies
|
9 Total Likes
View groups...
Share
Share this post:

Moments of a generic random variable (symbolic)

Posted 10 years ago
POSTED BY: Daniela Scida
8 Replies
Posted 10 years ago

Your explanation is wonderful!! I think this is exactly what I needed to know to work my setting which is based on this. Thank you so much!!!!!

POSTED BY: Daniela Scida
POSTED BY: Gosia Konwerska
Posted 10 years ago
POSTED BY: Daniela Scida
Posted 10 years ago
POSTED BY: Jim Baldwin
Posted 10 years ago
POSTED BY: Daniela Scida
Posted 10 years ago
POSTED BY: Daniela Scida

Assuming weak stationarity of AR process:

In[1]:= Variance[ARProcess[{a1, a2}, var][t]]

Out[1]= -(((-1 + a2) var)/((1 + a2) (1 - a1^2 - 2 a2 + a2^2)))

gives the answer for p=2 and for var denoting the variance of white noise driving the process. In Mathematica ARProcess is assumed to be driven by a Gaussian white noise, but this formula is more general - assuming zero first moment and finite second moment of the noise. We also assume that the noise variable is independent of past observations.

Clearly it becomes more complicated in higher dimensions:

In[2]:= Variance[ARProcess[{Array[a, {2, 2}]}, Array[v, {2, 2}]][t]]

Out[2]= {-((v[1, 1] - a[1, 2] a[2, 1] v[1, 1] - 
      a[1, 1] a[2, 2] v[1, 1] - a[2, 2]^2 v[1, 1] - 
      a[1, 2] a[2, 1] a[2, 2]^2 v[1, 1] + a[1, 1] a[2, 2]^3 v[1, 1] + 
      a[1, 1] a[1, 2] v[1, 2] + a[1, 2]^2 a[2, 1] a[2, 2] v[1, 2] - 
      a[1, 1] a[1, 2] a[2, 2]^2 v[1, 2] + a[1, 1] a[1, 2] v[2, 1] + 
      a[1, 2]^2 a[2, 1] a[2, 2] v[2, 1] - 
      a[1, 1] a[1, 2] a[2, 2]^2 v[2, 1] + a[1, 2]^2 v[2, 2] - 
      a[1, 2]^3 a[2, 1] v[2, 2] + 
      a[1, 1] a[1, 2]^2 a[2, 2] v[2, 2])/(-1 + a[1, 1]^2 + 
      a[1, 2] a[2, 1] + a[1, 1]^2 a[1, 2] a[2, 1] + 
      a[1, 2]^2 a[2, 1]^2 - a[1, 2]^3 a[2, 1]^3 + a[1, 1] a[2, 2] - 
      a[1, 1]^3 a[2, 2] + 3 a[1, 1] a[1, 2]^2 a[2, 1]^2 a[2, 2] + 
      a[2, 2]^2 - a[1, 1]^2 a[2, 2]^2 + a[1, 2] a[2, 1] a[2, 2]^2 - 
      3 a[1, 1]^2 a[1, 2] a[2, 1] a[2, 2]^2 - a[1, 1] a[2, 2]^3 + 
      a[1, 1]^3 a[2, 2]^3)), -((-a[2, 1]^2 v[1, 1] + 
      a[1, 2] a[2, 1]^3 v[1, 1] - a[1, 1] a[2, 1]^2 a[2, 2] v[1, 1] - 
      a[1, 1] a[1, 2] a[2, 1]^2 v[1, 2] - a[2, 1] a[2, 2] v[1, 2] + 
      a[1, 1]^2 a[2, 1] a[2, 2] v[1, 2] - 
      a[1, 1] a[1, 2] a[2, 1]^2 v[2, 1] - a[2, 1] a[2, 2] v[2, 1] + 
      a[1, 1]^2 a[2, 1] a[2, 2] v[2, 1] - v[2, 2] + 
      a[1, 1]^2 v[2, 2] + a[1, 2] a[2, 1] v[2, 2] + 
      a[1, 1]^2 a[1, 2] a[2, 1] v[2, 2] + a[1, 1] a[2, 2] v[2, 2] - 
      a[1, 1]^3 a[2, 2] v[2, 2])/(1 - a[1, 1]^2 - a[1, 2] a[2, 1] - 
      a[1, 1]^2 a[1, 2] a[2, 1] - a[1, 2]^2 a[2, 1]^2 + 
      a[1, 2]^3 a[2, 1]^3 - a[1, 1] a[2, 2] + a[1, 1]^3 a[2, 2] - 
      3 a[1, 1] a[1, 2]^2 a[2, 1]^2 a[2, 2] - a[2, 2]^2 + 
      a[1, 1]^2 a[2, 2]^2 - a[1, 2] a[2, 1] a[2, 2]^2 + 
      3 a[1, 1]^2 a[1, 2] a[2, 1] a[2, 2]^2 + a[1, 1] a[2, 2]^3 - 
      a[1, 1]^3 a[2, 2]^3))}
POSTED BY: Gosia Konwerska
Posted 10 years ago

You might consider the mathStatica book/package at mathstatica.com

Also, you have a minor typo: "- 2 * covariance(x,y)" should be "+ 2 * covariance(x,y)".

POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract