Using such expressions as “for example,” “for instance,” "such as," and “including” correctly is important. What the expressions have in common is that they talk about some members of a class but not all of them. “Namely,” on the other hand, precedes an exhaustive list.
Consider a hypothetical experiment to test pesticides. You tested three pesticides, A, B, and C, all of them of the type known as contact poisons (effective when they are in direct contact with bodies of the target pests—as against stomach poisons, which have to be ingested). And those were the only pesticides you tested. To mention them, you could rightly say “three pesticides were tested, namely A, B, and C.” However, if you say “the pesticides tested included contact poisons A, B, and C,” you give the impression that you tested more than three because the verb “include” is never used when all members of the class are listed. Similarly, the phrases “such as,” "for example," and "for instance" signal that the list that follows is illustrative, not exhaustive. In discussing your results, you are likely to mention a few other pesticides, and you may write “Contact poisons such as A, B, and E are more effective than stomach poisons such as X, Y and Z are in controlling caterpillars.”
Also note that if you use “such as,” do not end the list with “etc.” Incidentally, most publishers now recommend using “namely” instead of the Latin abbreviation “viz.”, (for videlicet, the z being the old symbol denoting the contraction et).