# Compare two quotient distributions

I have a biological sample and I test its response to two different stimuli $A_1$ and $A_2$. I repeat the measurements multiple times in a pseudo random order: e.g. $A_1$ $A_1$ $A_2$ $A_1$ $A_2$ $A_2$ ...

Now the sample undergoes a treatment and the two responses are measured again, now labeled with $B$: $B_1$ $B_1$ $B_2$ $B_1$ $B_2$ $B_2$ ...

I need to check whether the treatment has changed the relative responses, in other words, if $A_1/A_2$ is different from $B_1/B_2$.

Therefore want to compare the two quotient distributions $A_1/A_2$ to $B_1/B_2$.

First of all I need to obtain the quotient distributions. As there are multiple $A_1$ and $A_2$ values which don't come paired, my guess is that the best estimation would be to calculate the quotient of all possible pairings of $A_1$ and $A_2$. The distribution of these $A_1/A_2$ pairs is roughly a log-normal distribution, but the values aren't independent, as every $A_1$ value is used multiple times, as I pair it with every $A_2$ value.

Now I have to compare the distributions of $A_1/A_2$ with $B_1/B_2$. But as they are neither Gaussian, nor are they independent or paired, I haven't found a proper way of comparing them in a statistically sound way.

• Working on logarithmic scale would make things much easier here. For instance, you could compare $\log A_1- \log A_2$ against $\log B_1- \log B_2$ with the Mann-Whitney or the t-test for paired data. Otherwise it seems hard. – utobi Dec 1 '16 at 14:42
• Hmm, but why can I apply Mann-Whitney to the logarithmic data? The quotient or in the logarithmic case difference distributions are not independent, because to sample the A_1/A_2 distribution, I use all possible combinations of A_1 and A_2. So each A_1 value is represented multiple times. Same applies for A_2, B_1 and B_2. – Randrian Dec 1 '16 at 23:15
• The paired Mann-Whitney takes care of the dependency. Applying it as I suggested would tell you if the diffs are significantly different. Another thing you could do is permutation testing. – utobi Dec 2 '16 at 6:25
• But I don't have pairs of data. I don't understand how i should apply a paired test on that. Neither pairs of A_1 and A_2 belong directly together (as a pair) nor do A_1/A_2 to B_1/B_2 belong together as a pair. – Randrian Dec 2 '16 at 11:06
• What exactly is the difference between $A_1$ and $A_2$? Furthermore, do you have N probes on which you obtain N measurements of something (what is it?) or you are measuring N times on a single probe? – utobi Dec 2 '16 at 13:14

It seems to me that you can calculate four quantities: M1 = mean(log(A1)); M2 = mean(log(A2)); M3 = mean(log(B1)); and M4 = mean(log(B2)).
Then you can calculate: (M1 - M2) - (M3 - M4) and propagate uncertainty in the usual way.
• Right, and the value is nonzero if the quotient distributions are different, no? If you had a way to pair off observations A1 and A2, then you would just take the actual quotients, and compare them. Instead, you just want to know whether, on average, a randomly selected observation from population A1 divided by a randomly selected observation from population A2. So you ask is mean(log(A1)-log(A2))) different from mean(log(B1)-log(B2))? But mean(log(A1) - log(A2)) = mean(log(A1)) - mean(log(A2)). Which is what I suggested you calculate. – Jacob Socolar Dec 12 '16 at 0:31