Hi folks, I have a straightforward, but tedious probability problem that I need to expand symbolically. Sympy's set and interval material is close, but I can't see how it would work in a multidimensional application. I've used Sympy for some fairly intricate PDE problems, but never for this sort of thing, and I would appreciate any suggestions, please.
I have a number of events that appear as, for example 2 < X < 5 and 3 < Y < 8 which have associated probabilities and joint distributions (i.e. are not mutually exclusive). From basic probability and set theory p( 2<X<5 \cup 3<Y<8) = p( 2<X<5 ) + p( 3<Y<8 ) - p( 2<X<5 \cap 3<Y<8 ) and so on. My problems start with about 6 unions that are intersections fo 2 conditions each, all in 3 variables, so requires both the expansion above and reduction for intersecting intervals. It isn't difficult, just tedious (and error-prone). I was about to hand-roll the symbolic algebra as Python classes, but I was wondering if there was a way to approach this with Sympy's intervals module. It's not clear to me, from the docs or from experimentation, that it handles multi-dimensional problems. Best regards -- Simon -- You received this message because you are subscribed to the Google Groups "sympy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/qd4-NeUkPzIJ. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.