# Perturbations of rational numbers with random variables

For $a_1,a_2$ and $b_1,b_2$, $\in\Re^+$, if $a_1<b_1$ , then for any perturbation by a random variable $\epsilon\in \Re^+$, $$r_1=\frac{a_1+\epsilon}{b_1+\epsilon}>\frac{a_1}{b_1}$$ and if $a_2>b_2$, $$r_2=\frac{a_2+\epsilon}{b_2+\epsilon}<\frac{a_2}{b_2}$$

If $\epsilon$ is generated from a density as, $\epsilon_1={f_\epsilon(t=x)}$ and $\epsilon_2={f_\epsilon(t=y)}$ for $r_1$ and $r_2$ respectively or as a special case where $\epsilon=\epsilon_1=\epsilon_2$, when $x=y$,

What would be a way to characterize $r_1-r_2$ in terms of $f_\epsilon(t)?$

Note: The parameters of the density function $f_\epsilon(.)$ are generic here. Feel free to use multi-parameter densities, if you would like to solve the problem with a chosen distributional assumption for $f_\epsilon$

• There isn't any way to characterize $r_1 - r_2$, since $r_1$ is defined only if $a < b$ and $r_2$ is only defined if $a > b$, by the question statement, and the two conditions are mutually exclusive. – jbowman Mar 6 '12 at 21:12

I think you just need to calculate the corresponding change of variable because $r_1-r_2$ is a function of $\epsilon$ (and consequently the density of $r_1-r_2$ can be written in terms of $f_{\epsilon}$, multiplied by the correspoding Jacobian of course). This is, the density of the difference of two ratio distributions. I am considering two sets of values $(a_1,b_1)$ and $(a_2,b_2)$ satisfying conditions 1 and 2. and But perhaps I am missing something ...

Edit

I am afraid the transformation

$\delta = \frac{a_1+\epsilon}{b_1+\epsilon} - \frac{a_2+\epsilon}{b_2+\epsilon},$

is not one-to-one. Therefore you cannot calculate the inverse of this transformation and consequently the Jacobian (derivative of this inverse) in a meaningful way.

You can figure out how the density of $\delta$ looks like by simulating a large sample of $\delta$ and smoothing the histogram. Take a look at this R code where $\epsilon$'s are chi -square

 # One epsilon
sim1 = function(n,a1,b1,a2,b2){
eps = rchisq(n,1)
r = (a1+eps)/(b1+eps) - (a2+eps)/(b2+eps)
return(r)
}

plot(density(sim1(100000,1,2,4,3)))

# Two epsilons
sim2 = function(n,a1,b1,a2,b2){
eps1 = rchisq(n,1)
eps2 = rchisq(n,1)
r = (a1+eps1)/(b1+eps1) - (a2+eps2)/(b2+eps2)
return(r)
}

plot(density(sim2(100000,1,2,4,3)))

• Your mention of the Jacobian-confuses me. The jacobian of the likelihood ratio?? $$\frac{a_1+\epsilon}{b_1+\epsilon}-\frac{a_2+\epsilon}{b_2+\epsilon}$$ is the difference where $\epsilon\sim f_\epsilon(t)$ or with different epsilons. Also, feel free to take an example one-parameter distribution from the exponential family-say a poisson-if you would like to compute-and see if there is a caveat; or more details without any specific distributional assumptions is fine too. Also, considering a $\chi^2$ might lead to a connection with an F-dist in the ratios, as a ratio of $\chi^2s$ is an F-dist. – hearse Mar 6 '12 at 22:35
• @Corsario I've converted your other reply as an edit here. This upvote is mine, as you got one from you other post and I don't want it to be lost with the conversion. – chl Mar 6 '12 at 23:12
• @chl Many thanks. I will try to register at some point. – user9410 Mar 6 '12 at 23:16
• @Corsario That would be good, and hopefully not too hard :) – chl Mar 6 '12 at 23:17