Re: random number generation



Thus spake <Redmer van Tijum>:


> "PB" <pbodin@xxxxxxxxxxxxxxxxxxx> wrote in message
> news:ef0f67e.0@xxxxxxxxxxxxxxxxxxx
>> Sarah wrote:
>>>
>>>
>>> Is there a way to generate a random number with a set mean,
>>> standard
>>> deviation, and skewness?
>>
>> The short answer is no. You can´t generate random numbers with a
>> chosen skewness or kurtosis. To generate N normally distributed
>> numbers with given mean m and standard deviation sd use:
>>
>> rn= m + sd*rand(1,N)
>>
>> The skewness of a normal distribution is 0.
>>
>> HTH
>>
>> PB

> Hi,
> Should be:
> rn= m + sd*randn(1,N)
> Good luck,
> Redmer
>

Thanks, my (stupid) mistake.

/PB
--
A: Because it messes up the order in which people normally
read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
.



Relevant Pages