This is extraordinarily dull, the result is not the integral, but the length of the integration interval, if one integrates {d, 0.01, 4.2}
- guess what - the result is 4.2 - 0.0.1 = 4.19 and so on
In[116]:= NIntegrate[
Product[If[R[priors, sigma, d, c] < L[priors, sigma, d, c],
0, (CDF[NormalDistribution[(c - 1) d, sigma],
R[priors, sigma, d, c]] -
CDF[NormalDistribution[(c - 1) d, sigma],
L[priors, sigma, d, c]])], {c, 1, k}], {d, 0.01, 4.2},
PrecisionGoal -> 30, WorkingPrecision -> 60]
Out[116]= 4.19000000000000017742751712290782961645163595676422119140625
In[117]:= NIntegrate[
Product[If[R[priors, sigma, d, c] < L[priors, sigma, d, c],
0, (CDF[NormalDistribution[(c - 1) d, sigma],
R[priors, sigma, d, c]] -
CDF[NormalDistribution[(c - 1) d, sigma],
L[priors, sigma, d, c]])], {c, 1, k}], {d, 0.01, 2.7},
PrecisionGoal -> 30, WorkingPrecision -> 60]
Out[117]= 2.69000000000000017742751712290782961645163595676422119140625
because the max value of the CDF is 1 that means that somehow under integration the functions do not evaluate or have always their maximum value and so the result of integration is just 1 * (dmax - dmin)
.
Your usage of the Do
is at least strange. It could be rewarding to make variables explicit - the dependency from e is working only through the priors
table ...