Taking expectation of 3 dimension matrix
1 view (last 30 days)
I am trying to take the expectation of a function on two variables where the probabilities are markov process and it is 3dimension.
E(v(a',b',c'))= Sum(sum(v(a,b,c)*Q(b,b')*Q(c,c'))) where sums are on b and c and Q are the transition matrices.
I found it as below but i need to make it faster.
Nk=100, Nz=5, Ne=4
Q_z(Nz,Nz) is 5*5 transition matrix where sum of each row makes 1
Q_e(Ne,Ne) is 3*3 transition matrix where sum of each row makes 1