The Lenovo website says up to 9 hours of battery life, and this is based on Windows 7. If you are using it for browsing the web and coding, you should expect 7-8 hours, maybe a little less. This is because Ubuntu uses more power than Windows. The drivers on the computer are designed to work with Windows, and so when you use Ubuntu, not all of them are used and this takes up power. If you are concerned with battery life, take a look at some power saving tweaks here.
A tool I have used to improve Ubuntu's battery life is Jupiter. I find that it is really nice because it changes some parameters and settings on your computer based on whether your computer is on battery power or is connected to a power source.
To install it, open up Terminal in Ubuntu (Dash -> Search for Terminal) and use the following code:
sudo add-apt repository ppa:webupd8team/jupiter
sudo apt-get update
sudo apt-get install jupiter
You can also try powertop. This helps with debugging what processes eat up your power. Read more about it here.