I'm trying to integrate the following expression:
f[a1,p1+p2+p3+p4]*f[a2,p2+p3+p4]*f[a3,p3+p4]*f[a4,p4]
Where
f[x_, u_] := E^(-(x - u)/2)/(2*(1 + E^(-(x - u)/2))^2)
i.e. the PDF of the logistic distribution with s=2.
Also, the a's are positive integers.
The tricky part is that I want to integrate over all values of the p values that result in them forming a valid probability distribution, ie the p variables must be greater than zero, less than one and sum to 1.
I've tried using a definite integral with the following limits (after substituting p4 with $1-p1-p2-p3$:
{p1,0,1},{p2,0,1-p1},{p3,0,1-p2-p3}
This works for a simplified version of the problem (with 3 or 2 "f" terms and p variables but as soon as I use 4 it takes about 20 minutes and then just returns the input. My instinct is that if it can be analytically found for 3 terms, 4 terms should also be findable, just with more terms.
My question(s) are:
1) Does anyone have any suggestions to get Mathematica working for this (and larger problems)?
2) I'm not tied to the logistic distribution, I'm using it because I thought it's simple CDF would make the problem easy for Mathematica. Can anyone suggest a similar shaped distribution that would make this problem tractable?
NIntegrate
? I understand that a symbolic solution is desirable. But is a symbolic solution essential? $\endgroup$Simplex[]
instead:Integrate[expr, {p1, p2, p3} ∈ Simplex[{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}]
$\endgroup${p3, 0, 1-p1-p2}
. $\endgroup$