I have used the following line of code but it doesn't give me the right answer for (
test statistic while it gives the right answer for
p-value regarding the following question:
"Consider testing H_0: p = 0.5 against H_1: p ≠ 0.5, given that there were 38 successes in a sample of size 56. Find the value of the (chi-squared) test statistic. (Do not use the continuity correction.)"
> prop.test(38,n=56,p=1/2) 1-sample proportions test with continuity correction data: 38 out of 56, null probability 1/2 X-squared = 6.4464, df = 1, p-value = 0.01112 alternative hypothesis: true p is not equal to 0.5 95 percent confidence interval: 0.5390880 0.7935168 sample estimates: p 0.6785714
Can you give some explanation in your answers? I am not coming from a statistics background.