adds check_independence method to JointProbabilityDistribution class