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]]
Why don't you just do this: 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, 100) lines(x, dnorm(x, 50000, 3000)) On Sat, Sep 12, 2009 at 5:47 PM, KABELI MEFANE<kabelimefane at yahoo.co.uk> wrote:> ?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 at 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. > >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?
Hi, I am dealing with how to check in R if some data that I have belongs to a normal distribution or not. I am not interested in obtaining the theoreticall frequencies. I am only interested in determing if (by means of a test as Kolmogorov, or whatever), if my data are normal or not. But I have tried with ks.test() and I have not got it. -- Noela Grupo de Recursos Marinos y Pesquerías Universidad de A Coruña [[alternative HTML version deleted]]
?shapiro.test -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Noela S?nchez Sent: Thursday, October 01, 2009 12:47 PM To: r-help at r-project.org Subject: [R] Normal distribution Hi, I am dealing with how to check in R if some data that I have belongs to a normal distribution or not. I am not interested in obtaining the theoreticall frequencies. I am only interested in determing if (by means of a test as Kolmogorov, or whatever), if my data are normal or not. But I have tried with ks.test() and I have not got it. -- Noela Grupo de Recursos Marinos y Pesquer?as Universidad de A Coru?a [[alternative HTML version deleted]] This email message, including any attachments, is for th...{{dropped:6}}
See fortune(234) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Noela S?nchez > Sent: Thursday, October 01, 2009 10:47 AM > To: r-help at r-project.org > Subject: [R] Normal distribution > > Hi, > > I am dealing with how to check in R if some data that I have belongs to > a > normal distribution or not. I am not interested in obtaining the > theoreticall frequencies. I am only interested in determing if (by > means of > a test as Kolmogorov, or whatever), if my data are normal or not. > > But I have tried with ks.test() and I have not got it. > > > -- > Noela > Grupo de Recursos Marinos y Pesquer?as > Universidad de A Coru?a > > [[alternative HTML version deleted]]
Reasonably Related Threads
- Problems with the commands FUNCTION and DERIV to build a polynomial
- Como asignar valores de un archivo a otro
- Interpreting GLM coefficients
- generic question ==>> mapping Longhurst biogeochemical ocean provinces in R
- annotating a filled contours plot with a grid of points