How are predicting and inferring related?