summaryVector function

Calculates statistic for the received vector.