Dear All,
it is claimed that ,given a normally distributed variable :
mean minus 1 sd to mean plus 1 sd contains 68.26% of observations
" " 2 " " " " 2 " "
95.54% " "
" " 3 " " " " 3 " "
99.74% " "
I would like to know if the following is a good enough proof of the claim
. program define interval
1. quietly {
2. drop _all
3. set obs 100000
4. gen x = invnorm(uniform())*`1' + 200
5. count if x>= `2' &`3' >=x
6. }
7. di r(N)/100000
8. end
. interval 1 199 201
.68278
. interval 50 150 250
.68189
. interval 100 100 300
.68281
. interval 1 198 202
.95387
. interval 50 100 300
.95409
. interval 100 0 400
.95426
. interval 1 197 203
.99725
. interval 50 50 350
.99736
. interval 100 -100 500
.99718
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/