Discrete random variable and discontinuous function like switch is usually problematic. I suggest trying to reparameterize them into continuous RV and functions, see for example:
1 Like
Discrete random variable and discontinuous function like switch is usually problematic. I suggest trying to reparameterize them into continuous RV and functions, see for example: