In: Statistics and Probability
(Use R Programming to Code) Use the Monte Carol simulation to estimate the probability that all six faces appear exactly once in six tosses of fair dice.
+ V V VI > x=c() > n=1000000 > for(i in 1:n) , KET P + count0=1 + countl=1 count2=1 + count3=1 + count4=1 count 5=1 + u=sort (runif(6,0,1)) #picking 6 random no's from u (0,1) and sorting them + if(u[1]<= (1/6)) count0=0 [+ if (u[2]>(1/6) && u[2]<= (2/6)) countl=0 + if (u[3]> (2/6) && u[3]<=(3/6)) count2=0 + if (u[4]> (3/6) && u[4]<= (4/6)) coun if (u[5]> (4/6) && u[5]<= (5/6)) count4=0 + if(u[6]> (5/6)) count 5=0 + if (counto+countl+count2+count 3+count 4+counts==0)x[i]=1 + else x[i]=0 - w MERR 5 > sum (x) /n [1] 0.015312