# Calculating p-values for ratios of binomial variables

I have a problem that I will express in 2 ways: a math-y way and a biology way. Hopefully this will make it more clear.

Math-y way:

I have N observations of a pair of binomial variables, call them R and D. Each time I observe them, I do n trials and observe k successes to get an estimated binomial probability p. For each observation, I am interested in the ratio R/D, a.k.a. the ratio of the paired binomial probabilities. I have done N observations of this ratio for group 1, and M observations of this ratio for group 2. I would like to know whether these two groups are significantly different. Some caveats are that M,N are small, i.e. 2-3, and for some of the observations, the number of trials for either R or D is low, so I'm thinking that normal approximations may not work here.

Biology way:

I have a community of ~30 microbes, and each one expresses the same gene (call it YFG1). I can measure the relative abundance of each microbe in the community, as well as the relative amount of each microbe's YFG1 transcription via high-throughput sequencing. So for each microbe, I have both RNA and DNA data. For each type of data, I know the number of reads that map to the microbe, and the total number of mappable reads. I'm interested in the YFG1 RNA/DNA ratio for each microbe under different conditions, and so I've collected data 2-3 times at each condition of interest. I would like to know if there are any conditions in which a particular microbe significantly up- or down-regulates YFG1 expression.

I know that the ratio of two binomial variables does not have a finite variance, since dividing by zero is a possibility, but I was wondering if it was possible to know whether two groups of binomial ratios are significantly different? I'm open to simulations, as long as I know what to simulate :). I've been running around in circles on this one and was hoping y'all could shed some light.

• Having a variable on the denominator that can be 0 with prob>0 is problematic; how are you dealing with this? May 10, 2018 at 1:45
• I would naively think that I could throw out any observations with a DNA count of zero, but I'm certainly open to suggestions :). May 10, 2018 at 20:12
• Why would you throw out the count-pairs that corresponded to the strongest indication of a high (or low) ratio? It might be better to rethink what the ratio is supposed to tell you (e.g. if you're trying to estimate a population ratio, the raw sample ratio may not be the best approach to estimating it) May 10, 2018 at 23:03
• I might throw them out because a count of 0 for a microbe could indicate that whole sample had a low number of total reads, and therefore have too high of a count variance to be useful. But then again there may be a method to extract useful info in this case? I'm not sure. In my mind, the ratio is supposed to tell me the amount of transcription of YFG1 on a per-microbe basis, and that by measuring this ratio across several replicate samples, I'd be able to see how much this ratio varies within a certain condition, and consequently whether this ratio varies significantly between conditions. May 11, 2018 at 0:02
• You should be focusing first on what you're trying to achieve (and then finding out the best way to achieve that) rather than choosing in - an ad hoc fashion - how to manipulate the data without reference to what you're trying to find out. If it's binomial as you assert then the zero certainly has information. May 11, 2018 at 2:55