HW Exercise 0316-2
Find all possible sums from rolling three dice using R. If possible, construct a histogram for the sum of three dice. Is this a probability histogram or an empirical histogram?
all possible sums from rolling three dice
## [1] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Constructing a histogram for the sum of three dice
d1<-sample(1:6,10000,T)
d2<-sample(1:6,10000,T)
d3<-sample(1:6,10000,T)
hist(d1+d2+d3, main="sum of three dices", ylab="Frequence", xlab="Total of points")