Question: help migrating old maple code with "stats" commands

Can anyone help me convert this outdated maple code into something current? Particularity I need help finding the equivalent command to "stats:-empirical" as I can't even find documentation for it.

 

with(stats): with(linalg): with(StringTools):

P1:=matrix([[.6,.3,.1],[.4,.5,.1],[.3,.4,.3]]);

j:=1:  res:="S":

for i to 50 do  

    j:=random[empirical[op(convert(row(P1,j),list))]](): 

    res:=cat(res,"SCR"[j]) 

end do:

res;

     "SSSSSSCSCCCSSCSSRRCCRRSSSSSSCCCSCCCSSSCSCSRCCCSCRSS"

 

Thanks,

Paul Vrbik

Please Wait...