# Combining 1D normal distributions into a 2D distribution

First of all, apologies for my poor terminology - I have a particular problem which I understand in own terms, but I am having difficulty in applying the mathematics in the correct manner.

My problem is that I have a point in 2D space with an uncertainty in two directions. These directions happen to be perpendicular to one another, however they are not necessarily perpendicular to the axes. (If it helps, the point represents a top-down view of an object from an image - there is uncertainty horizontally in the image as well as a larger uncertainty in the depth of the object). I can find the standard deviation of the two components and represent them as univariate distributions, but I'd instead like to represent them as a 2D distribution as they should be.

I can completely see that this is possible and probably very simple but I just can't quite make the leap from my visualisation of the problem to the mathematical formalism - I only need to calculate the parameters of the 2D distribution (specifically, I guess, the covariance - I know the mean). If someone could just give me a prod in the right direction I would be very grateful.

-
This looks as if it may be a bivariate normal distribution – Henry Feb 16 '12 at 23:29

If the components in the two directions you refer to are independent and both have the same standard deviation, then it's easy. If they're independent and the standard deviations in those directions differ, then it's more involved. In the former case you have circular symmetry, so the standard deviations in all directions are the same and components in directions at right angles to each other will always be independent. In the latter case, the $x$- and $y$-coordinates would be correlated.
Suppose one of the directions you refer to is at an angle $\theta$ to the $x$-axis. The unit vector in that direction is $\begin{bmatrix}\cos\theta \\ \sin\theta\end{bmatrix}$, but the angle is not what we're concerned with, I'll call it $\begin{bmatrix} a \\ b \end{bmatrix}$, where $a^2+b^2=1$. The one perpendicular to it will be $\begin{bmatrix} -b \\ a \end{bmatrix}$. Suppose the standard deviation in the first direction is $\sigma$ and in the second is $\tau$. So let $U \sim N(0,\sigma^2)$ and $V \sim N(0,\tau^2)$ and suppose $U$ and $V$ are independent.
Then $$\begin{bmatrix} X \\ Y \end{bmatrix} = U \begin{bmatrix} a \\ b \end{bmatrix} + V \begin{bmatrix} -b \\ a \end{bmatrix} = \begin{bmatrix} a & -b \\ b & a \end{bmatrix} \begin{bmatrix} U \\ V \end{bmatrix}.$$ The variance of this random vector is $$\begin{bmatrix} a & -b \\ b & a \end{bmatrix} \left( \operatorname{var} \begin{bmatrix} U \\ V \end{bmatrix} \right) \begin{bmatrix} a & -b \\ b & a \end{bmatrix}^T = \begin{bmatrix} a & -b \\ b & a \end{bmatrix} \begin{bmatrix} \sigma^2 & 0 \\ 0 & \tau^2 \end{bmatrix} \begin{bmatrix} a & b \\ -b & a \end{bmatrix}$$ $$= \begin{bmatrix} \sigma^2 a^2 + \tau^2 b^2, & (\sigma^2-\tau^2)ab \\ (\sigma^2-\tau^2)ab, & \sigma^2 b^2 + \tau^2 a^2 \end{bmatrix}.$$ The entries in this matrix are the variances of the $x$- and $y$-components and the covariance.
The correlation is therefore $$\frac{(\sigma^2-\tau^2)ab}{\sqrt{(\sigma^2 a^2 + \tau^2 b^2)(\sigma^2 b^2 + \tau^2 a^2)}}.$$
You might consider the advantages of working in the rotated coordinate system in which the components in perpendicular directions are independent, and then, if necessary, converting back to the $xy$-coordinate system only at the end.