ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   draw random from normal distribution (https://www.excelbanter.com/excel-discussion-misc-queries/59799-draw-random-normal-distribution.html)

gatosonreyendo

draw random from normal distribution
 
for a little simulation i need to draw random numbers from a normal
distribution with a given mean (0.025) and std dev (0.3373).

Having read some earlier posts i tried =norminv(rand(), mean, std dev).
Apparently, this is not the right formula: it returns regularly values in the
50%s which should not happen from my 2.5% mean. I also found the box-muller
method. How could i transform the random draws from the standard normal
distribution into the ones i need?

Is there another formula i could use?

Thanks a lot in advance
Gerald.

Myrna Larson

draw random from normal distribution
 
Can you post your formula? I used this one in A1:A25

=NORMINV(RAND(),0.025,0.3373)

and got these results:

0.470634368
0.178651083
0.094371192
-0.11762679
0.050754594
-0.523556161
0.382006066
-0.019476513
-0.106845119
-0.275542551
0.220470515
0.254710129
-0.637805938
-0.237071792
0.210361858
0.414666709
0.089107186
0.008368669
0.070993627
0.155842931
0.436163076
-0.491977729
0.357208446
-0.488146932
-0.359035558


On Sat, 10 Dec 2005 11:40:03 -0800, "gatosonreyendo"
wrote:

for a little simulation i need to draw random numbers from a normal
distribution with a given mean (0.025) and std dev (0.3373).

Having read some earlier posts i tried =norminv(rand(), mean, std dev).
Apparently, this is not the right formula: it returns regularly values in the
50%s which should not happen from my 2.5% mean. I also found the box-muller
method. How could i transform the random draws from the standard normal
distribution into the ones i need?

Is there another formula i could use?

Thanks a lot in advance
Gerald.


Mike Middleton

draw random from normal distribution
 
Gerald -

for a little simulation i need to draw random numbers from a normal
distribution with a given mean (0.025) and std dev (0.3373). Having read
some earlier posts i tried =norminv(rand(), mean, std dev). Apparently,
this is not the right formula: it returns regularly values in the 50%s
which should not happen from my 2.5% mean. <


P(X=.50) = 1 - NORMDIST(.50,.025,.3373,1) = .08 approximately

That is, approximately 8% of the random values should be greater than 50%.
(It should happen.)

Both NORMINV and RAND are much improved in Excel 2003 (and NORMINV is much
slower due to its increased numerical accuracy), so
NORMINV(RAND(),mean,stdev) may be satisfactory for your needs.

For more information, see "Description of the effects of the improved
statistical functions for the Analysis ToolPak in Excel 2003 and in Excel
2004 for Mac," at
http://support.microsoft.com/default...b;en-us;829208
specifically, the "Random Number Generation" section

and "Description of the RAND function in Excel 2003" at
http://support.microsoft.com/kb/828795/

and "Excel Statistical Functions: NORMINV" at
http://support.microsoft.com/default...b;en-us;827358

- Mike
www.mikemiddleton.com

"gatosonreyendo" wrote in message
...
for a little simulation i need to draw random numbers from a normal
distribution with a given mean (0.025) and std dev (0.3373).

Having read some earlier posts i tried =norminv(rand(), mean, std dev).
Apparently, this is not the right formula: it returns regularly values in
the
50%s which should not happen from my 2.5% mean. I also found the
box-muller
method. How could i transform the random draws from the standard normal
distribution into the ones i need?

Is there another formula i could use?

Thanks a lot in advance
Gerald.




Jerry W. Lewis

draw random from normal distribution
 
Box-Muller produces N(0,1) random variates, as does NORMSINV(RAND()).
If R is a N(0,1) random variate, then
R*0.33373+0.025
is Normal with mean 0.025 and standard deviation 0.3373.

If you are using a pre-2003 version of Excel, you might get better
results using Ian Smith's inv_normal() function instead of the native
Excel function NORMSINV()
http://members.aol.com/iandjmsmith/Examples.xls

Jerry

gatosonreyendo wrote:

for a little simulation i need to draw random numbers from a normal
distribution with a given mean (0.025) and std dev (0.3373).

Having read some earlier posts i tried =norminv(rand(), mean, std dev).
Apparently, this is not the right formula: it returns regularly values in the
50%s which should not happen from my 2.5% mean. I also found the box-muller
method. How could i transform the random draws from the standard normal
distribution into the ones i need?

Is there another formula i could use?

Thanks a lot in advance
Gerald.




All times are GMT +1. The time now is 02:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com