Hasty generalization is an informal fallacy of faulty generalization by reaching an inductive generalization based on insufficient evidence—essentially making a hasty conclusion without considering all of the variables. In statistics, it may involve basing broad conclusions regarding the statistics of a survey from a small sample group that fails to sufficiently represent an entire population. Its opposite fallacy is called slothful induction, or denying a reasonable conclusion of an inductive argument (e.g. "it was just a coincidence").
Hasty generalization usually shows this pattern
For example, if a person travels through a town for the first time and sees 10 people, all of them children, they may erroneously conclude that there are no adult residents in the town.
Or: A person is looking at a number line. The number 1 is a square number; 3 is a prime number, 5 is a prime number, and 7 is a prime number; 9 is a square number; 11 is a prime number, and 13 is a prime number. Therefore, the person says, all odd numbers are either prime or square. In reality, 15 is a counterexample.
The fallacy is also known as:
When referring to a generalization made from a single example it has been called the fallacy of the lonely fact or the proof by example fallacy.
When evidence is intentionally excluded to bias the result, it is sometimes termed the fallacy of exclusion and is a form of selection bias.