was incorrectly calculating pX. should sum over the joint probabilities, not the conditionals