add Statistics test and fix behaviour on empty array