Japan's economy expanded at an annualized rate of 4.0 percent, compared with a median estimate for a 2.5 percent annualized increase in a Reuters poll.