Experiments, observational studies and the question

An experiment imposes treatments while an observational study only records, so only an experiment with random assignment can show cause and effect; a confounding variable linked to both variables offers another explanation, and only a random sample lets us generalize to the population.

From AP Statistics.