In: Statistics and Probability
Exercises 4.59 to 4.64 give null and alternative hypotheses for a population proportion, as well as sample results. Use StatKey or other technology to generate a randomization distribution and calculate a p-value. StatKey tip: Use “Test for a Single Proportion” and then “Edit Data” to enter the sample information.
4.62 Hypotheses: H0 :
p = 0.6 vs Ha : p >
0.6
Sample data: pHat=52/80=0.65 with n=200
In this problem, create and plot the randomization distribution and compute the pValue using rstudio.
Show R studio code/file
The StatKey output is:

The hypothesis being tested is:
H0: p = 0.6
Ha: p > 0.6
| Observed | Hypothesized | |
| 0.5375 | 0.6 | p (as decimal) | 
| 43/80 | 48/80 | p (as fraction) | 
| 43. | 48. | X | 
| 80 | 80 | n | 
| 0.0548 | std. error | |
| -1.14 | z | |
| .8731 | p-value (one-tailed, upper) | 
The p-value is 0.8731.
Since the p-value (0.8371) is greater than the significance level (0.05), we fail to reject the null hypothesis.
Therefore, we cannot conclude that p > 0.6.