-
-
Save itsdebartha/240f0a6a9a2135297eb514f5515b55b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mean_mat<-matrix(,nrow=12,ncol=12) #create a 12*12 matrix | |
for(i in 1:12) #loop 12 times | |
{ | |
for(j in 1:12) #loop 12 times again | |
{ | |
x<-replicate(10000,rolls(i,j)) #repeat the function 10000 times | |
mean_mat[i,j]<-mean(x) #add the mean of the above repitition to the matrix | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment