# Solved – Trigonometric operations on standard deviations

Addition, subtraction, multiplication and division of normal random variables are well defined, but what about trigonometric operations?

For instance, let us suppose that I'm trying to find the angle of a triangular wedge (modelled as a right-angle triangle) with the two catheti having dimensions \$d_1\$ and \$d_2\$, both described as normal distributions.

Both intuition and simulation tell me that the resulting distribution is normal, with mean \$arctanleft(frac{text{mean}(d_1)}{text{mean}(d_2)}right)\$. But is there a way to compute the distribution of the resulting angle? References on where I'd find the answer?

(For a bit of context, I'm working on statistical tolerance of mechanical parts. My first impulse would be to simply simulate the whole process, check if the end result is reasonably normal, and compute the standard deviation. But I'm wondering if there might be a neater analytical approach.)

Contents

In this interpretation, the triangle is a right triangle of side lengths \$X\$ and \$Y\$ distributed binormally with expectations \$mu_x\$ and \$mu_y\$, standard deviations \$sigma_x\$ and \$sigma_y\$, and correlation \$rho\$. We seek the distribution of \$arctan(Y/X)\$. To this end, standardize \$X\$ and \$Y\$ so that

\$\$X = sigma_x xi + mu_x\$\$ and \$\$Y = sigma_y eta + mu_y\$\$

with \$xi\$ and \$eta\$ standard normal variates with correlation \$rho\$. Let \$theta\$ be an angle and for convenience write \$q = tan(theta)\$. Then

\$\$mathbb{P}[arctan(Y/X) le theta] = mathbb{P}[Y le q X]\$\$

\$\$=mathbb{P}[sigma_y eta + mu_y le q left( sigma_x xi + mu_x right)\$\$

\$\$=mathbb{P}[sigma_y eta – q sigma_x xi le q mu_x – mu_y]\$\$

The left hand side, being a linear combination of Normals, is normal, with mean \$mu_y sigma_y – q mu_x sigma_x\$ and variance \$sigma_y^2 + q^2 sigma_x^2 – 2 q rho sigma_x sigma_y\$.

Differentiating the Normal cdf of these parameters with respect to \$theta\$ yields the pdf of the angle. The expression is fairly grisly, but a key part of it is the exponential

\$\$exp left(-frac{left(mu _y left(sigma _y+1right)-mu _x left(sigma _x+1right) tan (theta )right){}^2}{2 left(-2 rho sigma _x sigma _y tan (theta )+sigma _x^2+sigma _y^2+tan ^2(theta )right)}right),\$\$

showing right away that the angle is not normally distributed. However, as your simulations show and intuition suggests, it should be approximately normal provided the variations of the side lengths are small compared to the lengths themselves. In this case a Saddlepoint approximation ought to yield good results for specific values of \$mu_x\$, \$mu_y\$, \$sigma_x\$, \$sigma_y\$, and \$rho\$, even though a closed-form general solution is not available. The approximate standard deviation will drop right out upon finding the second derivative (with respect to \$theta\$) of the logarithm of the pdf (as shown in equations (2.6) and (3.1) of the reference). I recommend a computer algebra system (like MatLab or Mathematica) for carrying this out!

Rate this post