Conditional Likelihood from Joint Event Distribution - Coding problem | OneNoughtOne