A quantitative test of the 'economic' and 'optimal' models of escape behaviour