[R] Probabilities greather than 1 in HIST

2011-03-03 Thread jpmaroco
Dear all, I am a newbie in R and could not find help on this problem. I am trying to plot an histogram with probabilities in the y axis. This is the code I am using: #TLC uniform n=30 mi=1; mx=6 nrep=1000 xbar=rep(0,nrep) for (i in 1:nrep) {xbar[i]=mean(runif(n,min=mi,max=mx))} hist(xbar,prob=TRUE

Re: [R] Probabilities greather than 1 in HIST

2011-03-03 Thread jpmaroco
com] Sent: quinta-feira, 3 de Março de 2011 16:01 To: jpmaroco Subject: Re: Probabilities greather than 1 in HIST On Mar 3, 2011, at 8:03 AM, jpmaroco wrote: > Dear all, > I am a newbie in R and could not find help on this problem. I am > trying to > plot an histogram with p

Re: [R] Probabilities greather than 1 in HIST

2011-03-03 Thread jpmaroco
t;,n), xlab="Média", ylab="Probabilidade") curve(dnorm(x,mean=mean(xbar),sd=sd(xbar)),add=TRUE,lwd=2,col="red") Thanks anyway Best Jº From: Martyn Byng [via R] [mailto:ml-node+757-242386738-215...@n4.nabble.com] Sent: quinta-feira, 3 de Março de