Re: [R] Interpreting R -results for Bivariate Normal

2009-06-07 Thread Peter Dalgaard

beetle2 wrote:

HI Guys,
I know that this forum is not for homework but I am trying to interpret R
output code.
I was just wondering if someone might be able to help.


Well, if homework, we can only give hints.



I have been given the following.

For (X1,X2) distributed bivariate normal with parameters 

mu1 = 5.8  
mu2 = 5.3  
sd1 = sd2 = 0.2


and p = 0.6


That's Greek letter rho, not p, I expect.



The r-code and inpit/output are as follows

input

m <- 5.3 + 0.6*(6.3 - 5.8)
s  <- sqrt(0.2^2*(1-0.6^2))
q  <- seq(5.12,6.08,0.16)

print(rbind(q,pnorm(mean=m,sd=sd=s,q=q)))

output

q 5.1200  5.280   5.44   5.6 5.76 5.926.1
   0.0013  0.023   0.16   0.5 0.84 0.981

I have been asked to interpret 


E[X2|X1 = 6.3] and varE[X2|X1 = 6.3]


I take it that s<- = 0.16 is the standard variation


Standard _deviation_


So I am assuming that varE[X2|X1 = 6.3] = 0.16^2 = .0256

m <- 5.3 + 0.6*(6.3 - 5.8) = 5.6this the Expected value of E[X+Y]


What makes you think that? E[X+Y] is mu1+mu2.

The m calculation could also have been written

x1 <- 6.3
m <- 5.3 + 0.6*(x1 - 5.8)

Now go back to your text book and read up on the formulas that connect 
correlation and regression coefficients.





I see from the output that this would be correct because the probability of
5.6 = 0.5


to interpret E[X2|X1 = 6.3] I can't see it in the output.  And I'm not sure
how to find the conditional probabilty from the output.

Any help would be greatly appreciated







--
   O__   Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - (p.dalga...@biostat.ku.dk)  FAX: (+45) 35327907

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Interpreting R -results for Bivariate Normal

2009-06-07 Thread beetle2

HI Guys,
I know that this forum is not for homework but I am trying to interpret R
output code.
I was just wondering if someone might be able to help.

I have been given the following.

For (X1,X2) distributed bivariate normal with parameters 

mu1 = 5.8  
mu2 = 5.3  
sd1 = sd2 = 0.2

and p = 0.6

The r-code and inpit/output are as follows

input

m <- 5.3 + 0.6*(6.3 - 5.8)
s  <- sqrt(0.2^2*(1-0.6^2))
q  <- seq(5.12,6.08,0.16)

print(rbind(q,pnorm(mean=m,sd=sd=s,q=q)))

output

q 5.1200  5.280   5.44   5.6 5.76 5.926.1
   0.0013  0.023   0.16   0.5 0.84 0.981

I have been asked to interpret 

E[X2|X1 = 6.3] and varE[X2|X1 = 6.3]


I take it that s<- = 0.16 is the standard variation

So I am assuming that varE[X2|X1 = 6.3] = 0.16^2 = .0256

m <- 5.3 + 0.6*(6.3 - 5.8) = 5.6this the Expected value of E[X+Y]


I see from the output that this would be correct because the probability of
5.6 = 0.5


to interpret E[X2|X1 = 6.3] I can't see it in the output.  And I'm not sure
how to find the conditional probabilty from the output.

Any help would be greatly appreciated




-- 
View this message in context: 
http://www.nabble.com/Interpreting-R--results-for-Bivariate-Normal-tp23916967p23916967.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.