# Testing two proportions of a multinomial distribution

I am wondering if there is a statistical procedure to test if two proportions from a multinomial are equal. For instance: I take a sample of animals in a reserve in South-Africa and count the number of each animal. I find that there are 200 zebras, 180 antelopes and 750 other animals. How to test if the proportion of zebras is equal to the proportion of antelopes? Preferably in R, but if such a procedure exists I'll be very grateful.

• This sample is a random sample of $200$ zebras and $180$ antelopes from the combined population of all zebras and antelopes. That reduces your question to a well-understood one that I'm sure you know how to answer! One solution in R is prop.test(200, 200+180).
– whuber
Commented Sep 5, 2023 at 14:42
• Thanks for answering whuber! Is it statistically speaking alright to make abstraction of all the other animals and just see it as a binomial distribution of 53% zebras and 47% antelopes?
– Noah
Commented Sep 6, 2023 at 15:15
• Yes, provided your focus is solely on zebras and antelopes. If you also plan on comparing other types of animals in the same sample, then you would prefer a generalization of the two-sample test of proportions, such as a chi-squared test.
– whuber
Commented Sep 6, 2023 at 19:03
• @whuber: $n$ is assumed to be fixed in the binomial test. But now, the total number of zebras and antelopes is clearly random. Isn't this a problem? Is the test only valid if we condition on the fact that we observed 380 zebras and antelopes or also if we consider this total number as random? Commented Oct 24, 2023 at 13:33
• @retodomax That's a good consideration, but it's not a problem. The Binomial test is conditional on $n.$ The best way to appreciate this, though (IMHO) is to compute the likelihood: you will see that nothing depends on the distribution of $n.$
– whuber
Commented Oct 24, 2023 at 13:58