When I enter the following commands:
s = [2 1 0.5;1 2 1;0.5 1 2];for k=1:5000 d(:,:,k) = iwishrnd(s*96,100);endm = mean(d,3)sd = std(d,0,3)
I receive the following output:
m = 2.6236 1.0813 0.4332 1.0813 1.8743 0.7485 0.4332 0.7485 1.5013 sd = 0.3864 0.2524 0.2072 0.2524 0.2703 0.1903 0.2072 0.1903 0.2206
The expected value of the draws should be the same as "s." Also, the variance of the draws should be the same for each element along the diagonal.
Best Answer