I added a median function to test_stats

I added a median function to test_stats