Your chances of losing your baby do decrease as your baby grows, but the chances are never gone. Babies might die after they are born, during delivery, a week before their due date, or any other time.
"Miscarriage is the loss of a pregnancy in the first 20 weeks. About 15 to 20 percent of known pregnancies end in miscarriage, and more than 80 percent of these losses happen before 12 weeks. This doesn't include situations in which you lose a fertilized egg before you get a positive pregnancy test. Studies have found that 30 to 50 percent of fertilized eggs are lost before a woman finds out she's pregnant, because they happen so early that she goes on to get her period about on time. If you lose a baby after 20 weeks of pregnancy, it's called a stillbirth....
Once your baby has a heartbeat — usually visible on ultrasound at around 6 weeks — your odds of having a miscarriage drop significantly."
http://www.babycenter.com/refcap/pregnancy/pregcomplications/252.htmlMost miscarriages are caused by problems with the baby. The baby often isn't healthy enough to live and grow. Other miscarriages may be caused by a variety of things including smoking, drinking, and drug use (that includes illegal drugs, legal drugs your doctor gives you, and over the counter drugs as well). The link above has more causes of miscarriage as well if you want to read more.