# Comparison of multiple frequencies - Which test should I use?

I set up un experiment in which I count the number of female flowers per plant, the number of male flowers and the number of hermaphrodite flowers. I apply 6 different treatment on my plants. I want to know if the treatments have a significant effet on the number of female, male and hermaphrodite flowers.

My plants don't have the same total number of flowers, that's why I decided to work on frequencies (for example : Number of female flowers / total number of flowers). So for each plant, I have 3 numbers ( one for each type of flower), from 0 to 1. I have five independant replications for each modality.

Which test can I use to know if the number of female/male/hermaphrodite flower per plant is different according to the treatment? Knowing that it's frequencies....

( I am using the software R)

• Fit Poisson regression model with random plant-specific intercept . Jul 31, 2019 at 16:21
• Hi, Can I use this even if I don't have only 2 proportions to compare ?
– CM31
Jul 31, 2019 at 16:35
• Are you interesting on # of flowers or % of flowers? Poisson model is for # of flowers. Jul 31, 2019 at 16:40
• I want to compare the % of female, male and hermaphrodite flowers per plant between my 6 treatments
– CM31
Jul 31, 2019 at 16:54
• Thanks for your help, can you affirm that I can't use an ANOVA/ kruskal with this kind of data ?
– CM31
Jul 31, 2019 at 16:56

With four treatments (columns) and 30 flowers per treatment, simulated to have different proportions of F, M, H flowers per treatment, I got the following data table:

DTA
[,1] [,2] [,3] [,4]
[1,]    8    9   12    8  # F
[2,]    7   14   14    2  # M
[3,]   15    7    4   20  # H

Results are not always as expected. For example, Treatment 1 was simulated to select among M, F, and H with equal probabilities, but it happens that half of the flowers there are H's. With relatively small samples, such anomalies are common. So without statistical analysis we cannot say whether there is a clear pattern of differences among theoretical mechanisms.

Here is one possible analysis using R: A chi-squared test for homogeneity rejects the null hypothesis that treatment makes no difference in proportions of F:M:H flowers observed. The P-value 0.0002 is much smaller than 5%, so the effect of treatments is highly significant.

fmh.out = chisq.test(DTA);  fmh.out

Pearson's Chi-squared test

data:  DTA
X-squared = 26.27, df = 6, p-value = 0.0001983

The Pearson residuals with large absolute values draw attention to the fact that Treatment 4 has fewer M and more H flowers than would be expected if treatments had no effect. Also Treatment 3 has fewer H flowers than would have been expected.

fmh.out$resi [,1] [,2] [,3] [,4] [1,] -0.4109975 -0.08219949 0.9041944 -0.4109975 [2,] -0.7397954 1.56179038 1.5617904 -2.3837853 [3,] 1.0320937 -1.32697761 -2.2116293 2.5065133 If the null hypothesis were true, one would expect counts in the 12 cells of the table to be approximately as shown below: fmh.out$exp
[,1]  [,2]  [,3]  [,4]
[1,]  9.25  9.25  9.25  9.25
[2,]  9.25  9.25  9.25  9.25
[3,] 11.50 11.50 11.50 11.50

In order for the chi-squared statistic to have approximately a chi-squared distribution, these expected counts should be mainly greater than 5 (perhaps with one or two at most as low as 3).

Note: Another recent Q&A shows a similar test.

• Hi Bruce, Thanks a lot for your answer!! I will try that. But then, do you think I should work with percentages of flowers ? ( For exemple, 70 F, 20 M and 10 H ; Or do you think it's better to work with my "real numbers" ; before dividing the numbers with the total number of flowers ; I have for example 1049 F, 236M and 26 H.
– CM31
Aug 2, 2019 at 12:23
• ( Knowing that the total number of flowers is different between the plants)
– CM31
Aug 2, 2019 at 12:40