Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How can I compute the PDF/CDF and expected value of the following function:

$$ \frac{\alpha}{r^2} $$

where $r$ is generated as follows:

  1. draw $x$ and $y$ from a uniform distribution in the range $[-r_\max,+r_\max]$.
  2. if $r_\min \le \sqrt{x^2+y^2} \le r_\max$ then $r=\sqrt{x^2+y^2}$ else repeat step (1)

$r_\min$, $r_\max$, and $\alpha$ are given constants.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

This is really the same as drawing the pair $(x,y)$ uniformly from inside the annulus bounded by concentric circles of radii $r_\min$ and $r_\max$. If $s$ is between $r_\min$ and $r_\max$ then the probability that $r\le s$ is the area between the circle of radius $s$ and the circle of radius $r_\min$ divided by the whole area of the annulus. I.e. $$ \Pr(r \le s) = \frac{\text{area of annulus between radii }r_\min\text{ and }s}{\text{area of annulus between radii }r_\min\text{ and }r_\max} = \frac{\pi s^2 - \pi r_\min^2}{\pi r_\max^2 - \pi r_\min^2} = \frac{s^2-r_\min^2}{r_\max^2-r_\min^2}. $$ So that's the CDF as a function of $s$. Differentiate it to get the PDF, and the numerator becomes $2s$ while the denominator stays as it was. Call the CDF (capital) $F$ and density (lower-case) $f$, and then the expected value is $$ \alpha\int_{r_\min}^{r_\max} \frac{1}{s^2} f(s)\;ds. $$

share|improve this answer
    
And of course, all this assumes that $X$ and $Y$ are independent random variables, which is not stated anywhere in the problem. Also, I think the OP wanted the pdf, CDF, and expectation of $\alpha/R^2$, not of $R$. –  Dilip Sarwate Mar 7 '12 at 0:18
    
I'd overlooked that last point. As for independence, forgetting to mention that is one of the most frequent of all oversights, even by professionals in published work. –  Michael Hardy Mar 7 '12 at 0:46
    
....and I've edited accordingly. –  Michael Hardy Mar 7 '12 at 0:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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