Proof by example (also known as inappropriate generalization) is a logical fallacy whereby one or more examples are claimed as "proof" for a more general statement.
This fallacy has the following structure, and argument form:
I know that X is such.
Therefore, anything related to X is also such.
I know that x, which is a member of group X, has the property P.
Therefore, all other elements of X have the property P.
The following example demonstrates why this is a logical fallacy:
I've seen a person shoot someone dead.
Therefore, all people are murderers.
The flaw in this argument is very evident, but arguments of the same form can sometimes seem somewhat convincing, as in the following example:
I've seen Gypsies steal. So, Gypsies must be thieves.
However, argument by example is valid when it leads from a singular premise to an existential conclusion (i.e. proving it is true for at least one case instead of for all cases). For example:
Socrates is wise.
Therefore, someone is wise.
I've seen a person steal.
Therefore, people can steal.
This is an informal version of the logical rule known as existential introduction (also known as particularisation or existential generalization).