Question: mean of a matrix

What's the standard (or a cool non-standard)  way to compute the expected value of a matrix, e.g., a covariance matrix? Using this code:

restart; with(LinearAlgebra): e1 := Statistics:-RandomVariable(Normal(0, sigma)); L := [seq(e1*cos(pi*t), t = 1 .. 3)]; convert(L, Matrix); Transpose(convert(L, Matrix)); M := Multiply(%, %%); S := map(Statistics:-Mean, M)

how do I simplify S to the matrix of +/- one's and factor out sigma^2 outside the matrix? Thanks. 


Please Wait...