Ying's favorite candy is available with or without peanuts. He wonders if the color distribution is the same for both varieties, so he buys a large bag with peanuts and a large bag without peanuts and tallies the colors in each bag.
What type of statical test used in this case?

A. A χ2 goodness of fit test
B. A χ2 test for homogeneity
C. A two-sample z-test for a proportion
D. A χ2 test of independence
E. A t-test for slope