Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: how to find the integral for a portion of a normal distribution. |

Date |
Tue, 4 May 2010 17:06:26 +0100 |

This remains a little ambiguous. If you want the fraction of the simulated data that is in any interval, just -count- and divide by 100000. count if <condition involving x> di r(N) / 100000 If you want the fraction of a normal in any interval, just call -normal()- to do the work. You can do arithmetic inside the (). No need for -integ- that I can see. Nick n.j.cox@durham.ac.uk Buzz Burhans This gets me what I want, but there should be an easier way to express this as 2 equations? clear drawnorm x , means(2.05) sds(1.74) n(100000) clear sort x egen lowresponse = total(x) if _n < (100000*.273) egen highresponse = total(x) if _n >= (100000*.273) l in 1/50 l in -60/l David Muller To expand upon Michael's suggestion, -display normal((1 - 2.05)/1.74)- will give you the proportion of responses <=1, and -display 1 - normal((1 - 2.05)/1.74)- will give you the proportion of responses >=1. Note that assuming this normal model for your response you would expect a little over 10% of your responses to be less than 0, which indicates a problem with your assumption if your response is strictly positive. On Tue, May 4, 2010 at 2:01 PM, Hollis,Michael E <mhollis@mwdh2o.com> wrote: > ...you'll then be able to use the standard normal distribution with mean > zero and unit variance. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**Re: st: how to find the integral for a portion of a normal distribution.***From:*David Muller <davidmull@gmail.com>

**RE: st: how to find the integral for a portion of a normal distribution.***From:*"Buzz Burhans" <buzzb3@earthlink.net>

- Prev by Date:
**Re: st: AW: Graph Title Problem** - Next by Date:
**Re: st: how to find the integral for a portion of a normal distribution.** - Previous by thread:
**RE: st: how to find the integral for a portion of a normal distribution.** - Next by thread:
**RE: st: how to find the integral for a portion of a normal distribution.** - Index(es):