Please do this on R studio presentation and type in the code you need for the presentation as well as the explanation for the questions that need it. email the code use for the r presentation to n..z@mynbps.org with explanation please
- Read in the proptest_data2.csv data set provided on connect. The dataset contains 10 draws of flipping a coin 20 times. Each of these is stored as a column with 1 indicating a success and 0 a fail. Calculate the 95% confidence interval of the proportion of successes using pˆ ± 2se(pˆ).
- Say I told you that the true value of p was p = 0.25. How many of the 95% confidence intervals contain the true value of p?
- Using your answer from question 2, what would you estimate the level of confidence of your confidence intervals to be?
- Does this match the true level? (The level that you used to calculate them in the first place).
- Use prop.test() to calculate 95% CI’s for the first 4 columns of proptest_data2.csv.
- Which method is better?
- Read in the proptest_data3.csv data set provided on connect. The dataset contains 10 draws of flipping a coin 20 times. Each of these is stored as a column with 1 indicating a success and 0 a fail. Calculate the 95% confidence interval of the proportion of successes using pˆ ± 2se(pˆ). 3
STAT 121 LAB 7 4
- Say I told you that the true value of p was p = 0.85. How many of the 95% confidence intervals contain the true value of p?
- Using your answer from question 8, what would you estimate the level of confidence of your confidence intervals to be?
- Does this match the true level? (The level that you used to calculate them in the first place).
- Use prop.test() to calculate 95% CI’s for the first 4 columns of proptest_data2.csv.

