Expanding on conifold's comment, the statement "People who smoke get Cancer" is vague. By vague I mean we don't know what quantifier, if any, precedes the formalization of "people who smoke." Do you mean that: "every person who smokes get cancer, which will include a "∀" (universal quantifier) binding the variable, or do you mean a certain, well quantified (percentagewise), subset of people who smoke get cancer?
Former is elementary we can use Hempelian Confirmation, and we get an easy counterexample to the universal generalization. From that we can conclude that the generalization is false, but can we say the person committed a fallacy?
For the latter, however, we need a much finer system than crude predicate logic (we will need Probability Theory). Which, by the way, comes with its own set of fallacies one ought to avoid. Do statisticians commit hasty generalizations?
Before going any further, we know for certain that "hasty generalization" is not a formal fallacy. Therefore, since it's not, it's to an extent subjective. Subjective in the sense that a person hastily generalizing isn't quantifying some sample size, nor are they bothered to include a control group. So what does that mean?
Simply put, almost every generalization beyond authoritative studies are hasty generalizations. A generalization might turn out to be true, but that would be nothing other than a fluke. That said, statisticians sometimes commit hasty generalizations too, it's just that their fallacies are not so easy to catch. All this, then, boils down to (a) credibility (do you believe the person who is generalizing to be a credible/honest individual, do you believe they are truthfully conveying their experience, etc.), and (b) authority (Medical studies, Statistics, etc).
Credibility is more for informal arguments/settings.
I would say 3 easiest ways to catch a hasty generalization are:
- Counterexample.
- Credibilty. (Noncredible doesn't necessarily mean every generalization they make is hasty)
- Authority. (Authoritative doesn't necessarily mean every generalization they make is "non-hasty")