Dear All 
 
let me go one step further by asking you if you could help me show that the 
distribution of this data in normal.  have a little idea (by trial and 
error) but i seem to not fully understand how its done.
 
H<-rnorm(100, mean=50000, sd=3000)
par(las=1)
hist(H, breaks=seq(40000, 60000, 1000), freq=F)
f<- function(x) exp(-(x-5000)^2/18000000)/sqrt(18000000*pi) 
x<- seq(40000, 60000, 1000)
lines(x,f(x))
 
The code works when  its like this:
 
H<-rnorm(100, mean=5000, sd=1000)
par(las=1)
hist(H, breaks=seq(2000, 8000, 100), freq=F)
f<- function(x) exp(-(x-5000)^2/2000000)/sqrt(2000000*pi) 
x<- seq(2000, 8000, 50)
lines(x,f(x))
 
Please tell me or advice of an easier or understandable code

 

 


      
        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to