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.  
 A: As explained in this document, https://pdfs.semanticscholar.org/9988/59d48216848def1c97db875d6f923aa257a6.pdf, if the number of trials n is low, you should at least have larger values of the number of observations N. 
One way to go about your problem would be to analyze the data on your R variable separately from the data on your D variable. For each variable, you can use the N corresponding proportions of successes k/n as a basis for conducting a binomial logistic regression with condition as a predictor variable. This will help you estimate the probability of success p in a single trial under each condition, separately for each variable.
Let's say you have two conditions only: C1 and C2.  The above strategy will give you the estimated probability values phat(R, C1) and phat(R, C2) for the variable R, along with estimated probability values phat(D, C1) and phat(D, C2) for the variable R. You can now construct the ratio phat(R,C1)/phat(D,C1) and use it to estimate the true ratio p(R,C1)/p(D,C1). Similarly, you can construct the ratio phat(R,C2)/phat(D,C2) and use it to estimate the true ratio p(R,C2)/p(D,C2). Recall that p(R,C1) represents the (true) probability of success in a trial corresponding to the variable R under condition C1, etc. 
You can then use bootstrapping to compute percentile confidence intervals for each of the two true ratios. If the confidence intervals exclude the value 1 for both conditions, that will suggest evidence of a difference between R and D at each condition. (With more than two conditions, you may need to do some multiplicity adjustments to your confidence intervals.) You may need to log transform the ratio first, then do bootstrapping and look at whether the resulting confidence interval excludes 0. 
Of course, there is a problem with this approach if the variables R and D are correlated. See here, for example, for some references on how you might handle correlation between R and D in your modeling: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2798811/.
As always with research, you can start small and build from there. 
