Answer to Question #210317 in Programming & Computer Science for KLAUSXMİKE

Question #210317

Write down the R solutions of the following questions.

Two types of medication for COVID-19 are being tested to determine if there is a difference in the percentage of adult patient reactions. 20 out of a random sample of 200 adults given Medication_A still had COVID-19 30 minutes after taking the medication. 12 out of another random sample of 200 adults given Medication_B still had COVID-19 30 minutes after taking the medication. Test the equality of proportions at a 1% level of significance.


1
Expert's answer
2021-06-25T07:18:52-0400

"x_a=20"

"n_a=200"

"x_b=12"

"n_b=200"

"\\alpha=0.01"

"H0:P_a=P_b"

"Ha:P_a\\ne P_b"

The following R code can be used (with continuity correction).

> prop.test(x=c(20,12),n=c(200,200),conf.level = .99)

The results are;

	2-sample test for equality of proportions with continuity correction

data:  c(20, 12) out of c(200, 200)
X-squared = 1.6644, df = 1, p-value = 0.197
alternative hypothesis: two.sided
99 percent confidence interval:
 -0.03469035  0.11469035
sample estimates:
prop 1 prop 2 
  0.10   0.06 

The p-value is 0.197 which is greater than 0.01. Thus, we fail to reject the null hypothesis and conclude that that there is no significant difference between the two proportions.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS