Detect dramatic increase in proportion among multiple classes I would like to use some tool to detect spike in one class's proportion.
Assume I received roughly the same percentage of red, blue and yellow candies throughout time. That means the absolute number can go up and down for each type of candy but the percentage for each candy will stay roughly the same. For example, it could be

*

*80 red (28%), 90 blue (32%), 110 yellow (39%)

*1 red (33%), 1 blue (33%), 1 yellow (33%)

And these are totally fine.
I want a tool to statistically detect when a particular percentage is larger than usual. For example, let's say one day i received 5 red (71%), 1 yellow and 1 blue. That will trigger the warning that the percentage for red is abnormal.
My gut instinct told me i should use Chi-square test to test one class vs. the rest of the classes. Is that correct?

First transform your observations into proportions, as you have mentioned. Then you can apply some outlier detection method. Using z-score or Median Absolute Deviation on each class will probably work quite well for a few classes.
Note: for N classes, the proportions can be fully described by N-1 numbers. Since the proportions sum to 100%. So one column is a redundant column and can be dropped.
