glass
pen
clip
papers
heaphones

I,m working in Advance R hw

I,m working in Advance R hw

Description

Hi  I have R homework, The instructor gave us the function but we have to adjust it and add things to it. I`ll be posting everything after you accept the question. the materials in the homework are grand loop structure,aka the sledgehammer approach writing function  in r, ditch the grand loop. Here is half of the question ( Estimate the probability if obtaining a “full house”, which is 3 cards of one denomination and 2 cards of another denomination (for example, denominations A,A,A,9,9 in some order)) Estimate the probability of obtaining 4 aces  After obtaining the results of your final simulation, use binom.test() to obtain 95% confidence intervals for the true probabilities being estimated in (a) and (b).  I added a couple additional bits of information to the output list to facilitate calling binom.test )( Q2 Assume that the data are Normally distributed for both samples and that the population means mu1=mu2=0.The values of sig1, sig2, n1, n2 will be arguments for the twosamplet.sim function along with the simulation size Msim.For each iteration of the grand loop, 

generate a normally distributed sample of size n1 having mu1=0 and the specified sig1 value

generate a normally distributed sample of size n2 having mu2=0 and the specified sig2 value

Call the Ch 12 function using the generated data

  • If the computed confidence interval contains zero (“success”), update a counter.
  • When all iterations are complete, your function should return a one-row data frame with the values of sig1,sig2,n1,n2,Msim, and the estimated probability that the confidence interval includes 0 (based on the Msim iterations)Just two questions and I will be posting the full question later on.