I'm computing the max over a set of uniformly distributed random variables. I know that this value converges to 1 as the number of variables increases. Mathematica is having difficulty computing the approximation for larger values of n
:
ListPlot[
Table[NExpectation[Max @@ Table[x[i], {i, 1, n}],
Table[x[i] \[Distributed] UniformDistribution[], {i, 1, n}]], {n,
1, 10}]]
Notice that the approximation is near 0 for one of the points, and I get several warnings:
Why is this happening? Is it possible to fix?
It looks like it could be related to the option MaxPiecewiseCases
, but I can't seem to specify that from the call to NExpectation
.