Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating random numbers with normal distribution in Excel

I want to produce 100 random numbers with normal distribution (with µ=10, σ=7) and then draw a quantity diagram for these numbers.

How can I produce random numbers with a specific distribution in Excel 2010?

One more question:

When I produce, for example, 20 random numbers with RANDBETWEEN(Bottom,Top), the numbers change every time the sheet recalculates. How can I keep this from happening?

like image 449
ha.M.ed Avatar asked Jun 05 '11 08:06

ha.M.ed


People also ask

How do you generate a random number in a normal distribution?

r = normrnd( mu , sigma ) generates a random number from the normal distribution with mean parameter mu and standard deviation parameter sigma . r = normrnd( mu , sigma , sz1,...,szN ) generates an array of normal random numbers, where sz1,...,szN indicates the size of each dimension.

How do you return random numbers from a normal distribution for your Excel forecasts?

Excel offers two functions that generate random numbers… RAND() returns a random number between 0 and 1. RANDBETWEEN(bottom, top) returns a random integer between the bottom and top arguments.

How do you create a normal distribution in Excel?

Enter =NORMDIST(a1,0,1,0) into cell B1. This tells Excel to calculate the standard normal distribution from the value you entered in cell A1 with a mean of 0 and a standard deviation of 1. Press enter.

How do you generate a random number with mean and standard deviation in Excel?

In D1, calculate the mean, type =AVERAGE(B3:B16), press Enter key and in D2, calculate the standard deviation, type =STDEV. P(B3:B16) and press Enter key. Tip: In Excel 2007, you need to type the formula =STDEVP(B3:B16) to calculate the standard deviation of the first random numbers.


2 Answers

Use the NORMINV function together with RAND():

=NORMINV(RAND(),10,7) 

To keep your set of random values from changing, select all the values, copy them, and then paste (special) the values back into the same range.


Sample output (column A), 500 numbers generated with this formula:

enter image description here

like image 106
Excellll Avatar answered Oct 05 '22 12:10

Excellll


IF you have excel 2007, you can use

=NORMSINV(RAND())*SD+MEAN 

Because there was a big change in 2010 about excel's function

like image 29
JeeHyoung Kim Avatar answered Oct 05 '22 13:10

JeeHyoung Kim