Logical fallacy

Correlation implies causation

Two phenomena occur together or vary together, so one is said to cause the other. The pattern alone leaves open coincidence, reverse causation, and other explanations.

An ice-cream cone and a swimming pool rising together beneath a hot sun

Examples

Hot days have more ice cream sales and more swimming. Thus ice cream purchases cause people to swim.
Warm weather can increase both activities. Comparing only when sales and swimming rise does not establish the effect of buying ice cream.
Readers who own more books get higher scores. Buying books alone therefore raises test scores by that difference.