Nitzavim-Vayelech (Deuteronomy 29:9-31:30 )
And you shall choose life, so that you will live, you and your offspring. (Deut. 30:19
The Torah stresses that choosing life is not only for the benefit of the one making the choice, but also for the benefit of his offspring so that they will live. How does your decision to want life help your children? Don't they have to choose life as well?
It is possible for a person to learn Torah and do mitzvos, and yet these actions won't have any positive effect on his children. If one does mitzvot because he believes in God and knows that he has to do it, but does so half-heartedly, or with the attitude that they are a heavy burden, his children may well choose not to follow his path of Torah and mitzvot. For example, after spending $100 on an etrog he says, "Oiy, s' iz shver tzoo zaiyn a yid" (it is hard to be a Jew). Naturally, his children will be reluctant to follow the Torah. They'll reason, "Our father is doing all this because he has to. We are not as strong as him and it is just too hard for us to keep the Torah."
However, if one does mitzvot with joy and pride, making it clear that this is what gives him life and energizes him, then they will want to experience the same enjoyment in life that their father experienced. Therefore the Torah tells us, "You shall choose life in a way that will inspire your children to choose it and live." (1)
1. R' Moshe Feinstein.