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

From CommunityData
< Statistics and Statistical Programming (Spring 2019)
Revision as of 16:49, 24 April 2019 by Aaronshaw (talk | contribs) (Created page with "== Programming Challenges == : '''PC0.''' I've provided the full dataset from which I drew each of your samples in a TSV file in the directory <code>week_05</code> in [https:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Programming Challenges

PC0. I've provided the full dataset from which I drew each of your samples in a TSV file in the directory week_05 in class assignment git repository. These are tab delimited, not comma delimited. TSV, is related to CSV and is also a common format. Go ahead and load it into R (HINT: read.delim()). Take the mean of the variable x in that dataset. That is the true population mean — the thing we have been creating estimates of in week 2 and week 3.
PC1. Go back to the dataset I distributed for the week 3 problem set. You've already computed the mean for this in week 2. You should compute the 95% confidence interval for the variable x in two ways:
  • (a) By hand using the normal formula for standard error .
  • (b) Using the appropriate built-in R function. These number should be the same or very close. After reading the OpenIntro, can you explain why they might not be exactly the same?
  • (c) Compare the mean from your sample — and your confidence interval — to the true population mean. Is the true mean inside your confidence interval?
PC2. Let's look beyond the mean. Compare the distribution from your sample of x to the true population. Draw histograms and compute other descriptive and summary statistics. What do you notice? Be ready to talk for a minute or two about the differences.
PC3. Compute the mean of y from the true population and then create the mean and confidence interval from the y in your sample. Is it in or out?
PC4. I want you to run a simple simulation that demonstrates one of the most fundamental insights of statistics:
  • (a) Create a vector of 10,000 randomly generated numbers that are uniformly distributed between 0 and 9.
  • (b) Take the mean of that vector. Draw a histogram.
  • (c) Create 100 random samples of 2 items each from your randomly generated data and take the mean of each sample. Create a new vector that contains those means. Describe/display the distribution of those means.
  • (d) Do (c) except make the items 10 items in each sample instead of 2. Then do (c) again except with 100 items. Be ready to describe how the histogram changes as the sample size increases. (HINT: You'll make me very happy if you write a function to do this.)
PC5. Do PC4 again but with random data drawn from a normal distribution () instead of a uniform distribution. How are you results different than in PC4?

Statistical Questions

Exercises from OpenIntro §5

SQ0. Any questions or clarifications from the OpenIntro text or lecture notes?
SQ1. Exercise 5.16 which is a set of True/False questions
SQ2. Exercise 5.28 which is about Diamonds
SQ3. Exercise 5.30 which is also about Diamonds
SQ4. Exercise 5.48 which is about work hours and education
SQ5. Exercise 5.52 which is another set of True/False questions about ANOVA

Reinhart §1

SQ6.

Empirical Paper Questions

These are all in regards to the Sweetser and Metzgar paper.

EQ1. For RQ1 explain:
  • (a) What is the unit of analysis? What is the dependent variable? The independent variable? What are the levels or groups of being compared in the ANOVA?
  • (b) Clearly State the null hypothesis being tested. What is the alternative hypothesis?
  • (c) Summarize ore restate results in statistical terms. Explain what these results mean in substantive terms? How convincing do you find these results? What should we be taking away?
EQ2. Do the same as above but for RQ4.
EQ3. ...for RQ5.
EQ4. ...for RQ6.