Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: How to compute with Stata probabilities by conditioning ?

From   "Roger B. Newson" <>
Subject   Re: st: How to compute with Stata probabilities by conditioning ?
Date   Fri, 17 May 2013 16:12:06 +0100

If you type, in Stata,

help density_functions##normal

then you will find that the function binormal(h,k,r) computes the joint cumulative distribution function, not the conditional diatribution function as you seem to believe. The .pdf documentatio gives the equation explicitly.

I hope this helps.

Best wishes


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Web page:
Departmental Web page:

Opinions expressed are those of the author, not of the institution.

On 17/05/2013 15:52, Tiago V. Pereira wrote:
Dear statalisters,

Imagine two standard normal variables, X and Y, with known correlation, rho.

P(X>t1|Y>t2) can be computed with


What if we were interest in computing

P(X>t1 and Y>t2) ?

Since X and Y are correlated, I am a bit confused.

I am using brute force (dumb way):

set obs 1000000000
matrix M = (1,rho \ rho, 1)
drawnorm x y, means(0 0) sds(1 1) corr(M)
count if x>t1&y>t2

P(X>t1 and Y>t2)  = r(N)/_N

Is there a smarter way of computing probabilities by conditioning (with

Thanks in advance.


*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index