Editing Statistics and Statistical Programming (Winter 2021)/Problem set 9

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:
This week the programming challenges will focus on the full population ("Seattle bikeshare") dataset from which I drew the 20 group samples you analyzed in [[../Problem set 3]] and [[../Problem set 5]].  
This week the programming challenges will focus on the full population ("Seattle bikeshare") dataset from which I drew the 20 group samples you analyzed in [[../Problem set 3]] and [[../Problem set 5]].  


With the exception of the final question, 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, for PC6, programming material introduced in this week's R tutorial.
Nothing here should require anything totally new to you in R. That is why there is no R tutorial this week. 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, for PC6, programming material introduced in today's R tutorial.


=== PC1. Import the data ===
=== PC1. Import the data ===
Line 19: Line 19:
==== Interpret the comparison ====
==== Interpret the comparison ====


The data that you analyzed in [[../Problem set 5|problem set 5]] was a random 5% sample from the dataset distributed for the present problem set. Knowing that, explain the ''conceptual'' relationship of these two means to each other.
Knowing that the data you analyzed in [[../Problem set 5|problem set 5]] was a random 5% sample from the dataset distributed for the present problem set, explain the ''conceptual'' relationship of these two means to each other.


=== PC3. Confidence interval of a mean ===
=== PC3. Confidence interval of a mean ===
Again, using the variable <code>x</code> from your [[../Problem set 5|problem set 5]] data, compute the 95% confidence interval for the mean of this vector "by hand" (i.e., in R) using the normal formula for the [https://en.wikipedia.org/wiki/Standard_error#Standard_error_of_the_mean standard error of a mean]: <math>(\frac{\sigma}{\sqrt{n}})</math>, where <math>\sigma</math> is the standard deviation of the sample and <math>n</math> is the number of observations (''Bonus:'' Do this by writing a function.).
Again, using the variable <code>x</code> from your [[../Problem set 5|problem set 5]] data, compute the 95% confidence interval for the mean of this vector "by hand" (i.e., in R) using the normal formula for the [https://en.wikipedia.org/wiki/Standard_error#Standard_error_of_the_mean standard error of a mean]: <math>(\frac{\sigma}{\sqrt{n}})</math>, where <math>\sigma</math> is the standard deviation of the sample and <math>n</math> is the number of observations (''Bonus:'' Do this by writing a function.).


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)

Template used on this page: