It takes time to get used to how the language works.
The symbols dt
and uz
are treated by Expectation
as constants, not as random variables, unless you declare an explicit distribution for them. This is similar to what happens for example with Integrate[a x, x]
, where the parameter a
is treated as constant.
The expression wzArray[[1]]
is simply wz[1]
, and you cannot feed it to Moment
. Your declaration
wzArray[[1]] \[Distributed] NormalDistribution[0, Sqrt[0.3]]
is not used by Moment
. This works:
Moment[NormalDistribution[0, Sqrt[0.3]], 1]
This behaviour is similar to the following:
In[29]:= x == 0
Integrate[1/x, x]
Out[29]= x == 0
Out[30]= Log[x]
where the equation x == 0
is ignored by Integrate
.