1 page single spaced statistics technical required in 8 hours
1
PPOL 552 Fall 2016 (Prof. Jensen) Statistics Lab Assignment
Overview For this assignment, you will work with a partner that you choose to conduct some simple statistical analyses of a selected dataset. We will work through some examples in class, and then you will work with your partner to continue and extend the analysis. Then you will write a concise memo sharing and describing your findings. Your memo should be uploaded to Canvas no later than 9:00 p.m. on Monday, December 5th, 2016. Instructions 1. For this assignment, you should download the following files from Canvas, under Files > Statistics Lab:
• GSS14_lab.dta – the 2014 General Social Survey dataset; • Codebook_GSS14_lab.pdf – the codebook describing the variables in the dataset and their coding; • GSS14_do.do – the “do-file” from the class containing example commands that you can adapt and re-use for
your own analysis; • Lab_Worksheet – this document, containing the instructions for the assignment, the commands and results
from our work as a class, and some example interpretations of the results.
2. While in class on November 17th, we learned how to perform several simple statistical analyses using Stata, the results of which are found beginning on page 2 of this document. Specifically, we learned to:
• Summarize variables of different metrics (nominal, ordinal, interval, ratio); • Estimate confidence intervals for the mean of a numeric variable; • Estimate confidence intervals for the proportions of a categorical variable; • Estimate proportion confidence intervals for one categorical variable subdivided by the values of another
confidence interval (we did this for education levels subdivided by type of employer); • Test for association between two categorical variables.
3. After the class, you and your partner should work together to conduct similar analyses of any variables in the dataset. Your goal should be to develop 3-4 new and interesting findings about the population of American adults (so you may not use the example findings in this document). You may use any of the statistical procedures we learned as shown in step 2 above, but your findings must include at least one test of association between categorical variables.
Please print and bring your test of association to our final class on December 1st. I will ask for some volunteers to share their tests of association and we will discuss how to correctly interpret them.
4. Once you have completed your statistical analysis, you should write up your results in a 2-3 page single-spaced memo. Please don’t copy-and-paste all of your Stata commands and output into the memo—instead, you should select only those results that you wish to highlight. Include the Stata command you ran and its results, clearly highlight the relevant information in those results, describe the results concisely, and provide a clear interpretation of the results in plain language. You should consult the example interpretations in the attached worksheet, but must write your results in your own words. Be sure to focus on what you’ve learned about the POPULATION, not the sample—remember, that is the goal of statistical inference.
Grading and Assistance Your completed memo will be graded on the accuracy of your analyses and interpretations, the clarity of your writing, and the real-world relevance of your insights. Aim to provide concise, accurate, and thoughtful explanations. It is much better to write a simple finding well than to write a complex finding poorly. Please use the “Statistics Lab” discussion board to post general questions about the assignment, and I also encourage you to visit your TA or myself during office hours with any other questions. Good luck!
2
Statistics Lab Worksheet PPOL 552 Research Methods
1. Let’s begin by summarizing some variables:
SEE THE .DO FILE FOR EXAMPLE COMMANDS TO USE IN THIS SECTION.
Variable Level Shape Center Dispersion
sex Nominal One peak Mode = Female VR = 0.4437
age Ratio One peak Symmetrical Bell-shaped
Mean = 49.9 SD = 17.0
degree Ordinal One peak Skewed Reverse j
Mode = high school
VR = 0.4995
conrinc Ratio One peak Skewed Reverse j
Median = 24017.5
IQR = 28636.3
incom16 Ordinal 1 peak Bell shaped Somewhat right skewed
Mode = average VR = .5634
wrkgovt Nominal One peak Mode= Private employer
VR= 0.1974
eqlwlth Ordinal Multi-modal
Mode = (1) Government should reduce income differences
VR = 0.7941
helppoor Ordinal One Peak, Symmetrical, Bell Shaped
Mode= Agree with both
VR= 0.5706
partyid Ordinal Two Peaks Mode= Independent
VR= 0.814
0 5
10 15
20 P
er ce
nt
0 2 4 6 8 should govt reduce income differences
3
2. Let’s use the sample data to make some confidence interval estimates:
** estimate a 95% confidence interval for mean conrinc ** NOTE: Two versions of this command exist, but it is likely that ** only one will work, depending on your Stata version. If one does ** not work, try the other. ci conrinc, level(95) ci means conrinc, level (95)
Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- conrinc | 2,274 34348.63 682.3961 33010.44 35686.81
Example Interpretation: • Based on this sample, I am 95% confident that the population mean income is between
$33,0101 and $35,686. • Being “95% confident” means that 95% of the possible samples would produce
confidence intervals that contain the actual population mean. It also means that, due to sampling error, there is a 5% chance of drawing a sample and estimating a confidence interval from it that doesn’t contain the population mean.
** estimate 99% confidence interval for a categorical variable’s proportions proportion degree, level(99)
Proportion estimation Number of obs = 3,748 _prop_1: degree = lt high school _prop_2: degree = high school _prop_3: degree = junior college -------------------------------------------------------------- | Proportion Std. Err. [99% Conf. Interval] -------------+------------------------------------------------ degree | _prop_1 | .1181964 .0052741 .1052664 .1324793 _prop_2 | .5005336 .0081682 .4794944 .5215709 _prop_3 | .0747065 .0042951 .0643638 .0865575 bachelor | .191302 .0064256 .1752869 .2084106 graduate | .1152615 .0052168 .1024836 .1294028 -------------------------------------------------------------- Example Interpretation:
• Based on this sample, I am 99% confident that between 10.2% and 12.9% of the population has a graduate degree. I am also 99% confident that between 10.5% and 13.2% of the population has not completed high school.
• Since these two confidence intervals overlap each other, I can’t be confident about which of these two groups is the largest in the population. They could even be exactly equal in size, even though the estimates are not equal.
• I am also 99% confident that a third group, those whose highest degree is a bachelor’s degree, is larger than either of the two groups discussed above because its confidence interval (17.5% to 20.8%) does NOT overlap either of the other two confidence intervals.
4
** estimate proportion intervals for values of another categorical variable proportion degree, over(wrkgovt) level(95)
Proportion estimation Number of obs = 3,581 _prop_1: degree = lt high school _prop_2: degree = high school _prop_3: degree = junior college bachelor: degree = bachelor graduate: degree = graduate govt: wrkgovt = govt private: wrkgovt = private -------------------------------------------------------------- Over | Proportion Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ _prop_1 | govt | .0509194 .0082735 .0369368 .0698114 private | .1221294 .0061088 .1106489 .1346209 -------------+------------------------------------------------ _prop_2 | govt | .3946252 .0183951 .3591902 .4312036 private | .5313152 .00931 .5130281 .5495187 -------------+------------------------------------------------ _prop_3 | govt | .0777935 .0100805 .0601883 .1000003 private | .0758525 .0049396 .0667177 .0861226 -------------+------------------------------------------------ bachelor | govt | .2220651 .0156426 .1929108 .2542374 private | .1875435 .0072825 .1736812 .2022414 -------------+------------------------------------------------ graduate | govt | .2545969 .0163953 .2238053 .2880527 private | .0831594 .0051515 .073601 .0938334 -------------------------------------------------------------- Example Interpretation:
• Based on this sample, I am 95% confident that between 22.4% and 28.8% of government employees in the population have graduate degrees.
• I am also 95% confident that between 7.4% and 9.4% of private sector employees in the population have graduate degrees.
• Since these two intervals do not overlap, I am also 95% confident that a larger proportion of government employees have graduate degrees than do private sector employees.
• This might also suggest that the amount of education and the type of employer have a pattern of association in the population, though further statistical testing is needed to assess this possibility (see the next section).
5
3. Let’s test whether or not there is an association in the population between amount of education and type of employer (“chi-squared test”): ** NOTE: The following test of association is only appropriate when both ** variables are categorical. Other tests of association are required when ** one or more of the variables are numeric, but they are beyond the scope ** of this activity. ** create a cross-tab frequency table showing two categorical variables tab2 degree wrkgovt ** add percentages (row and column) to each of the cells in the cross-tab tab2 degree wrkgovt, row col ** add the chi-squared statistic to each cell of the table and calculate ** a p-value for the chi-squared test of association tab2 degree wrkgovt, row col cchi2 chi2 +-------------------+ | Key | |-------------------| | frequency | | chi2 contribution | | row percentage | | column percentage | +-------------------+ | govt or private rs highest | employee degree | govt private | Total ---------------+----------------------+---------- lt high school | 36 351 | 387 | 21.4 5.3 | 26.6 | 9.30 90.70 | 100.00 | 5.09 12.21 | 10.81 ---------------+----------------------+---------- high school | 279 1,527 | 1,806 | 16.9 4.2 | 21.0 | 15.45 84.55 | 100.00 | 39.46 53.13 | 50.43 ---------------+----------------------+---------- junior college | 55 218 | 273 | 0.0 0.0 | 0.0 | 20.15 79.85 | 100.00 | 7.78 7.59 | 7.62 ---------------+----------------------+---------- bachelor | 157 539 | 696 | 2.8 0.7 | 3.5 | 22.56 77.44 | 100.00 | 22.21 18.75 | 19.44 ---------------+----------------------+---------- graduate | 180 239 | 419 | 114.4 28.1 | 142.5 | 42.96 57.04 | 100.00 | 25.46 8.32 | 11.70 ---------------+----------------------+---------- Total | 707 2,874 | 3,581 | 19.74 80.26 | 100.00 | 100.00 100.00 | 100.00 Pearson chi2(4) = 193.6822 Pr = 0.000
A
B
C
D
6
Example Interpretation: • In this sample, 19.74% of the sample works for the government and 80.26% of the
sample works for private sector employers. (Shown at letter A on the output.) • If there was no association between these two variables in the sample, the percentages of
government and private sector employees would be the same for all values of the education variable. This is very close to the case for the “junior college” degree holders (shown at letter B)—the percentages of government employees in this category is 20.15% and the percentage of private sector employees is 79.85%, very close to the overall percentages. This is why these two cells have 0.0 listed as their chi-squared contribution value, showing no evidence of association in this case.
• However, all of the other cells DO show association. The biggest evidence of association is for people that hold graduate degrees—42.96% of government employees while only 57.04% of private sector employees do (shown at letter C). In other words, government employees are much more likely to have graduate degrees than are private sector employees. This is why these two cells have very high chi-squared values, i.e., 114.4 and 28.1, respectively.
• The total amount of association between education and type of employer is a statistic called chi-squared, which is calculated by Stata for us; any chi-squared greater than zero means there is some association in the sample. In this case, the chi-squared statistic is 193.6822 (shown at letter D), but we can’t really interpret this number beyond recognizing that is shows some association.
• The question is…is a chi-squared of 193.6822 likely to be found in a sample if there is actually no association in the population? The probability of this happening is called the p-value, and it is also shown at letter D, i.e., “Pr = 0.000”. The p-value can’t really be zero—it is just being rounded off—so we interpret this to mean that the p-value is something less than 0.001. In other words, the amount of association between education and type of employer that we found in this sample would only be found due to sampling error 1/10th of 1% of the time if there really isn’t any association in the population. In plain language, this is very strong evidence that is association between education and type of employer in the population.