# Math Help - Given A and B, find the distribution of f(A,B)

1. ## Given A and B, find the distribution of f(A,B)

Suppose we have independent normally distributed random variables $X_1 \sim N(c_1,\sigma), X_2 \sim N(c_2,\sigma), \ldots, X_n \sim N(c_n, \sigma)$ where $\sigma$ and all the $c_i$ are known.

Define $A=a_1X_1+\ldots+a_nX_n$ and $B=b_1X_1+\ldots+b_nX_n$ (where all the $a_i$ and $b_i$ are known). Form the complex number $Z=A+Bi$. What would be a good way of computing the distribution of $\arg(Z)$?

I'm not sure how easy it is to find the distribution exactly, so one practical way of trying to go about the problem would be to use simulation. This is fine, but I really want to code up an algorithm that will run quickly - and simulation would be way too slow for what I need. So really I think I need to analytically find the distribution of

$W = \begin{cases} \arctan(B/A) &\mbox{if } X \geq 0 \\ \pi + \arctan(B/A) & \mbox{if } X<0, \end{cases}$

but this doesn't seem particularly easy!

2. ## Re: Given A and B, find the distribution of f(A,B)

Hey Newtonian.

The first thing you need to do is find the distribution of A/B. Since A and B are going to be normal (since they are linear combinations of normals) then both A and B will be normally distributed as well. This link was provided on another forum in the discussion of ratios of normal variables:

http://www.jstatsoft.org/v16/i04/paper

In terms of your arctan function, you will then need to use a transformation theorem to get the PDF of arctan(B/A) and use the properties of the arctan function for getting the correct branch.