Why does my iPhone randomly reboot?

I've recently replaced the screen on my iPhone 4s with success but to my dismay, my iPhone randomly restarts. During the tear down of the iPhone i accidentally ripped the ribbon to the battery connecter and the battery resulting in me having to buy another battery off of ebay. Now i don't know if this issue could be because of the aftermarket battery, or a malfunctioning in the logic board (i hope not!). The phone worked fine before i replaced the screen, and I have not had any other problems. The reason I think this issue might be the battery us because sometimes when the iPhone restarts it shows different battery percentages i.e 28% then after restart it could be 14%. The phone is also not water damaged. Any help would be much appreciated!

This is a battery issue coming from low quality batteries. The low-quality batteries you buy for cheap on ebay usually do no pass OEM quality standards, and instead of being destroyed they are instead diverted from disposal and offloaded for sale through alternate channels to benefit unscrupulous factory workers.

These batteries do may charge, and may appear genuine, often seeming to be normal during initial operation, but they cannot provide consistent amperage during use. They are defective in their ability to provide the necessary current required to run the devices they are designed for. Consequently, whenever the phone attempts to draw too much power from the battery, the battery can instantly fail to provide the necessary current to run the device at all, and the phone will reboot.

iPhone 4S Repair

I have had this problem where I work at XpressFix. You can see us at XpressFix iPhone 4S Repair or iPhone 4S Repair Orlando. Check to make sure the iphone 4s battery connector to the logic board did not come unsoldered. As is separates from the logic board it could cause a reset. Some DIY guys came in and had actually separated the phones induction point from the logic board. Though it was hardly noticeable, we could see underneath. It was barely bonded to the mother board on the iphone. Anyway, hopefully you had some luck with you precious Apple.