Question: Please do the following in RStudio code See photo for info Question 1 . 1 [ 3 pts ] Write a function from scratch that

Please do the following in RStudio code
See photo for info
Question 1.1[3 pts]
Write a function from scratch that accepts the number of successes and sample size then calculates and prints
the 99% z-confidence interval the population proportion. Test your function using a sample where there are
800 successes out of 2000 observations.
You can recycle code from module 3(the reference files may be useful).
Question 1.2[2 pts]
Using the same data as in question 1.2, write one line of code that calculates the 99%-confidence interval.
Use the function prop.test and the argument correct-FALSE.
Question 1.3[2 pts]
Compare the runtime of your user-defined function versus the built in function. Which is faster? Hint:
proc.time or microbenchmark may be useful.
 Please do the following in RStudio code See photo for info

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!