Analogies are comparisons. Examples are not comparisons.
If we are talking about, say, why it is a good idea to have a savings account. I might attempt to prove the point through...
- ...an example: Savings accounts allow you to put money away for the future, helping to prepare you for major purchases such as a car or a house. When you decide it's time to start shopping for a car, you will be glad that you started a savings account because you will have some money for a down payment.
- ...or an analogy: Starting and keeping a savings account is like what squirrels do to prepare for winter. Squirrels store nuts in hiding places because they understand that once winter comes they will need that food and will not be able to find fresh nuts in the wild, under the snow, etc.
As we see here, an analogy attempts to elucidate a situation through comparison while an example seeks to support or expand on a point through direct logical extension from the premise/thesis.
Analogy is a part of language that basically refer to resemblance or similarity. Analogy means comparison between two things that have some quality in common, in order to understand them. Like for example;
- He is quick as a rat
- Wise as an owl
- Dark as night
Metaphors and similes are two types of analogies.
Example is basically a way to show or illustrate any thing you want someone to understand properly and quickly. In short it is a way to make your point clear or make it understood.