A random sample of Democrats and a random sample of Republicans were polled on an issue. Of 100 Republicans, 69 would vote yes on the issue; of 200 democrats, 123 would vote yes. Let pl and p2 denote respectively the proportions of all Democrats or all Republicans who would vote yes on this issue. Use the R script to finish the following questions.
(a) Construct a 95% confidence interval for pl - p2
(b) Can we say that more Democrats than Republicans favor the issue at the 1% level of significance.

Respuesta :

Answer:

Step-by-step explanation:

(a)

For the two proporion confidence interval p1-p2

# by default R = 95% confidence interval

The R-code = prop.test(X = c(123,690, n=c (200, 100))

where;

x - takes favorable cases

n - sample size

(b)

Here;

[tex]H_o : p_1 =p_2[/tex]

[tex]H_1 : p_1 > p_2[/tex]

The R-code = prop.test (X = c(123,690, n=c (200, 100)), alternative = "greater", conf.int = 0.99)

Now;

From the information given;

out of 200 democrats, 123 voted yes;

[tex]p_1 = \dfrac{123}{200}[/tex]

[tex]p_1 = 0.615[/tex]

Since 69 voted yes out of 100 republicans, then:

[tex]p_2 = \dfrac{69}{100}[/tex]

[tex]p_2 =0.69[/tex]

For pooled proportion;

[tex]\hat p = \dfrac{n_1p_1+n_2p_2}{200 + 100}[/tex]

[tex]\hat p = \dfrac{123+69}{200 + 100}[/tex]

[tex]\hat p = \dfrac{192}{300}[/tex]

[tex]\hat p = 0. 64[/tex]

Since p = 0.64

Then; q = 1 - p

q = 1 - 0.64

q = 0.36

The confidence interval for the difference in population proportion

[tex]= (p_1 - p_2 ) \pm z_{\alpha/2} \sqrt{(pq)(\dfrac{1}{n_1}+\dfrac{1}{n_2}) }[/tex]

[tex]C.I = 1 - \alpha \\ \\ C.I = 1 - 0.95 = 0.05[/tex]

[tex]z_{\alpha /2} = z_{0.05 /2} \\ \\ z_{0.025} = 1.96[/tex]

[tex]= (0.615- 0.69) \pm 1.96 \sqrt{(0.64 \times 0.36)(\dfrac{1}{100}+\dfrac{1}{200}) }[/tex]

[tex]= -0.075 \pm 0.11522[/tex]

[tex]= (-0.075 - 0.11522,-0.075 + 0.11522)[/tex]

[tex]= (-0.19022,0.04022)[/tex]

Lower limit = -0.19022

upper limit = 0.04022

Thus; the 95% confidence interval lies between:

-0.19022 < p1 - p2 < 0.04022

b)

Recall that:

Null hypothesis:

[tex]H_o :p_1 = p_2[/tex]

Alternative hypothesis:

[tex]H_1 : p_1 > p_2[/tex]

This is a right-tailed test.

The z test statistics can be computed as:

[tex]z = \dfrac{\hat p_1 - \hat p_2}{\sqrt{pq(\dfrac{1}{n_1} + \dfrac{1}{n_2} )}}[/tex]

[tex]z = \dfrac{0.615 -0.69}{\sqrt {(0.64*0.36) (\dfrac{1}{100} + \dfrac{1}{200} )}}[/tex]

[tex]z = -1.276[/tex]

P-value = P(Z > -1.276)

P-value = 0.899

Decision rule: Reject the null hypothesis if P-value < level of significance at 0.01

Conclusion: We fail to reject the null hypothesis since P-value is greater than the level of significance and we conclude that there is insufficient evidence to say that more democrats favor the issue at the 1% level of significance than the republicans.

ACCESS MORE
EDU ACCESS
Universidad de Mexico