Question: real-world example in which hidden variables may be an issue

title: Correlation does not imply causation
text: Well - designed experimental studies replace equality of individuals as in the previous example by equality of groups . The objective is to construct two groups that are similar except for the treatment that the groups receive . This is achieved by selecting subjects from a single population and randomly assigning them to two or more groups . The likelihood of the groups behaving similarly to one another ( on average ) rises with the number of subjects in each group . If the groups are essentially equivalent except for the treatment they receive , and a difference in the outcome for the groups is observed , then this constitutes evidence that the treatment is responsible for the outcome , or in other words the treatment causes the observed effect . However , an observed effect could also be caused `` by chance '' , for example as a result of random perturbations in the population . Statistical tests exist to quantify the likelihood of erroneously concluding that an observed difference exists when in fact it does not ( for example see P - value ) .