comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » RANDOMN function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: RANDOMN function [message #86500 is a reply to message #86499] Thu, 14 November 2013 07:12 Go to previous messageGo to previous message
Russell Ryan is currently offline  Russell Ryan
Messages: 122
Registered: May 2012
Senior Member
There are lies, damned lies, and statistics.




On Thursday, November 14, 2013 9:46:01 AM UTC-5, Mats Löfdahl wrote:
> Den torsdagen den 14:e november 2013 kl. 14:59:11 UTC+1 skrev fd_...@mail.com:
>
>> Hi
>
>>
>
>> I used the RANDOMN function to add Gaussian noise to my data like this:
>
>>
>
>> noise=RANDOMN(seed,N)
>
>>
>
>> When I print, the mean values of RANDOMN(seed,N) I didn't get zero but something around 0.0337187.
>
>>
>
>> I expect to get something very very close to zero since the RANDOMN function returns normally-distributed, floating-points with a mean of zero. Is my assumption wrong? It's correct that the median is not zero?
>
>
>
> You will get better statistics the larger the set:
>
>
>
> IDL> for e=1,9 do print,e,10d^e,mean(randomn(seed,10d^e))
>
> 1 10.000000 0.0489258
>
> 2 100.00000 0.0172675
>
> 3 1000.0000 -0.0336368
>
> 4 10000.000 -0.00799687
>
> 5 100000.00 0.00208867
>
> 6 1000000.0 -0.00101986
>
> 7 10000000. -0.000105310
>
> 8 1.0000000e+08 0.000104068
>
> 9 1.0000000e+09 2.46072e-05
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to make lat/long grid for MODIS in IDL
Next Topic: =?UTF-8?Q?How=20to=20use=20IDL=20to=20?==?UTF-8?Q?call=20?= =?UTF-8?Q?SQL=5FServer=5F2008=20datab?==?UTF-8?Q?ase?=

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:56:54 PDT 2025

Total time taken to generate the page: 0.00446 seconds