Statistics 450: Homework


Homework 12:

(due date of the final)

Using an R Notebook produce your solutions to the following questions. Start by making an R Notebook with file name Lastname_Firstname_Stat650_hw1.Rmd. Then knit the .Rmd file to either Lastname_Firstname_Stat650_hw1.docx or Lastname_Firstname_Stat4869_hw1.pdf. Use your own last name and first name in the filename. At the top of your first page you should include Name, Class, Section, and homework assignment.

Upload one file to Blackboard.

Exercises:

  1. Do 16.2.4 Exercise 3
  2. Do 23.3.3 Exercise 1

Project: Further comments, the Project assignment is below. These are just comments.

(due Friday December 13, 2019)

When you turn in your project, make sure you name your files correctly.

or make a .pdf file. You document should be processed from the knitting of your .Rmd. You should not be Printing a .html file to a .pdf.

I would also like you to turn in your dataset.

In your notebook at the top of the .docx file you should have your title, name, and date. In the header of your .Rmd file you should have the following.

title: "Stat. 450: Class Project"

author: "Prof. Eric A. Suess"

date: "Wednesday November 18, 2019"

Your notebook should show your use of the text, R code chunks, and the R output that follows. Do not type you text in R code chunks. Be sure to label the Parts of the Project.

You should follow this general outline for your R notebook for Part I. See below for Part II.

Part I:

Step 1. Give the exact source of your data. If you got your data from the internet you should include a direct link to the website and the data file.

In this step you should show your code used to load your data into R.

Step 2. Make a table of your variables in one column and a written description of the variables in another.

Use different R code chunks to summarize your data and to visualize your data.

Step 3. Describe in words how you planned to divide your dataset into two dataframes. Then show how you did this and use head() to show the results.

Step 4. Describe how you planned to join the two files back together. Then show how you did this and use head() to show the results.

Before turning in your project. Make sure it is not too long. If you have a 100 or more pages you should make sure you have not printed out your data set. If this is the case use the head() function to display the first few lines.

Part II:

Be sure to complete the second part of the Project.


Homework 11:

(due Monday November 18, 2019)

Using an R Notebook produce your solutions to the following questions. Start by making an R Notebook with file name Lastname_Firstname_Stat650_hw1.Rmd. Then knit the .Rmd file to either Lastname_Firstname_Stat650_hw1.docx or Lastname_Firstname_Stat4869_hw1.pdf. Use your own last name and first name in the filename. At the top of your first page you should include Name, Class, Section, and homework assignment.

Upload one file to Blackboard.

Exercises:

  1. Do 15.3.1 Exercises 1, 2, 3
  2. Do 15.4.1 Exercise 1, 2
  3. Do 15.5.1 Exercise 1

Homework 10:

(due Monday November 4, 2019)

Using an R Notebook produce your solutions to the following questions. Start by making an R Notebook with file name Lastname_Firstname_Stat650_hw10.Rmd. Then knit the .Rmd file to either Lastname_Firstname_Stat650_hw10.html. Use your own last name and first name in the filename. At the top of your first page you should include Name, Class, Section, and homework assignment.

Note that because of the str_view() function you cannot knit to a .pdf or .docx. So you will need to print your .html file to a .pdf to turn in this homework assignment.

Upload one file to Blackboard.

Exercises:

  1. Do 14.2.5 Exercises 1, 3
  2. Do 14.3.2.1 Exercise 2 (This problem should not be turned in bacause of the str_view() makes it so your notebook will not knit.)
  3. Do 14.4.6.1 Exercise 1

Project:

For the project you will find two interesting data set to work on that is related to an area of interest to you.

Complete your project in a self-contained R Project using an R Notebook. You will need to zip/compress your R Project directory containing your R Notebook .Rmd file, your .docx file, and your data in a subdirectory /data.

The R Project should have a directory name lastname_firstname_Stat450_Project and your R Notebook should be lastname_firstname_Stat450_Project.Rmd. Be sure to create a .docx file also.

Part I:

Step 1: Find your dataset.

I would suggest using the Google Dataset Search or use data.world. Give the source of your data.

Step 2: Summarize your data.

Make a table of the variables in your dataset and give a description of each variable. If you have more than 20 variables, including the first 20 variables would be enough. Hint: Make a tibble with the first column containing the names, and second column containing the description.

Summarize each variable numerically. That is compute means and standard deviations or proportions for each variable separately. Hint: Try the skim() function or try the DataExplorer package and its create_report() function.

Summarize each variable graphically. That is make bargraphs and boxplots, etc.

I would suggest using the DataExplorer R package to do this.

Step 3: Split your data set into two dataframes.

Split your dataset into two dataframes each with a single key. (Split your data virtically, so some columns in one dataframe and the rest into another dateframe.

Save the dataframes in your project to the same kind of file that you read into R. For example, if you used read_csv() then use write_csv() to save you two files.

Step 4: Merge your two dataframes back together again.

Demonstate that you can merge your data back into one dataframe.

Part II:

Step 1: Find another dataset. This dataset can be smaller than the one used in Part I. The dataset needs to have a dependent variable.

I would suggest using the Google Dataset Search or use data.world. Give the source of your data.

Step 2: Summarize your data.

Fit lines or smoothers to subsets of your data.

Step 3: Model

Compute the fitted linear regression models for each of the subsets of your data.


Homework 9:

(due Monday October 28, 2019)

Using an R Notebook produce your solutions to the following questions. Start by making an R Notebook with file name Lastname_Firstname_Stat650_hw1.Rmd. Then knit the .Rmd file to either Lastname_Firstname_Stat650_hw1.docx or Lastname_Firstname_Stat4869_hw1.pdf. Use your own last name and first name in the filename. At the top of your first page you should include Name, Class, Section, and homework assignment.

Upload one file to Blackboard.

Exercises:

  1. Do 13.2.1 Exercises 1, 3
  2. Do 13.3.1 Exercise 1
  3. Do 13.4.6 Exercises 1, 2, 3

Homework 8:

(due Monday October 21, 2019)

Using an R Notebook produce your solutions to the following questions. Start by making an R Notebook with file name Lastname_Firstname_Stat650_hw1.Rmd. Then knit the .Rmd file to either Lastname_Firstname_Stat650_hw1.docx or Lastname_Firstname_Stat4869_hw1.pdf. Use your own last name and first name in the filename. At the top of your first page you should include Name, Class, Section, and homework assignment.

Upload one file to Blackboard.

Exercises:

  1. Do 12.2.1 Exercises 1, 2
  2. Do 12.3.3 Exercise 4
  3. Do 12.4.3 Exercise 1

Homework 7:

(due Monday October 21, 2019)

Redo the Midterm and submit. You can use the Midterm solution as a guide, but try to work out the answers yourself before consulting the Midterm solution. This homework will count as extra credit for the Midterm score.


Homework 6:

(due Monday October 14, 2019)

Using an R Notebook produce your solutions to the following questions. Start by making an R Notebook with file name Lastname_Firstname_Stat650_hw1.Rmd. Then knit the .Rmd file to either Lastname_Firstname_Stat650_hw1.docx or Lastname_Firstname_Stat4869_hw1.pdf. Use your own last name and first name in the filename. At the top of your first page you should include Name, Class, Section, and homework assignment.

Upload one file to Blackboard.

Exercises:

  1. Do 10.5 Exercises 1, 2
  2. Do 11.2.2 Exercise 2
  3. Do 11.3.5 Exercises 6, 7

Homework 5:

(due Monday September 30, 2019)


Homework 4:

(due Monday September 23, 2019)

Using an R Notebook produce your solutions to the following questions. Start by making an R Notebook with file name Lastname_Firstname_Stat650_hw1.Rmd. Then knit the .Rmd file to either Lastname_Firstname_Stat650_hw1.docx or Lastname_Firstname_Stat4869_hw1.pdf. Use your own last name and first name in the filename. At the top of your first page you should include Name, Class, Section, and homework assignment.

Upload one file to Blackboard.

Exercises:

  1. Do 7.3.4 Exercises 1, 2, 3, 4
  2. Do 7.4.1 Exercises 1, 2
  3. Do 7.5.1.1 Exercises 2, 3, 4, 5, 6

Homework 3:

(due Monday September 16, 2019)

Using an R Notebook produce your solutions to the following questions. Start by making an R Notebook with file name Lastname_Firstname_Stat650_hw1.Rmd. Then knit the .Rmd file to either Lastname_Firstname_Stat650_hw1.docx or Lastname_Firstname_Stat4869_hw1.pdf. Use your own last name and first name in the filename. At the top of your first page you should include Name, Class, Section, and homework assignment.

Upload one file to Blackboard.

Exercises:

  1. Do 5.2.4 Exercises 1, 2,
  2. Do 5.3.1 Exericise 2
  3. Do 5.4.1 Exercise 4
  4. Do 5.5.2 Exericise 1, 4
  5. Do 5.6.7 Exercise 1

Homework 2:

(due Monday September 9, 2019)

Using an R Notebook produce your solutions to the following questions. Start by making an R Notebook with file name Lastname_Firstname_Stat450_hw1.Rmd. Then knit the .Rmd file to either Lastname_Firstname_Stat450_hw1.docx or Lastname_Firstname_Stat450_hw1.pdf. Use your own last name and first name in the filename. At the top of your first page you should include Name, Class, Section, and homework assignment.

Upload one file to Blackboard.

Exercises: The Section numbers and Exercises are from the online version of the book. r4ds

  1. Do 3.6.1 Exercises 1, 2, 3, 4, 5, 6
  2. Do 3.7.1 Exercises 1, 2, 3, 4, 5
  3. Do 3.8.1 Exercises 1, 4
  4. Do 3.9.1 Exercises 4
  5. Do 4.4 Practice 3

Homework 1:

(due Monday August 26, 2019)

Using an R Notebook produce your solutions to the following questions. Start by making an R Notebook with file name Lastname_Firstname_Stat450_hw1.Rmd. Then knit the .Rmd file to either Lastname_Firstname_Stat450_hw1.docx or Lastname_Firstname_Stat450_hw1.pdf. Use your own last name and first name in the filename. At the top of your first page you should include Name, Class, Section, and homework assignment.

Upload one file to Blackboard, either a .docx or .pdf file.

Exercises: The Section numbers and Exercises are from the online version of the book. r4ds

  1. Do 3.2.4 Exercises 1, 2, 3, 4, 5
  2. Do 3.3.1 Exercises 1, 2, 3, 4, 6
  3. Do 3.5.1 Exercises 1, 2, 4