ST 307 Topic 8

$35.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (3 votes)

For this activity you will create a SAS program and upload that program to Moodle.
Everyone must submit their own code. Be sure that your SAS file adheres to the
SAS file submission guidelines (available on Moodle).
The sashelp.bweight data set contains information about the weights of new born
babies and features of their mothers. Note that for Boy variable and MomSmoke
variable, “1” stands for boys or Mom Smokers;
1. Create a new library called “topic8”. And copy the following code to do a simple
random sampling of the data. Then print out the output data set to see what it looks
like. The rest of the questions will be based on the sampled observations.
proc surveyselect data=sashelp.Bweight method=srs n=200 out=infants seed=12345;
run;
2. Use PROC TTEST to do the following t-tests for the mean weight. In the
comment, give the conclusion of each test.
a. One-sided t-test H0: mean weight < 3000, at significance level of 0.1;
b. Two-sided t-test H0: mean weight = 3300, at significance level of 0.05,
report the 95% confidence interval of mean weight;
c. Answer in comments: Does the data seem to be normal? What kind of plot
do you use to draw the conclusion?
3. Use PROC FREQ to do a proportion test of infants’ sex (1 stands for boys):
a. H0: proportion of boys = 0.4, at significance level of 0.1. (Hint: check the
binomial option of TABLE statement)
b. In the comment, report the 90% confidence limits for boys’ proportion (use
Exact CL, note that the default output for CL is for level=0), and make a
conclusion of the test.
4. Use PROC TTEST to test for whether the mean of MomWtGain equals 0, at
significance level of 0.05, by MomEdLevel. In comments, make conclusion for
each group.
(Hint: you must sort the data first and output it to a new data set, then use the
sorted data to do TTEST for each group).
5. Do the followings:
a. Select the girl infants (0 stands for girls) with smoking mother (1 stands for
smoker), store the data permanently in the topic8 library.
b. Two-sided t-test H0: mean weight = 4000, at significance level of 0.05,
c. Make a conclusion, and report a 95% confidence interval.