Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num<-Rmpfr::mpfr(4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727 ,10000)
- count <- c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
- for(i in 0:99) {
- if(num %% 10==0) {
- count[1] <- count[1] + 1
- }
- if(num %% 10==1) {
- count[2] <- count[2] + 1
- }
- if(num %% 10==2) {
- count[3] <- count[3] + 1
- }
- if(num %% 10==3) {
- count[4] <- count[4] + 1
- }
- if(num %% 10==4) {
- count[5] <- count[5] + 1
- }
- if(num %% 10==5) {
- count[6] <- count[6] + 1
- }
- if(num %% 10==6) {
- count[7] <- count[7] + 1
- }
- if(num %% 10==7) {
- count[8] <- count[8] + 1
- }
- if(num %% 10==8) {
- count[9] <- count[9] + 1
- }
- if(num %% 10==9) {
- count[10] <- count[10] + 1
- }
- num <- num%/%10
- }
- count
- matrice <- matrix(c(0,1,2,3,4,5,6,7,8,9,count[1],count[2],count[3],count[4],count[5],count[6],count[7],count[8],count[9],count[10]), nrow = 2, byrow = TRUE)
- matrice
- text_h0<-chisq.test(matrice)
- text_ksi
- text_h1<-pearson.test(matrice)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement