# Compare the difference of two probabilities or a ratio of probabilities?

In an experiment with continuous-value random variable, e.g. measuring length of cucumbers. I would like to compare the probability of getting a particular length range in two different conditions. e.g. $P1=P(0.1<L<0.2, fertilizer A)$, $P2=P(0.1<L<0.2, fertilizer B)$.

So I create 2 histograms for the lengths corresponding to each of the 2 fertilizers, $H_A$ and $H_B$. From this histograms, probabilities over ranges of L are calculated from bin counts, etc.

My aim is to show that only for some ranges (or even 1 range) of L the probabilities (or counts of the above histogram) differ while in most other length ranges the probabilities do not differ.

1) what is a good way to express this difference? The usual ratio $\frac{P1}{P2}$ suffers when $P1$ or $P2$ is zero. a good one is $P1-P2$ but then I would like this to be normalised over P so as to have something like a percentage change for comparison, I thought something along: $\frac{P1-P2}{P1+P2}$

2) I would like to plot these probability differences for various L and if possible to use a statistical test which tests the significance of probability differences for just one range and not overall (what a t-test does). I guess the significance of difference depends also on the counts for that particular range of lengths.

-

Are these distributions sufficiently normal? You could check a qq-plot to see if they're good enough for your satisfaction. If so, the area under the fitted normal distribution will never be exactly 0 as it is in a finite sample, so that would be one way to address that issue.

On another issue, I would take the proportions within given ranges and convert them into the odds of a cucumber falling within that range given that it was grown with that fertilizer. Then I would use the odds ratio to compare the two. I think this will be a better approach than using the ratio of probabilities.

One final note, if the distributions for the two fertilizers differ, then realistically the probabilities of being within a given range couldn't be exactly identical, and so testing a given range for 'significance' doesn't make a lot of sense to me. I would just do a t-test on the two distributions themselves (I should think Levene's test would also suffice for your purpose). Having shown that the distributions differ, that means the proportion within a given range will differ, and you could represent the magnitude of the difference for the range that you care about with an odds ratio.

-
Thanks, I followed your advice on Levene and the odds ratio. The problem may not appear when prob=1 for the reasons you mentioned but there are cases when it is zero.For this I just replaced 0 and 1 with 0.001 and 0.999 and hope for the best. We can not be sure about the distribution of lengths, they appear normal but my suspicion is that other quantities (e.g. weight) consist of subpopulations (e.g. let's say those cuc inseminated [!] by a bee in the morning and those done late in the afternoon etc. etc.). So, correct me if wrong, but may need to do gaus mixture and then apply same procedure. –  bliako Feb 14 '12 at 19:38