Editing Statistics and Statistical Programming (Fall 2020)/pset4
From CommunityData
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
== Programming Challenges (thinly disguised Statistical Questions) == | == Programming Challenges (thinly disguised Statistical Questions) == | ||
This week the programming challenges will | This week the programming challenges will mostly work with the full (synthetic "Chicago bikeshare") dataset from which I drew the 20 group samples you analyzed in Problem Sets 1 and 2. With the possible exception of the simulation in PC6, nothing here should require anything totally new to you in R. Instead, a lot of the focus is on illustrating statistical concepts using relatively simple code. The emphasis is on material covered in ''OpenIntro'' §5 and programming material introduced in the [https://communitydata.science/~ads/teaching/2020/stats/r_tutorials/w05-R_tutorial.html Week 5 R tutorial]. | ||
With the possible exception of the simulation in PC6 | |||
=== PC1. Import the data === | === PC1. Import the data === | ||
The dataset for this week is available in yet another plain text format: a "tab-delimited" (a.k.a., tab-separated or TSV) file. You can find it in the <code> | The dataset for this week is available in yet another plain text format: a "tab-delimited" (a.k.a., tab-separated or TSV) file. You can find it in the <code>week_05</code> subdirectory in the [https://communitydata.science/~ads/teaching/2020/stats/data data repository for the course]. Go ahead and inspect the data and load it into R (''Hint:'' You can use either the tidyverse <code>read_tsv()</code> function or the Base R <code>read.delim()</code> function to do this). | ||
You'll also want to make sure you have the data (and especially your friendly <code>x</code> variable | You'll also want to make sure you have the data (and especially your friendly <code>x</code> variable from [[Statistics_and_Statistical_Programming_(Fall_2020)/pset2|Problem Set 2]] handy once again. | ||
=== PC2. Compare the means === | === PC2. Compare the means === | ||
Calculate the mean of the variable <code>x</code> in the aggregate (this week's) dataset. Go back to [[Statistics_and_Statistical_Programming_(Fall_2020)/pset2|Problem Set 2]] and revisit the mean you calculated for <code>x</code>. | Calculate the mean of the variable <code>x</code> in the aggregate (this week's) dataset. Go back to [[[[Statistics_and_Statistical_Programming_(Fall_2020)/pset2|Problem Set 2]] and revisit the mean you calculated for <code>x</code>. | ||
==== Interpret the comparison ==== | ==== Interpret the comparison ==== | ||
Line 40: | Line 38: | ||
=== (Recommended) PC6. A simulation === | === (Recommended) PC6. A simulation === | ||
Let's conduct a simulation that demonstrates a fundamental principle of statistics. Please see the [https://communitydata.science/~ads/teaching/2020/stats/r_tutorials/w05-R_tutorial.html R tutorial materials from last week] for useful examples that can help you do this. | Let's conduct a simulation that demonstrates a fundamental principle of statistics. Please see the [[https://communitydata.science/~ads/teaching/2020/stats/r_tutorials/w05-R_tutorial.html R tutorial materials from last week]] for useful examples that can help you do this. | ||
:* (a) Create a vector of 10,000 randomly generated numbers that are uniformly distributed between 0 and 9. | :* (a) Create a vector of 10,000 randomly generated numbers that are uniformly distributed between 0 and 9. | ||
:* (b) Calculate the mean of the vector you just created. Plot a histogram of the distribution. | :* (b) Calculate the mean of the vector you just created. Plot a histogram of the distribution. | ||
Line 47: | Line 45: | ||
==== Compare and explain the simulation ==== | ==== Compare and explain the simulation ==== | ||
Compare the results from PC6 with those in the example simulation from [https://communitydata.science/~ads/teaching/2020/stats/r_tutorials/w05-R_tutorial.html last week's R tutorial]. What fundamental statistical principle is illustrated by these simulations? Why is this an important simulation for thinking about hypothesis testing? | Compare the results from PC6 with those in the example simulation from [[https://communitydata.science/~ads/teaching/2020/stats/r_tutorials/w05-R_tutorial.html last week's R tutorial]]. What fundamental statistical principle is illustrated by these simulations? Why is this an important simulation for thinking about hypothesis testing? | ||
== Reading Questions == | == Reading Questions == | ||
Line 57: | Line 55: | ||
=== RQ2. Emotional contagion (revisited) === | === RQ2. Emotional contagion (revisited) === | ||
Revisit the paper we read | Revisit the paper we read for Week 1 of the course: | ||
: Kramer, Adam D. I., Jamie E. Guillory, and Jeffrey T. Hancock. 2014. Experimental Evidence of Massive-Scale Emotional Contagion through Social Networks. ''Proceedings of the National Academy of Sciences'' 111(24):8788–90. [[http://www.pnas.org/content/111/24/8788.full Open Access]] | : Kramer, Adam D. I., Jamie E. Guillory, and Jeffrey T. Hancock. 2014. Experimental Evidence of Massive-Scale Emotional Contagion through Social Networks. ''Proceedings of the National Academy of Sciences'' 111(24):8788–90. [[http://www.pnas.org/content/111/24/8788.full Open Access]] | ||