PS601
How to do HW12
Here is a step-by-step description of how to do Assignment 12.
First you need to think of a general hypothesis you might like to test. Essentially you should try to think of something that is measurable that you can conjecture may differ for two different groups. You will also need to have data that lets you classify the cases into the two groups.
For instance, suppose you want to see if Southern states are significantly lower in per capita income than the other states.
Southern States are easy to define: Alabama, Florida, Georgia, Louisianna, Mississippi, North Carolina, South Carolina, Tennessee, Virginia. (You can also include some border states: Arkansas, Kentucky, Maryland, Missouri, Texas, West Virginia - depending on your speculation/theory)
First find per capita income for the 50 states.
Since this was the demo in Assignment 1, this will not be hard.
Find data and Construct Excel data set
The data Personal Income Per Capita, by State provides us a simple example. See Assignment 1 for details on importing data
In order to compare the Southern states to the rest of the country, we will need to create a new variable for South. Simple create a new column, label it, and place either 0 or 1 in the cell as appropriate (1=South is recommended).Example data: PersIncPC.xls
Note that this is a cleaned up data set. All labels are removed; the period by the state name have been deleted; the columns are labeled in the first row with 1-word (7 character) identifying labels.
Use Stat Transfer 5.0 to convert the Excel data set to the Stata data set: PersIncPC.dta
Run the F-test to see if the variances are equal or unequal. Use the two-tailed test (the middle column)
sdtest pcinc98, by (south)
Run the appropriate t-test, in this case the equal variance test since the variances are equal. We determine this by seeing that the F for unequal variances is 40.8 with a p(F)= .1455
ttest pcinc98, by (south)
The results for the variance test and the t-test look like this.
Decide prior to running the analysis whether you believe the Southern states have a lower or higher Per Capita Income than the non-Southern states. In other words, will you be doing a one- or two-tailed test? In this case let's suggest that Southern states have a lower inclome (one-tailed, mean of South less than non-South.)
We find that the F for unequal variances is 40.8 with a p(F)=.1455, so we conclude that the sample variances are not statistically significantly different from each other. As a result, we will use the equal variance t-test.
First we note that the mean for the Southern states is $23211 per capita, while the non-South has a slightly higer mean at $25553. So Southern states are lower. As a result the difference between Non-South and South is positive. (This is due to the way we set up the problem and define our groups. If non-South was coded 1 and South 0, the difference would be negative.)
The equal variance t-test value is 1.6526, and the p(t) for the one-tailed test where the difference is positive is p=.0525. Since we set alpha equal to .05, and we find that the p(t) is greater that this (even if just slightly), we conclude that the per capita personal income of the Southern states in 1998 is not statistically significantly lower than the rest of the country.
Your write-up should have the following parts:
- A simple statement of the hypothesis you will test with the t-test.
- A description of the data.
- The variance test results.
- The t-test results.
- The interpretation, in English, of the t-test/hypothesis test results.
All of this can be easily done in 1 page.