From: Anyone on
TideMan wrote on 26-May-10 03:49 ...
> On May 26, 9:37 pm, "us " <u...(a)neurol.unizh.ch> wrote:
>> TideMan <mul...(a)gmail.com> wrote in message <9267ac3c-bdc7-4582-b2d2-747404c2b...(a)y18g2000prn.googlegroups.com>...
>>> On May 26, 9:22 pm, "Artur Racu" <arturr...(a)yahoo.com> wrote:
>>>> "David Young" <d.s.young.notthis...(a)sussex.ac.uk> wrote in message <htio66$ch...(a)fred.mathworks.com>...
>>>>> I don't know what Eurostag is, but in Matlab the function I would use to generate an approximation to white Gaussian noise is randn.
>>>> Eurostag is a tool used for dynamic computation of power systems, i want to creat a signal(white gausian noise) so i can make a disturbance in power system and after to analyse different things;
>>>> for example n=randn(10) if you take the mean of each column you will see that the mean is not zero(for white noise the main roule is t have the mean zero)
>>>> could you please help me on that,
>>>> thank you
>>> Oh, don't be so silly!!
>>> Of course the mean will be different from zero with only 10 numbers.
>>> Now try this:
>>> mean(randn(1000000,1))
>>> Is that close enough to zero for you?
>>> If not, try this:
>>> mean(randn(100000000,1))
>> but... derek, how mean(!)...
>>
>> mean(randn(100000000,1))
>> %{
>> ??? Error using ==> randn
>> Out of memory. Type HELP MEMORY for your options.
>> %}
>>
>> us
>
> Oh, Urs, you poor old thing.
> You need to ask your employers to give you a better computer.
> Here is what mine says:
>
>>> mean(randn(100000000,1))
>
> ans =
>
> 2.1549e-005

>> mean(randn(100000000,1))
ans =
-1.9690e-004

"neener-neener"
From: Bruno Luong on
Anyone <""Zrqt\"@³@Qi§QUm![§H:\"&z25u/g`MpEr)\"{ETq[opZ\"Vz.az?"> wrote in message <4bfd77cd$0$32006$c3e8da3(a)news.astraweb.com>...
>
>
> >> mean(randn(100000000,1))

Did someone mention this is a rich and slow way of doing

>> randn/10000

Is there an obligation to run the expensive computer offered by the boss?

Bruno
From: Walter Roberson on
Bruno Luong wrote:
> Anyone <""Zrqt\"@³@Qi§QUm![§H:\"&z25u/g`MpEr)\"{ETq[opZ\"Vz.az?"> wrote
> in message <4bfd77cd$0$32006$c3e8da3(a)news.astraweb.com>...

>> >> mean(randn(100000000,1))

> Did someone mention this is a rich and slow way of doing
>>> randn/10000

No it isn't. By the Law Of Large Numbers, mean(randn(N,1)) for large N will
have a much lower mean and standard deviation than randn(1,1)/sqrt(N) will.
From: Ken on
> In theory, the mean of a set of numbers generated using RANDN will be 0.
> In practice, it won't.
> Here's a smaller example that may convince your chief that expecting exactly
> the theoretical result in practice is not always a good idea.
>
> Take a six-sided die and roll it once.  The mean value of the "sequence" of
> numbers generated by that roll is whatever number came up on the die -- but
> the theoretical mean is 3.5.  That's not achievable with one roll of that
> standard die.  Even if you choose to roll that die a large odd number of
> times, you will never be able to achieve the theoretical mean of that number
> of rolls as all the numbers on the die are integers.
>
> If that argument doesn't work, then point him to Wikipedia (particularly the
> second example on this page):
>
> http://en.wikipedia.org/wiki/Law_of_averages
>
> If nothing else that should occupy him for a few hours following links to
> interesting topics :)
>
> --
> Steve Lord
> sl...(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ:http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link onhttp://www.mathworks.com


hey,

just to have fun being technical:

in theory, the mean of a set of numbers generated using randn *is a
random variable with a distribution centered at zero*, whose standard
deviation tightens as you increase the size of the set. in the limit
of infinite numbers in the set, the probability density function
becomes a delta function at zero (probability 1).

wouldn't be worth mentioning except you're implying a difference
between theory and practice that doesn't exist. actually, in theory,
you will NEVER get exactly zero with a finite set of numbers (because
you're integrating the probability density function "from zero to
zero").

artur: the true statement would be "for white noise, the EXPECTED mean
is zero." also, if I'm understanding you right re: "gaussian curve
values", use normpdf() or mvnpdf().
From: TideMan on
I think I've come up with the perfect sop for Artur's boss who doesn't
like the mean of 10 random numbers not being exactly zero.
round(mean(randn(10,1)))