[R] R help
Rolf Turner
rolf at math.unb.ca
Tue Apr 29 23:49:47 CEST 2003
Peter Dalgaard writes:
> Shutnik <shutnik_xx at yahoo.co.uk> writes:
>
> > Hello,
> > I have the normal random variables y(t)~N(mu, sigma.sq) and want
> > to decompose them into n normal variables:
> >
> > y(t) = x(t,1) +
+ x(t,n)
I presume this means y(t) = x(t,1) + ... + x(t,n) (R.T.)
> >
> > x(t,i)~N(mu, sigma.sq/n)
I presume you want x(t,i)~N(mu/n, sigma.sq/n),
elsewise the question doesn't make sense.
I also presume you want the x(t,i) to be independent,
elsewise the question is trivial. (R.T.)
> >
> > The problem is not as simple as can appear. All my experiments
> > didnt give me anything so far. Are there any tools to do this?
> >
>
> This should work, provided I understand the problem correctly:
>
> x <- rnorm(n,sd=sqrt(sigma.sq/n))
> x <- x - mean(x) + y/n
I don't think it's that simple: By my calculations,
Var(x_i) = 2*sigma.sq/n - sigma.sq/n^2, not sigma.sq/n.
I think the problem is actually fairly subtle (although I may
be overlooking something simple). Something like a Gramm-Schmidt
approach should work, but I can't quite suss it out.
cheers,
Rolf Turner
rolf at math.unb.ca
More information about the R-help
mailing list