statistics and R Programming paper
Discuss two or more of the following questions, in your own words. You may choose to address
any two, three, or even all questions but should target 3-4 pages of text in total (not
counting figures, tables, and references). Upload your answers to the final section of the class
Moodle page as a single narrative document in pdf format. You may, and are encouraged to,
illustrate your answers using R, but that's no substitute for lucid natural language explanations.
To preserve the natural flow of the narrative, figures and tables should be embedded into the
document near their first mention. Any supplementary files like code or data should be
referenced in the text and separately uploaded. You may use books, articles, notes, search
engines, or computers, but may not solicit or receive direct assistance from other human beings.
Cite sources if you use them. For the first three questions you may want to illustrate technical
detail using R, discuss practical aspects that are important for applications, and theoretical
aspects of the subject.
Question 1. Construct a dataset with at least 8 observations and 3 variables (y, x1, and x2) such
that least squares linear regression of y versus x1 produces y = 2x1 + e1 and regressing y versus
x1 and x2 produces y = -2x1 + x2 + e2. How might you interpret the relationship between y and
x1? Show your work in R.
Question 2. Write a short essay explaining the p-value and show to calculate it on a dataset of
your choice. Show your work in R.
Question 3. Write a short essay explaining the four assumptions of linear regression and show
how to test them on a dataset of your choice. Show your work in R.
Question 4. Write a short essay on the subject of Bayes theorem and illustrate its use in an
application of your making.