Adds median() method

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Adds math tests for avg, sum, median

Signed-off-by: Trevor Norris <trev.norris@gmail.com>