I am pretty sure this is not the right place to ask this question, so apologies in advance.
I have this simple problem:
dist = NormalDistribution[0, Sqrt[0.3]]; (* Distribution for wz[1] *)
expression = 0.2 + dt (uz[1] + wz[1]); (* Expression for which expectation is computed *)
expectation = Expectation[expression, wz[1] \[Distributed] dist]
Mathematica evaluates this simple expression numerically, and I get the following result: 1. (0.2 + 1. dt uz[1.])
Why? How can I avoid numerical evaluation without using Hold? uz and wz will belong to arrays (uzArray and wzArray) whose size will change every time I run the code.
Furthermore, I am struggling to understand how to use the function Moment with arrays. A simple program as the one that follows:
T = 5;
wzArray = Array[wz, T];
wzArray[[1]] \[Distributed] NormalDistribution[0, Sqrt[0.3]];
Moment[wzArray[[1]], 1]
Gives the following error: Moment::arg1: The first argument wz[1] is expected to be a vector, a matrix, or a distribution.
Thank you very much for any help you could provide!