3
$\begingroup$

Let's assume I have a measurement $d + \epsilon_d$ where the true value of the measurement is $d$ and the error associated with that measurement $\epsilon_d$ has a uniform distribution $\epsilon_d \sim U(-0.5, 0.5)$.

I have a random variable that is a function of that measurement and error: $Z = \cfrac{B * f}{d + \epsilon_d}$ where $B$ and $f$ are constants.

  • What is the distribution of $Z$?
  • What is the posterior probability $p(z|d)$?

I looked at the wikipedia article on inverse uniform distributions, but wasn't sure how to apply that to this problem.

More clarifications:

$(B * f) > 0$, and the support of $d + \epsilon_d$ in the interval $[d - \frac{1}{2}, d + \frac{1}{2}]$ is also always positive.

When I try to workout the algebra using the wikipedia notation, I end up with something like:

Define random variable $X = \frac{d + \epsilon_d}{B * f}$.

Define reciprocal of random variable $Z = \frac{1}{X} = \frac{B * f}{d + \epsilon_d}$.

Define support $a = d - \frac{1}{2}$ and $b = d + \frac{1}{2}$.

Probability density function is (per wiki): $g(z) = \frac{1}{z^2} * \frac{1}{b - a} = \frac{1}{z^2}$

Therefore, $g(z) = \cfrac{(d + \epsilon_d)^2}{B^2 * f^2} = \cfrac{1}{z^2}$

  • Does this look like the correct distribution?
  • And if so, how do I go from the expression for this distribution to the conditional distribution expression: $p(z | d)$?

Thanks

$\endgroup$
2
  • $\begingroup$ This is strange for two reasons. First, is $d$ the measurement or, as suggested by your formula for $Z,$ the true value being measured? If $\delta$ is the true value then the measured value is $d=\delta+\epsilon_d,$ whence $d+\epsilon_d = \delta + 2\epsilon_d,$ so the distinction is important. Second, why use the complex expression "$Bf$" for the numerator unless there are some unstated special relationships among $B,$ $f,$ $d,$ and $\epsilon_d$? If there aren't, then where is the difficulty in applying the Wikipedia article? $\endgroup$
    – whuber
    Commented Jun 9, 2023 at 14:23
  • 1
    $\begingroup$ @whuber, yes, you are correct. Edited for clarity. measurement is $d + \epsilon_d$. $B$ and $f$ are simply constants. But I'm still not sure how to apply the wikipedia article. If you have an answer, open to it. Thank you! $\endgroup$ Commented Jun 9, 2023 at 15:07

1 Answer 1

3
$\begingroup$

I am going to take some liberties interpreting this question (and its helpful title) as asking,

For constants $C$ and $d$ and uniformly distributed random variable $\epsilon$ supported on $[-1/2,1/2],$ what is the distribution of $Z = C/(d+\epsilon)$?

Before we go on, the Wikipedia article derives the distribution of $1/U$ where $U$ has a uniform distribution on the interval $[0, t]$ with $t\gt 0.$ This is done by computing

$$\Pr\left(\frac{1}{U}\le y\right) = \Pr\left(U \ge \frac{1}{y}\right) = \frac{1}{t}\max\left(0, t - \frac{1}{y}\right) = \max\left(0, 1 - \frac{1}{yt}\right)\tag{*}$$

for all numbers $y\ge 0$ (since obviously $\Pr(1/U\le y)=0$ for all negative $y$). We'll capitalize on this at the very end.

Returning to the problem at hand, applying the same basic definition works best: the value of the distribution function of $Z$ at any number $z$ is

$$F_Z(z) = \Pr(Z \le z) = \Pr\left(\frac{C}{d+\epsilon}\le z\right).$$

To simplify the algebra it would be nice to clear the denominator, but that's made tricky because when it's negative, the inequality is reversed. So, to that end, consider the following:

  • When $C=0,$ $Z=0$ constantly, solving the problem. From now on then assume $C\ne 0.$

  • When $C\lt 0,$ the event $C/(d+\epsilon)\le z$ is equivalent to $1/(d+\epsilon)\ge z/C.$ Otherwise, when $C\gt 0,$ the equivalent event is $1/(d+\epsilon)\le z/C.$

  • The support of the denominator $d+\epsilon$ is the interval $[d-1/2, d+1/2].$ If this is entirely positive or entirely negative, things are relatively simple; but otherwise we need to break the interval into its negative and positive parts. An elegant way to handle this, with a minimum of fuss, is to express the distribution of $d+\epsilon$ as a mixture of a positively supported and negatively supported distribution. (When a variable $X$ has a distribution function $F_X$ with weight $q$ and $Y$ has a distribution function $F_Y$ with weight $p,$ the distribution function of their weighted mixture is $qF_X + pF_Y.$)

Specifically, let $l = \min(0, d-1/2)$ and $u=\max(0, d+1/2)$, so that $[l,u]$ covers all the numbers of possible relevance in this analysis. For any two numbers $a$ and $b,$ let $U(a,b)$ designate a uniform distribution on the interval $(\min(a,b),\max(a,b))$ (so we don't care what order $a$ and $b$ might be in). By checking the three cases $u\lt 0,$ $l\le 0 \le u,$ and $l\gt 0,$ you can readily verify that a weighted mixture of a $U(l,0)$ variable with weight $q = 1/2-d$ and a $U(0,u)$ variable with weight $p=d+1/2$ has the same distribution as $d+\epsilon.$

(Any experts who have been following along might object that $p$ or $q$ can be negative. That's correct -- but the math still works out, because $p+q=1$ and, because we know we're computing a valid distribution function (that of $Z$), we are guaranteed the expressions we are about to derive will give a legitimate distribution function.)

To deal with the uniform distributions on $(l,0]$ when $l\lt 0,$ negate the random variable. This will convert the event $1/X \le z/C$ to $1/(-X)\ge -z/C$ (notice the change in the direction of the inequality) and $1/X \ge z/C$ becomes $1/(-X)\le -z/C.$

This analysis has reduced the problem to finding some probabilities that $1/X\le \pm z/C$ or $1/X\ge \pm z/C$ where $X$ has a uniform distribution on a positive interval anchored at zero -- either $(0,u)$ or $[0,-l].$ Apply the results $(*)$ in the Wikipedia article directly in either case and combine those results using the definition of a weighted mixture. The only challenge is to keep track of the $\pm$ signs and the directions of the inequalities.

If any of this looks tricky or abstract, I recommend plotting the distributions involved in each of the three cases.

$\endgroup$
4
  • $\begingroup$ Thanks @whuber added more clarifications in the question. $\endgroup$ Commented Jun 10, 2023 at 1:43
  • $\begingroup$ As usual, if you want an expression for the density, just differentiate the distribution function. $\endgroup$
    – whuber
    Commented Jun 10, 2023 at 15:41
  • $\begingroup$ Got it, so $\cfrac{1}{z^2}$ is actually the density. $\endgroup$ Commented Jun 10, 2023 at 15:57
  • $\begingroup$ It's the right idea but not quite correct: you have to be specific about the support of the function. A defining fact about any density $f$ is that $\int_{\infty}^{+\infty}f(x)\,\mathrm dx = 1,$ but that's not the case for $f(z) = 1/z^2.$ $\endgroup$
    – whuber
    Commented Jun 10, 2023 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.