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]]. | ||
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 ==== | ||
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.). | ||