I need expected values of a list where the random variable to take expectations over should be an input into expressions defined earlier. I suspect Set[] and SetDelayed[] tripped me. (Or Map and Table?)
I hope the intention is reasonably clear from the code: I am interested in expressions of six numbers in [0,1] where I suspect (model) that they have been measured with error (errors being independent and uniform here, but answers truncated to lie in the meaningful range anyway). I don't get the solution I expect, only an expression substituted into.
Input:
AList = {a1,a2,a3,a4,a5,a6}
answers := (Min[1,Max[# ,0]])& /@ (AList+errors)
dlist ={answers[[5]],answers[[6]],answers[[3]]/answers[[1]],answers[[4]]/answers[[2]]}
deltasbetas = Expectation[dlist,errors\[Distributed]Table[UniformDistribution[],{6}]]
(note that errors are defined within Expectation, as I think it should be) Output:
{Min[1,Max[0,0.8 +UniformDistribution[{0,1}]]],Min[1,Max[0,0.7 +UniformDistribution[{0,1}]]],Min[1,Max[0,0.5 +UniformDistribution[{0,1}]]]/Min[1,Max[0,0.8 +UniformDistribution[{0,1}]]],Min[1,Max[0,0.4 +UniformDistribution[{0,1}]]]/Min[1,Max[0,0.7 +UniformDistribution[{0,1}]]]}


AListanderrors? – rm -rf♦ Jul 13 '12 at 13:39TransformedDistribution... but how?:) – kguler Jul 13 '12 at 14:41{e1, e2, e3, e4, e5, e6} \[Distributed] UniformDistribution[{{0,1},{0,1},{0,1},{0,1},{0,1},{0,1}}]instead of just oneerrorsvariable. – Silvia Jul 13 '12 at 14:56errors=Array[er,6]before you useerrors; and then useerrors \[Distributed] UniformDistribution[Table[{0, 1}, {6}]instead oferrors \[Distributed] Table.... – kguler Jul 13 '12 at 15:12Threadcomment. Regardingergoing undefined,errors=Array[er,{6}]defines errors as a list with 6 elements with nameser[1]thruer[6]. So, you can use the symbolerrorsinstead of{e1,e2,...,e6}. – kguler Jul 13 '12 at 15:46