Question

This problem requires use of the MASS package installed in the previous home- work. Do the...

This problem requires use of the MASS package installed in the previous home-

work. Do the following:

  • – For the data frame birthwt in this package consider the variables bwt and smoke. Compare birth weight between smoking and non-smoking mothers by using a suitable command like boxplot.

  • – Run the t-test with and without the Welch approximation to test differ- ence in means for bwt for smoking and non-smoking mothers.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

install.packages("MASS")
library(MASS)
data(birthwt)
#a
boxplot(bwt~smoke ,data = birthwt)
#b
t.test(bwt~smoke ,data = birthwt)

0 smoke 0009 0000 00030 000 0000 bwt

> #b > t.test(bwt smoke ,data birthwt) Welch Two Sample t-test data bwt by smoke t = 2.7299, df = 170.1, p-value = 0.007003 a

p-value = 0.007003 < alpha

hence there is significant difference

Add a comment
Know the answer?
Add Answer to:
This problem requires use of the MASS package installed in the previous home- work. Do the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • could you please help me with this problem, also I need a little text so I...

    could you please help me with this problem, also I need a little text so I can understand how you solved the problem? import java.io.File; import java.util.Scanner; /** * This program lists the files in a directory specified by * the user. The user is asked to type in a directory name. * If the name entered by the user is not a directory, a * message is printed and the program ends. */ public class DirectoryList { public static...

  • summatize the following info and break them into differeng key points. write them in yojr own...

    summatize the following info and break them into differeng key points. write them in yojr own words   apartus 6.1 Introduction—The design of a successful hot box appa- ratus is influenced by many factors. Before beginning the design of an apparatus meeting this standard, the designer shall review the discussion on the limitations and accuracy, Section 13, discussions of the energy flows in a hot box, Annex A2, the metering box wall loss flow, Annex A3, and flanking loss, Annex...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT