Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
How to generate random X given only min, max, mean?
Suppose I know only -5 <= X <= 95 with Xmean = 75.
I believe that means that P(-5 <= X <= 75) = 20% and P(75 <= X <= 95) = 80%, roughly. Right? 1. Suppose that I believe X is uniformly distributed in each subrange. Then I could generate random X by: X = if RAND() <= .20 then -5 + 80*RAND() else 75 + 20*RAND() Is there a more elegant formulation? Perhaps a closed-form expression, something of the form (which is obviously wrong): X = -5 + 80*RAND() + 20*RAND() 2. Suppose that I believe X is "nearly normally" distributed across the range [-5,95], but with a left skew that pulls the mean to the right. How would I generate random X? Perhaps something of the form (which is obviously wrong): X = NORMINV(RAND(), 75, 12.5) where 12.5 = (95-(-5))/8 is the approximate sd (z = 4) if the mean were 45 ((-5+95)/2). (There probably is not just one answer, since I said nothing about the kurtosis. Frankly, I know nothing about kurtosis. Assume the same kurtosis as a standard normal curve or whatever other simplifying assumption makes sense.) |
#2
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
How to generate random X given only min, max, mean?
|
#3
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
How to generate random X given only min, max, mean?
Oops! Sorry about the VBA use question (forgot the group name, duh!).
Anyway, have a look at the following thread as well. http://groups.google.com/group/micro...98ead09e8ccf72 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to generate random X given only min, max, mean?
=RAND()*(95+5)-5 This will generate a random number between -5 and 95 using formulas in a cell of the worksheet. -- goober ------------------------------------------------------------------------ goober's Profile: http://www.excelforum.com/member.php...o&userid=19838 View this thread: http://www.excelforum.com/showthread...hreadid=496073 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to generate random X given only min, max, mean?
"goober" wrote:
=RAND()*(95+5)-5 This will generate a random number between -5 and 95 using formulas in a cell of the worksheet. I believe that results in a uniform distribution over [-5,95] with a mean of 45. I am interested in a distribution with a mean of 75, P(-5 <= X <= 75) = 20% and P(75 <= X <= 95) = 80%. A uniform distribution over [-5,95] would effectively yield just the opposite, I believe. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Generate random numberes using reference to the other cell. | Excel Worksheet Functions | |||
How to generate a random list of weekDAYS between two dates? | Excel Worksheet Functions | |||
GENERATE RANDOM NUMBERS BUT EXCLUDE A NUMBER IN THE SEQUENCE | Excel Discussion (Misc queries) | |||
Generate random numbers between two values and with a given mean | Excel Worksheet Functions | |||
generate random numbers | Excel Worksheet Functions |