Imagine two bar charts with x-axis of 1,2,3,4. The first has 2,4,2,4 as the height for each container ( ie there are 2 1s, 4 2s etc). The second has has 6,12,6,12. I want a percentage from 0 to 100% of how closely the first one matches the second (in essentially being a kind of subset). In this example, it would be 100%. Say we had a third of 6,11,6,12. I would want that percentage to be the ~80% or 90%s wherever it may lie. Is this possible?

  • $\begingroup$ Please explain the criterion you are using to "match" a chart. Could one reorder the bars in one chart, for instance? Must the bars all have positive nonzero heights? Must they always be whole numbers? What do the heights represent? What do you mean by "subset"? And what exactly is a number like 80% supposed to measure? $\endgroup$ – whuber Feb 24 '17 at 0:56
  • $\begingroup$ No reordering the bars, The bars will be 0 or positive, never negative. They will always be whole numbers. The heights represent the number of times a number( such a 1 occurs in the dataset) By subset, I mean that the latter boxplot will be the original plus some newer data. The 80% is supposed to be an indicator of how closely the the latter dataset represents the earlier dataset. $\endgroup$ – FamousFrik Feb 24 '17 at 1:22
  • $\begingroup$ That clarifies much of your question. But since there are infinitely many ways to measure "closeness," could you articulate what your measure is intended to represent? What is the purpose of this exercise? $\endgroup$ – whuber Feb 24 '17 at 14:16
  • $\begingroup$ To come to some conclusion on how matching in shape two bar charts or rather two discrete probability distributions are. $\endgroup$ – FamousFrik Feb 24 '17 at 15:21
  • $\begingroup$ That's too vague to allow any kind of objective response: what kind of conclusion, exactly? In what sense should the "shapes" be measured and "matched"? $\endgroup$ – whuber Feb 24 '17 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.