Problem with Histogram

Could you a bit more precise in what you mean by "...result without taking care of probabilities of the gaussian curve"?

It looks like you're plotting just a uniform distribution from:

x <- seq(11,19,0.1)
x
#>  [1] 11.0 11.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 12.0 12.1 12.2 12.3
#> [15] 12.4 12.5 12.6 12.7 12.8 12.9 13.0 13.1 13.2 13.3 13.4 13.5 13.6 13.7
#> [29] 13.8 13.9 14.0 14.1 14.2 14.3 14.4 14.5 14.6 14.7 14.8 14.9 15.0 15.1
#> [43] 15.2 15.3 15.4 15.5 15.6 15.7 15.8 15.9 16.0 16.1 16.2 16.3 16.4 16.5
#> [57] 16.6 16.7 16.8 16.9 17.0 17.1 17.2 17.3 17.4 17.5 17.6 17.7 17.8 17.9
#> [71] 18.0 18.1 18.2 18.3 18.4 18.5 18.6 18.7 18.8 18.9 19.0

Created on 2018-04-11 by the reprex package (v0.2.0).


Do you maybe want to do something like this?


op <- par(mfrow=c(3,1))
hist(rnorm(10, mean=15, sd=1), xlim=range(11:19), main="Size 10", xlab="x")
hist(rnorm(100, mean=15, sd=1), xlim=range(11:19), main="Size 100", xlab="x")
hist(rnorm(10000, mean=15, sd=1), xlim=range(11:19), main="Size 100000", xlab="x")


Also just a small note, it's usually nice to format your code up with markdown. FAQ: How to format your code
If you want to save time, check out the reprex package.

1 Like