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?
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.
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.
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.
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.
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:
IF you have excel 2007, you can use
=NORMSINV(RAND())*SD+MEAN
Because there was a big change in 2010 about excel's function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With