You can use any one of those patterns, but you need 'the end of' before '2011'. 'By 2011' could mean 'at the start of 2011'.
As the year is so recent, your readers will want to know more exactly when in 2011 the population figure was reached.
It wouldn't matter if you were writing historically: 'By 1745, the population. . . .'
- For Teachers