What's wrong with the median price calculation?

in #steem6 years ago (edited)

Run the following scripts with Python:

print(s.get_feed_history()['current_median_history'])

{'base': '0.340 SBD', 'quote': '1.000 STEEM'}

for i in s.get_feed_history()['price_history']:
    print(i['base'][:-4])

0.356
0.356
0.355
0.320
0.318
0.308
0.309
0.309
0.308
0.309
0.309
0.307
0.306
0.305
0.303
0.304
0.305
0.307
0.309
0.310
0.309
0.308
0.308
0.308
0.308
0.311
0.311
0.328
0.329
0.331
0.333
0.334
0.335
0.336
0.335
0.331
0.331
0.332
0.332
0.334
0.333
0.333
0.332
0.331
0.334
0.342
0.340
0.341
0.344
0.356
0.352
0.350
0.352
0.355
0.355
0.351
0.350
0.347
0.347
0.348
0.347
0.346
0.343
0.343
0.343
0.347
0.350
0.352
0.351
0.350
0.350
0.352
0.355
0.357
0.357
0.354
0.354
0.354
0.354
0.353
0.352
0.347
0.342
0.342

The median of the numbers below should match 0.340, but it does not. Do you know what should be the problem? This is definitely not the problem related to the haircut.

Sort:  

Congratulations @jhwang! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Do not miss the last post from @steemitboard:

Carnival Challenge - Collect badge and win 5 STEEM
Vote for @Steemitboard as a witness and get one more award and increased upvotes!

Congratulations @jhwang! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.029
BTC 57028.16
ETH 2358.36
USDT 1.00
SBD 2.40