I have some attributes for each of the product based on these calculations I want to update the product in admin. Can somebody please tell me how to do it?
You could do this by a regular process that runs through all products but that could be a bit wasteful. The alternative which would require more effort to get right in all instances is to write an extension that listens for product update events and then performs the calculation at that point.
This stackoverflow post shares a couple of the events that you would need to listen to: https://magento.stackexchange.com/a/9068/26