]> code.communitydata.science - stats_class_2019.git/blobdiff - problem_sets/week_04/ps4-worked_solution.Rmd
updates including statistical and empirical questions
[stats_class_2019.git] / problem_sets / week_04 / ps4-worked_solution.Rmd
index cc3c81f8bc7f8a63e2c02ed8a0698874b58c28f3..4ad91c5d5a83549b59edc7879fa5c1bf059cda2d 100644 (file)
@@ -125,6 +125,83 @@ ggplot(data=views.complete) + aes(x=months, y=prop.mobile) + geom_point() + geom
 
 ```
 
+(a) For my estimate of the proportion I'll just calculate an average from the monthly numbers:
+
+```{r}
+mean(views.complete$prop.mobile)
+
+```
+(b) From the graph, this proportion seems quite stable with the exception of a single outlier month in late 2015. 
+
 # Statistical questions
 
-# Empirical paper questions
\ No newline at end of file
+## SQ1 — 4.8
+
+The general formula for a confidence interval is $point~estimate~±~z^*\times~SE$. First, identify the three different values. The point estimate is 45%, $z^* = 2.58$ for a 99% confidence level (that's the number of standard deviations around the mean that ensure that 99% of a Z-score distribution is included), and $SE = 2.4\%$. 
+
+With this we can plug and chug:
+
+$$52\% ± 2.58 \times 2.4\% → (45.8\%, 58.2\%)$$
+
+From this data we are 99% confident that between 45.8% and 58.2% U.S. adult Twitter users get some news through the site.
+
+## SQ2 — 4.10
+
+(a) False. See the answer to 4.8 above. With $\alpha = 0.01$, we can consult the 99% confidence interval. It includes 50% but also goes lower.
+
+(b) False. The standard error of the sample does not contain any information about the proportion of the population included in the sample. It measures the variability of the sample distribution.
+
+(c) False. Increasing the sample size will decrease the standard error. Consider the formula: $\frac{\sigma}{\sqrt{n}}$. A smaller $n$ will result in a larger standard error.
+
+(d) False. All else being equal, a lower confidence interval will cover a narrower range. A higher interval will cover a wider range. To confirm this, revisit the formula in SQ1 above. and plug in the corresponding alpha value of .9, resulting in a $z^*$ value of 1.28 (see the Z-score table in the back of *OpenIntro*).
+
+## SQ3 — 4.19
+
+The hypotheses should be about the population mean ($\mu$) and not the sample mean ($\bar{x}$). The null hypothesis should have an equal sign. The alternative hypothesis should be about the critical value, not the sample mean. The following would have been better:
+
+$$H_0: \mu = 10~hours$$
+$$H_A: \mu \gt 10~hours$$
+
+## SQ4 — 4.32
+
+(a) True. See part (d) of SQ2 above.
+(b) False. A lower alpha value is the probability of Type 1 Error, so reducing the one reduces the other.
+(c) False. Failure to reject the null is evidence that we cannot conclude that the true value is different from the null. This is **very** different from evidence that the null hypothesis is true.
+(d) True. Consult the section of *OpenIntro* discussing statistical power and Type 2 Error. 
+(e) True. We'll revisit this in a moment below, but consider the relationship between statistical test, the standard error, and the sample size. As the sample size increases towards infinity, the standard error approaches zero, resulting in arbitrarily precise point estimates that will result in rejecting the null hypothesis for *any* value of a test statistic for any critical value of $\alpha$.
+
+# Empirical paper questions
+
+## EQ1
+
+In my words (or rather formulas since I think that's less ambiguous), the key pairs of null/alternative hypotheses look something like the following:
+
+Let $\Delta$ be the parameter estimate for the difference in mean percentage of positive ($\mu_{pos}$) and negative ($\mu_{neg}$) words between the experimental and control conditions for the treatments of reduced negative content ($R_{neg}$ and reduced positive content ($R_{pos}$).
+
+For the reduced negative content conditions (the left-hand side of Figure 1), the paper tests:
+
+$$HR_{neg}1_0: \Delta_{\mu_{pos}} = 0$$
+$$HR_{neg}1_a: \Delta{\mu_{pos}} \gt 0$$
+And:
+$$HR_{neg}2_0: \Delta_{\mu_{neg}} = 0$$
+$$HR_{neg}2_a: \Delta_{\mu_{neg}} \lt 0$$
+Then, for the reduced positive content conditions (the right-hand side of Figure 1), the paper tests:
+
+$$HR_{pos}1_0:~~ \Delta_{\mu_{pos}} = 0$$
+$$HR_{pos}1_a:~~ \Delta{\mu_{pos}} \lt 0$$
+
+And:
+
+$$HR_{pos}2_0:~~ \Delta_{\mu_{neg}} = 0$$
+$$HR_{pos}2_a:~~ \Delta_{\mu_{neg}} \gt 0$$
+Note that the theories the authors used to motivate the study imply directions for the alternative hypotheses, but nothing in the description of the analysis suggests that they used one-tailed tests. I've written these all in terms of specific directions here to correspond with the theories stated in the paper. They could also (arguably more accurately) have been written in terms of inequalities ("$\neq$").
+
+## EQ2
+
+The authors' estimates suggest that reduced negative News Feed content causes an increase in the percentage of positive words and a decrease in the percentage of negative words in subsequent News Feed posts by study participants (supporting $HR_{neg}1_a$ and $HR_{neg}2_a$ respectively).
+
+They also find that reduced positive News Feed content causes a decrease in the percentage of negative words and an increase in the percentage of positive words in susbequent News Feed posts (supporting $HR_{pos}1_a$ and $HR_{pos}2_a$)
+
+## EQ3
+
+Cohen's $d$ puts estimates of experimental effects in standardized units (much like a Z-score!) in order to help understand their size relative to the underlying distribution of the dependent variable(s). The d-values for each of the effects estimated in the paper are 0.02, 0.001, 0.02, and 0.008 respectively (in the order presented in the paper, not in order of the hypotheses above!). These are miniscule effects. However, the treatment itself is also quite narrow in scope, suggesting that the presence of any treatment effect at all is an indication of the underlying phenomenon (emotional contagion). Personally, I find it difficult to attribute much substantive significance to the results because I'm not even convinced that tiny shifts in the percentage of positive/negative words used in News Feed updates accurately index meaningful emotional shifts (maybe we could call it linguistic contagion instead?). Despite these concerns and the ethical considerations that attracted so much public attention, I consider this a clever, well-executed study and I think it's quite compelling. I expect many of you will have different opinions of various kinds!
\ No newline at end of file

Community Data Science Collective || Want to submit a patch?