Editing Statistics and Statistical Programming (Spring 2019)/Problem Set: Week 5

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 5: Line 5:
: '''PC0.''' The dataset is available as a TSV file in the directory <code>week_05</code> in the [https://communitydata.cc/~ads/teaching/2019/stats/data data repository for the course]. Note that a TSV file is ''tab delimited'', not comma delimited (it is otherwise similar to a CSV file). Go ahead and inspect the data and load it into R (''Hint:'' You'll want to use the <code>read.delim()</code> function).  
: '''PC0.''' The dataset is available as a TSV file in the directory <code>week_05</code> in the [https://communitydata.cc/~ads/teaching/2019/stats/data data repository for the course]. Note that a TSV file is ''tab delimited'', not comma delimited (it is otherwise similar to a CSV file). Go ahead and inspect the data and load it into R (''Hint:'' You'll want to use the <code>read.delim()</code> function).  
: '''PC1.''' Calculate the mean of the variable <code>x</code> in the full dataset. Go back to your Week 3 problem set and revisit the mean you calculated for <code>x</code>. Be prepared to discuss the ''conceptual'' relationship of these two means to each other.  
: '''PC1.''' Calculate the mean of the variable <code>x</code> in the full dataset. Go back to your Week 3 problem set and revisit the mean you calculated for <code>x</code>. Be prepared to discuss the ''conceptual'' relationship of these two means to each other.  
: '''PC2.''' Again, using the variable <code>x</code> from your Week 3 data, compute the 95% confidence interval for the mean of this vector "by hand" (in R) using the normal formula for standard error <math>(\frac{\sigma}{\sqrt{n}})</math>. (''Bonus:'' Do this by writing a function.)
: '''PC2.''' Again, using the variable <code>x</code> from your Week 3 data, compute the 95% confidence interval for the mean of this vector in two ways "by hand" (in R) using the normal formula for standard error <math>(\frac{\sigma}{\sqrt{n}})</math>. (''Bonus:'' Do this by writing a function.)
<!---
<!---
:* (b) Using an appropriate built-in R function (see this week's R lecture materials for a relevant example).
:* (b) Using an appropriate built-in R function (see this week's R lecture materials for a relevant example).
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see CommunityData:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)