I hate to agree with the pro-life crowd here but I do need to clear up some stuff.
Yes you can get a (+) pregnancy test before the egg has implanted yet still miscarry. This is called a 'chemical pregnancy' and they are VERY common. Most people who not even know they were pregnant. The only ones who do are usually woman actively TTC (trying to conceive) so they find themselves obsessively taking tests esp early ones just in case.
This actually happened to a friend of mine last month. She got a (+) at 3 weeks 4 days then went on to miscarry at just about 4 weeks. Had she not been TTC she would not even known she was pregnant. She would have just assumed it was her period.
A Chemical Pregnancy is a Miscarriage Early in the Pregnancy