An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20030429/2331409c/attachment.pl
R help
4 messages · Shutnik, Spencer Graves, Peter Dalgaard +1 more
No solution exists, because the mean of a sum of n random variables each with mean mu is n*mu, which is different from mu if n > 1. Beyond this, it is not clear to me what you want, but the following might help, if my understanding of your problem is close to correct: y <- rnorm(1) n <- 3 x <- rnorm(n)/sqrt(3) x <- y*x/sum(x) x; sum(x); y hth. spencer graves
Shutnik wrote:
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) x(t,i)~N(mu, sigma.sq/n) The problem is not as simple as can appear. All my experiments didn?t give me anything so far. Are there any tools to do this? Thanks --------------------------------- [[alternate HTML version deleted]]
______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
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)
x(t,i)~N(mu, sigma.sq/n) The problem is not as simple as can appear. All my experiments didn?t 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
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
On Tue, 29 Apr 2003 20:54:25 +0100 (BST), you wrote in message <20030429195425.18439.qmail at web10904.mail.yahoo.com>:
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)
x(t,i)~N(mu, sigma.sq/n) The problem is not as simple as can appear. All my experiments didn?t give me anything so far. Are there any tools to do this?
Work out the joint distribution of the x's conditional on y, then sample from that. This sort of calculation appears in lots of places, e.g. Searle (1971), Linear Models, p. 47. Duncan Murdoch