I’m a newbie in Mathematica and I am currently practicing on utilizing the Probability functionalities. Attached is a notebook on a Joint Probability problem. I have worked out the answer manually but unfortunately its not the same as in Mathematica. I’m not sure where I have gone wrong in setting up the answer and I would appreciate any guidance that I can get.
Your problem description describes a parallelogram shaped region of uniform probability in the x y plane, but your implementation is for a rectangular region. I think you want
Probability[
2 x + z == n, {x, z} \[Distributed]
ProductDistribution[DiscreteUniformDistribution[{-2, 4}],
DiscreteUniformDistribution[{-1, 1}]]];
DiscretePlot[%, {n, -6, 10}, ExtentSize -> 1/3]