The Office for National Statistics said the economy expanded by 0.4% whereas analysts had predicted no growth.