In your second definition for M
you have the expression
((Exp[Total[
Log[1 - (1 - (1 + 2*\[Xi]*y)*Exp[-2*\[Xi]*y])^\[Mu]]^(\[Nu] -
1)]] /. (\[Mu] -> RAND1)) /. (\[Nu] -> RAND2)) /. \[Xi] ->
RAND3
which is a tensor of rank 3. We can describe it as a 10 by 10 matrix whose entries are vectors of length 1000. Then you call Mean
on {this thing}
, which gives back this thing
. You multiply this tensor element-by-element by a numerical vector of length 1000. I wonder if this is what you want.