5

I have a variable which is a linear combination of two other variables, each one following an N(0,1) distribution.

I need to compute the threshold of the distribution of this combination variable (to compute the Z for a specific probability).

Does anyone know which function should I use, i.e. which package is available to perform this task?

chl
  • 50,972
  • 18
  • 205
  • 364
user8023
  • 51
  • 1
  • 2
  • I think you should update your title to reflect the fact that you're looking for a quantile (given a probability value) rather than a probability value. (If I understand the body of your question correctly.) – chl Dec 15 '11 at 11:29

1 Answers1

3

If you know what the coefficients in the linear combination, and the two random variables are independent, this is simple. We have:

$$X=a_1Z_1+a_2Z_2\sim N\left(0,\sqrt{a_1^2+a_2^2}\right)$$

This is an elementary statistics result, and can be shown by the method of characteristic functions, or convolutions (and other methods...). So you can use a normal tables, and any statistical package has normal tables - take your pick. For example, in excel you can use norm.inv(...), in R you can use qnorm(..), in SAS you can use QUANTILE("NORMAL",..) etc. etc.

probabilityislogic
  • 22,555
  • 4
  • 76
  • 97
  • 2
    In fact, the same method works if $Z_1$ and $Z_2$ are jointly normal with correlation coefficient $\rho$ (instead of being independent) with the minor twist that now $$X=a_1Z_1+a_2Z_2\sim N\left(0,\sqrt{a_1^2+a_2^2 +2\rho a_1a_2}\right).$$ Of course, $\rho = 0$ if $Z_1$ and $Z_2$ are independent and so the bells-and-whistles formula given above simplifies to the one given in probabilityislogic's answer in this special case. – Dilip Sarwate Dec 15 '11 at 13:48