X-Git-Url: https://code.communitydata.science/stats_class_2019.git/blobdiff_plain/d263f84bfd8345b813ef541e137c31e5b7e272de..6a19048e00f594ee1a194f1457462ad33e24a8a4:/problem_sets/week_01/ps1-worked_solution.Rmd?ds=sidebyside

diff --git a/problem_sets/week_01/ps1-worked_solution.Rmd b/problem_sets/week_01/ps1-worked_solution.Rmd
new file mode 100644
index 0000000..d6305ca
--- /dev/null
+++ b/problem_sets/week_01/ps1-worked_solution.Rmd
@@ -0,0 +1,95 @@
+---
+title: 'Week 1 Problem Set: Worked solutions'
+subtitle: "Statistics and statistical programming  \nNorthwestern University  \nMTS 525"
+author: "Aaron Shaw"
+date: "April 5, 2019"
+output: html_document
+---
+
+```{r setup, include=FALSE}
+knitr::opts_chunk$set(echo = TRUE)
+```
+
+## Programming Challenges
+
+No worked solutions to programming challenges this week. Make sure you completed the assignment as described. Contact us if you have trouble or are uncertain.
+
+## Statistical Questions
+
+All questions taken from the *OpenIntro* textbook, Chapter 1.
+
+### SQ1 â 1.6
+
+(a) 129 UC Berkeley students.
+(b) From the description in the question text and the paper it seems like there are two primary measures:
+* Unethical behavior (candies taken): discrete continuous measure.
+* Perceived social class (experimental treatment): categorical measure.
+(c) Many possible answers here. A basic one turns the first sentence around: What is the difference in unethical behavior by (perceived) social class?
+
+Note that the summary in *OpenIntro* sort of bungles/ignores the fact that the paper focuses on *perceived* social class rather than social class. That's a shame since the paper is very clear. I plan to contact the textbook authors about it if there are no corrections in the 4th edition.
+
+### SQ2 â 1.12
+
+(a) The population of interest is humans. The sample is the 129 UC Berkeley undergraduates who participated in the study.
+(b) Generalizability seems...limited in this study, although the paper describes an experiment in which *perceived* social class is manipulated and thus supports causal identification of effects of priming on unethical behavior. The study as described in the textbook does not support causal interpretations.
+
+
+### SQ3 â 1.52
+
+The median here looks to be about 80, while the mean looks to be about 75. You would expect this relationship (median > mean) because of the left skew of the data.
+
+### SQ4 â 1.56
+
+(a) The distribution is right skewed with potential outliers on the positive end, therefore the median and the IQR are preferable measures of center and spread.
+
+(b) The distribution is somewhat symmetric and has few, if any, extreme observations, therefore the mean and the standard deviation are preferable measures of center and spread.
+
+(c) The distribution would be right skewed. There would be some students who did not consume any alcohol, but this is the minimum since students cannot consume fewer than 0 drinks. There would be a few students who consume *many* more drinks than their peers, giving the distribution a long right tail. Due to the skew, the median and IQR would be preferable measures of center and spread.
+
+(d) The distribution would be right skewed. Most employees would make something on the order of the median salary, but we would anticipate upper management makes much more. The distribution would have a long right tail, and the median and the IQR would be preferable measures of center or spread.
+
+### SQ5 â 1.64
+
+(a) The distribution of percentage of population that is Hispanic is extremely right skewed with majority of counties with less than 10% Hispanic residents. However there are a few counties that have more than 90% Hispanic population. It might be preferable, in certain analyses, to use the log-transformed values since this distribution is much less skewed.
+
+(b) The map reveals that counties with higher proportions of Hispanic residents are clustered along the Southwest border, all of New Mexico, a large swath of Southwest Texas, the bottom two-thirds of California, and in Southern Florida. In the map all counties with more than 40% of Hispanic residents are indicated by the darker shading, so it is impossible to discern the how high Hispanic percentages go. The histogram reveals that there are counties with over 90% Hispanic residents. The histogram is also useful for estimating measures of center and spread.
+
+(c) Both visualizations are useful and a preference for one over the other most likely depends on the context in which you planned to use it.
+
+## Empirical Paper Questions
+
+All questions refer to the Kramer et al. study identified on the course website.
+
+### EQ1
+
+(a) The cases are 689,003 individuals included in the study. 
+
+(b) The key variables include:
+* Emotional exposure (whether positive or negative words were potentially reduced): dichotomous categorical.
+* Percentage of positive/negative emotion words in posts: continuous numeric.
+
+(c) Many possible responses, but here's one: Does emotional contagion occur via social networks online?
+
+### EQ2
+
+(a) The treatment groups received a reduced portion of posts in their news feed with either positive or negative words in them. The control groups had random posts removed from their news feed.
+
+(b) The study uses random sampling (by an internal account ID number).
+
+(c) See part (a) of this question. The manipulation involved probabilistically reducing the proportion of news feed posts with either positive or negative language in them.
+
+### EQ3
+
+(a) Humans.
+
+(b) 689,003 English language Facebook users during a week or so in January 2012.
+
+(c) Many possible answers. Personally, I find such generalization a bit iffy (despite the sample size) given the likely biases of the sample in comparison to the target population of the study. English language Facebook users have a number of attributes that differentiate them from even a broader English language speaking population in the U.S. and Facebook users and it's likely that some of these attributes systematically covary with the outcomes of interest in this study. Covariance (non-independence) between these factors and the outcomes of interest would render the estimated effects subject to bias.
+
+### EQ4
+
+See the figure and the discussion in the paper. The four panels capture the comparisons of the treatment and control conditions by the two outcome measures. They show that the treatments had the anticipated effects with reduced positive posts reducing/increasing the proportion of positive/negative words in subsequent posts and reduced negative posts reducing/increasing the proportion of negative/positive words in subsequent posts.
+
+### EQ5
+
+The study finds evidence of emotional contagion in soicial networks among English language Facebook users in 2012. The estimated effects sizes are tiny (Cohen's *d* ~ 0.02. Read more about [Cohen's *d*](https://trendingsideways.com/the-cohens-d-formula)). However, the effect is potentially still quite meaningful and substantively important because the manipulation was itself quite small in scope (the scale of the study notwithstanding). There estimates may contain unobserved biased due to the construction of the sample, but overall this is a landmark study demonstrating the existence of an infrequently observed phenomenon (emotional contagion) in a context dominated by large numbers of short computer-mediated communications.
\ No newline at end of file
