The study of physical processes often requires testing alternative hypotheses on the causal dependencies among a set of variables. When only a finite amount of data is available, the problem is to infer the correct hypothesis with the smallest probability of error. Here we show that quantum physics offers an exponential advantage over classical physics in the task of identifying the effect of a given variable, out of a list of candidate effects. We find that a quantum setup can identify the true effect with exponentially smaller probability of error than the best setup for the classical version of the problem. The origin of the speedup is the availability of quantum strategies that run multiple tests in a superposition.