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 pts
Write a function from scratch that accepts the number of successes and sample size then calculates and prints
the zconfidence interval the population proportion. Test your function using a sample where there are
successes out of observations.
You can recycle code from module the reference files may be useful
Question pts
Using the same data as in question write one line of code that calculates the confidence interval.
Use the function prop.test and the argument correctFALSE.
Question pts
Compare the runtime of your userdefined function versus the built in function. Which is faster? Hint:
proc.time or microbenchmark may be useful.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
