Fitting empirical distribution to theoretical ones with Scipy (Python)?

前端 未结 9 829
醉话见心
醉话见心 2020-11-22 05:28

INTRODUCTION: I have a list of more than 30,000 integer values ranging from 0 to 47, inclusive, e.g.[0,0,0,0,..,1,1,1,1,...,2,2,2,2,...,47,47,47,...]<

9条回答
  •  忘了有多久
    2020-11-22 05:56

    Forgive me if I don't understand your need but what about storing your data in a dictionary where keys would be the numbers between 0 and 47 and values the number of occurrences of their related keys in your original list?
    Thus your likelihood p(x) will be the sum of all the values for keys greater than x divided by 30000.

提交回复
热议问题