Have you installed 3.1.3? It is supposed to resolve this issue.
I would suggest restoring to factory settings, and then avoid restoring from a backup, if you can. Try just simply restoring, then setting it up as a new phone, then just re-syncing all of your data on there.
This issue is obviously a software related issue, and presumably every time you restore from a previous backup you're just passing along whatever it is that is generating these results.
Hey guys, I restored my settings and it happened again. I will try some of the other ideas
Well, I really only have one idea left. After doing a fresh restore/setting it up as a new phone, re-sync all your data (not from a backup, basically what I said in my last post), then try calibrating the battery.
It's a pretty simple process, basically drain the phone completely, and then continuously turn it on after it has died for the first time, it will take 3-4 times (of turning it on and it'll stay on for a few seconds) before it will no longer even turn on. Then plug it into a power supply, and leave it there (preferably un-used during this period, I'd suggest overnight) until fully charged.
If none of that works, I would most definitely take it back.
I had this problem where the percentage would go up surprisingly fast, then it would drop a percent every 10 seconds...
They replaced it at the Apple store. I would bring it back.