Answer to Question #210319 in Programming & Computer Science for sam21ucd

Question #210319

Write down the R solutions of the following question.

Use the following data to construct a confidence interval for the true mean difference between scores of two independant groups. Use a 95% level of confidence. Group1: 65, 58, 78, 60, 68, 69, 66, 70, 53, 71, 63, 63

Group 2: 62, 53, 36, 34, 56, 50, 42, 57, 46, 68, 48, 42, 52, 53, 43 


1
Expert's answer
2021-06-25T07:13:50-0400

The following R code can be used.

> t.test(c(65,58,78,60,68,69,66,70,53,71,63,63),c(62,53,36,34,56,50,42,57,46,68,48,42,52,53,43),conf.level = .95)$conf.int

To make the code shorter, data can be entered first as follows.

> Group1=c(65,58,78,60,68,69,66,70,53,71,63,63)
> Group2=c(62,53,36,34,56,50,42,57,46,68,48,42,52,53,43)

Then the code becomes;

> t.test(Group1,Group2,conf.level = .95)$conf.int

The output of the code is

[1]  9.531687 22.201646
attr(,"conf.level")
[1] 0.95

The confidence interval for the difference in means is {9.531687,22.201646}.



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