Question

In: Statistics and Probability

(Use R Programming to Code) Use the Monte Carol simulation to estimate the probability that all...

(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.

Solutions

Expert Solution

+ 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


Related Solutions

preform a Monte Carlo simulation in R to generate the probability distribution of the sum of...
preform a Monte Carlo simulation in R to generate the probability distribution of the sum of two die (for example 1st die is 2 and second die is 3 the random variable is 2+3=5). The R-script should print out (display in R-studio) or have saved files for the following well labeled results: 1. Histrogram or barchart of probability distribution 2. Mean of probability distribution 3. Standard deviation of probability distribution
Perform Monte Carlo integration using R statistical programming to estimate the value of π. Generate N...
Perform Monte Carlo integration using R statistical programming to estimate the value of π. Generate N pairs of uniform random numbers (x,y), where x ∼ U(0,1)and y ∼ U(0,1) and each (x,y) pair represents a point in the unit square. To obtain an estimate of π count the fraction of points that fall inside the unit quarter circle and multiply by 4. Note that the fraction of points that fall inside the quarter circle should tend to the ratio between...
You may use your programming of choice to implement and simulate. Please turn in the code, simulation, and a description of what is going on in the simulation.
You may use your programming of choice to implement and simulate. Please turn in the code, simulation, and a description of what is going on in the simulation.
Running a Monte Carlo simulation to calculate the probability that the daily return from S&P will...
Running a Monte Carlo simulation to calculate the probability that the daily return from S&P will be > 5%. We will assume that the historical S&P daily return follows a normal distribution with an average daily return of 0.03 (%) and a standard deviation of 0.97 (%). To begin we will generate 100 random samples from the normal distribution. For the generated samples we will calculate the mean, standard deviation, and probability of occurrence where the simulation result is greater...
Using R Studio/R programming... Usually, we will use a random sample to estimate the statistics of...
Using R Studio/R programming... Usually, we will use a random sample to estimate the statistics of the underlying population. If we assume a given population is a standard normal distribution and we want to estimate its mean, which is the better technique to estimate that mean from a sample: Use the mean of one random sample of size 500 Use the mean of 300 random samples of size 10 Run your own experiment and use your results as a supporting...
problem is also a Monte Carlo simulation, but this time in the continuous domain: must use...
problem is also a Monte Carlo simulation, but this time in the continuous domain: must use the following fact: a circle inscribed in a unit square has as radius of 0.5 and an area of ?∗(0.52)=?4.π∗(0.52)=π4. Therefore, if you generate num_trials random points in the unit square, and count how many land inside the circle, you can calculate an approximation of ? For this problem, you must create code in python (A) Draw the diagram of the unit square with...
Does anyone know the code to use in R programming to create a scatter plot?
Does anyone know the code to use in R programming to create a scatter plot?
Does anyone know the code to use in R programming to create a box plot?
Does anyone know the code to use in R programming to create a box plot?
Use R programming to resolve this; can you please provide details on the code? A) Create...
Use R programming to resolve this; can you please provide details on the code? A) Create a dataframe – comparativeGenomeSize with the following vectors: > organism<-c("Human","Mouse","Fruit Fly", "Roundworm","Yeast") > genomeSizeBP<-c(3000000000,3000000000,135600000,97000000,12100000) > estGeneCount<-c(30000,30000,13061,19099,6034) B) Print the organism and estGeneCount for Human and fruitfly.(1) C) Add a column to this data frame calculating base pairs per gene. To do this, write a function “genedensity” that takes as arguments the genomesizeBP and estimatedGeneCount information, and calculates from this the estimated bp per gene....
PLEASE USE R PROGRAMMING TO SOLVE THIS AND PASTE A COPYABLE CODE Photoresist is a light-sensitive...
PLEASE USE R PROGRAMMING TO SOLVE THIS AND PASTE A COPYABLE CODE Photoresist is a light-sensitive material applied to semiconductor wafers so that the circuit pattern can be imaged on to the wafer. After application, the coated wafers are baked to remove the solvent in the photoresist mixture and to harden the resist. Here are measurements of photoresist thickness (in kA) for eight wafers baked at two different temperatures. We want to see whether different temperatures make difference. The data...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT