I'm looking if there is a name for what I'm trying to do.
TLDR: Market contains offers to exchange currency 1 for currency 2. I want to make a histogram showing total volumes of currency1 in specific price ranges, but making a histogram from the data shows number of offers in specific price ranges, not the amount of currency.
Shortcuts I'm using:
- kk - millions (500kk = 500 million)
- kkk - billions (5kkk = 5 billion =5000kkk = 5000 million)
Setup - there's a market in a videogame where players go to place offers to exchange currency 1 (YANG) for currency 2 (SD). I calculate an extra statistic, which is a rate calculated with 1000*SD/YANG
, which is a rate that shows how much SD does 1kkk YANG cost.
Example with an image: Below you can see an image showing a snapshot of the market at some point in time. (I cropped out an unnecessary column). In row 0 we can see that a player is offering 10000kk YANG (10kkk YANG) for 2500SD. Rate in this case (kkkPrice) is 250 SD/kkk YANG.
Now I wanted to analyze this, so I made some graphs, mainly histograms.
Problem: The problem for me lies in the bottom right graph. It's a histogram of the kkkPrice column, showing how many offers have which rate (bins are from 180 to 300 with step of 10)
We can see that in price range 250-260SD/kkk there are 97 offers out of 265 total (36.6%). Now when I manually filter out those offers and sum it up, I find out that those 97 offers are for 48 658kk YANG out of 317 153kk YANG total (15.3%).
In other words, 36.6% of offers contain only 15.3% of all the YANG offered.
This graphs shows how many offers are in each price range, but I would like to see how much YANG is in each price range. I don't know what it is called and if there's some predefined or simple way to calculate it instead of doing it myself (filtering each price range and summing it).