in reply to Skew normally distributed random numbers
If I understand the question, you want to change the mean value of a random function to a given value, right? This is a linear transformation, and it is very simple to implement:
$val = old_random_function() - $old_avg + $new_avg;or, create a new function:
sub new_random_function { old_random_function() - $old_avg + $new_avg }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Skew normally distributed random numbers
by BrowserUk (Patriarch) on Jan 28, 2005 at 11:48 UTC | |
by fglock (Vicar) on Jan 28, 2005 at 13:05 UTC | |
by BrowserUk (Patriarch) on Jan 28, 2005 at 13:23 UTC | |
by fglock (Vicar) on Jan 28, 2005 at 13:36 UTC | |
by BrowserUk (Patriarch) on Jan 28, 2005 at 13:49 UTC | |
by BrowserUk (Patriarch) on Jan 28, 2005 at 15:27 UTC | |
| |
by Anonymous Monk on Jan 28, 2005 at 17:05 UTC |