Question: R questions Question 1. This is an example how to create a function in R which performs a two-sided hypothesis test of means in large

 R questions Question 1. This is an example how to create

R questions Question 1. This is an example how to create a function in R which performs a two-sided hypothesis test of means in large samples ##Function for two-tailed hypothesis test in large samples set.seed(9) z.hyptest.twotail = function(muhyp,n,xbar,s,alpha) { zstar = qnorm(1-alpha/2) SE = s/sqrt(n) teststat = (xbar-muhyp)/SE p = 1-pnorm(teststat) print("critical value:") print(zstar) print("test statistic:") print(teststat) print("p-value:") print(p) if ((teststat>=-zstar) & (teststat

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!