The main task in causal inference is predicting the outcome of an intervention. For example, a treatment assigned by a doctor that will change the patient’s heart condition is an intervention. Predicting the change in the patient’s condition is a causal inference task. In general, an intervention is an action taken by an external agent that changes the original values, or the probability distributions, of some of the variables in the system. Besides predicting outcomes of actions, causal inference is also concerned with explanation: identifying which were the causes of a particular event that happened in the past.