P8100 Homework Assignment 1

In the Class directory, you will find the dataset hsb2. We will use this dataset for the Homework Assignment 1. The following is a description of the data taken from https://stats.idre.ucla.edu/.

This data file contains 200 observations from a sample of high school students with demographic information about the students, such as their gender (female), socio-economic status (ses) and ethnic background (race). It also contains a number of scores on standardized tests, including tests of reading (read), writing (write), mathematics (math) and social studies (socst).

Here is a table of variables contained on the dataset:

Alphabetic List of Variables and Attributes

# Variable Type Len

2 female Num 8

1 id Num 8

9 math Num 8

6 prog Num 8

3 race Num 8

7 read Num 8

5 schtyp Num 8

10 science Num 8

4 ses Num 8

11 socst Num 8

8 write Num 8

1. Run the following SAS code

libname mydata “C:…\data”;

proc anova data=mydata.hsb2;

class female;

model math = female;

run;

a. What is the null hypothesis of this test?

b. What is the alternative hypothesis of this test?

c. State the Type I error and Type II error of this test

d. Copy and paste the ANOVA table and the output plot from the SAS output

e. State the F test result (i.e. F(df1, df2) = , p = ), state whether the test result is significant at the 0.05 level of significance, and make the final conclusion

2. Run the following SAS code

libname mydata “C:…\data”;

proc anova data=mydata.hsb2;

class race;

model math = race;

run;

a. What is the null hypothesis of this test?

b. What is the alternative hypothesis of this test?

c. State the Type I error and Type II error of this test

d. Copy and paste the ANOVA table and the output plot from the SAS output

e. State the F test result (i.e. F(df1, df2) = , p = ), state whether the test result is significant at the 0.05 level of significance, and make the final conclusion

3. Program by yourself to test the following null hypothesis:

HO: the average readings scores are the same across 3 socio-economic status.

a. Copy and paste your SAS program here

b. Copy and paste the ANOVA table and the output plot here

c. State the F test result (i.e. F(df1, df2) = , p = ), state whether the test result is significant at the 0.05 level of significance, and make the final conclusion

4. With the dataset hsb2, make a research question by yourself, write down the corresponding null hypothesis and alternative hypothesis, and program in SAS to test the hypothesis.

a. What is your research question?

b. What is the null hypothesis corresponding to your research question?

c. What is the alternative hypothesis corresponding to your research question?

d. Copy and paste your SAS program to test your hypothesis here

e. Copy and paste the SAS output from your SAS program here

f. State the results and make the final conclusion