The R Project for Statistical Computing Does anyone know how to use R to give a printout of the following?
"In 100 trials of rolling a pair of dice, let X be the number of trials each giving a total of "seven" on teh pair of dice. Plot the probablity histogram of X.
I'm trying to usep #Contains b(2;12,1/36),b(3;12,2/36),b(4;12,3/36) ,b(5;12,4/36) ,b(6;12,5/36) ,b(7;12,6/36) ,b(8;12,5/36) ,b(9;12,4/36) ,b(10;12,3/36) ,b(11;12,2/36) ,b(12;12,1/36) but the software says that its not even teh right way to define P
Edit: I might have figured it out, can someone letme know if this is the right commands
p<-dbinom(0:100, 100, 6/36)
barplot(p, names.arg=0:100, xlab="x",ylab="b(x; 100, 6/36)", main="Probability Histogram: Binomial (100,6/36)") |