Median fucntion required for learning report