4

Let X and Y be random variables with a joint probability density function (joint PDF) given by

$ f_{X,Y}(x,y) \quad=\quad \begin{cases} \frac{c}{1+x^2+y^2} & \text{ if } x^2+y^2<1\,, \\ 0 & \text{ otherwise,} \end{cases} $

where the positive constant c is determined by the requirement that $ f_{X,Y} $ is a PDF.

What is the correct formula for the marginal PDF of X?

I think I have to start off by integrating $ \frac{c}{1+x^2+y^2} $ with respect to y. Which gives me

$ \int \frac{c}{1+x^2+y^2} dy = \frac{c*\arctan{\frac{y}{\sqrt{1+x^2}}}}{\sqrt{1+x^2}} $

But don't know how to continue now.

I'd also like to know if there's any software out there where I can compute this kind of symbolic stuff.

Thanks

StubbornAtom
  • 17,932
  • 1
    If you do it with software, you'll skip the fun part. – peter.petrov Nov 05 '20 at 23:35
  • Once I know how to do it it's a waste of time calculating in 21st century with all computers and stuff.. and they don't make mistakes! I want to learn and then be able to do it fast :)) – Jena Rayner Nov 05 '20 at 23:40
  • 1
    Computer programs have their limits and make mistakes, trust me on this one :) But OK, for your particular problem they should help probably. – peter.petrov Nov 05 '20 at 23:44
  • Can you mention me any good software to compute this kind of stuff? – Jena Rayner Nov 05 '20 at 23:45
  • SymPy in Python you can try. Wolfram Alpha / Wolfram Cloud too, Maxima too (but that one is kind of archaic, not that it's bad). Just google "free computer algebra system". – peter.petrov Nov 05 '20 at 23:45
  • But it has to be statistics-based algebra, for regular algebra i already have Mathematica and MATLAB – Jena Rayner Nov 05 '20 at 23:49
  • Oh :) You are well-equipped then. No... Mathematica and MATLAB are sufficient, they can solve this integral, I think. – peter.petrov Nov 05 '20 at 23:50
  • Yes, they solved it in fact ;) but I don't know how to procede with the problem. I really like SymPy btw, great call there – Jena Rayner Nov 05 '20 at 23:54
  • I think further on, you need to integrate your result w.r.t. $x$, and then make an equation by saying this integral is equal to 1 (because the marginal PDF is still a PDF). I am not very good in this field but I think that's the idea behind this exercise. – peter.petrov Nov 05 '20 at 23:55
  • I think there's no way I can find an explicit integral for my latest result – Jena Rayner Nov 06 '20 at 00:02

1 Answers1

1

I think I finally managed to recall.

[1] I think you made a mistake, you should integrate w.r.t. $x$ not $y$.

That will give you the margin PDF of $Y$.

[2] Make this equation:

$$\int_{-1}^{1} \left(\int_{-\sqrt{1-y^2}}^{\sqrt{1-y^2}} \frac{c}{1+x^2+y^2} \,dx\right)\,dy = 1$$

Solving this equation should give you $c$.

[3] Also, the inner integral gives you the marginal distribution of $Y$.

$$f(y) = \int_{-\sqrt{1-y^2}}^{\sqrt{1-y^2}} \frac{c}{1+x^2+y^2} \,dx $$

So just solve this as an indefinite integral treating $y$ as constant (similar to what you did but reversed), but then compute the definite integral too (i.e. apply the boundaries). That will give you a function of just $y$, your marginal PDF.

peter.petrov
  • 12,963