Homework 4
Lessons 6, 8
Directions
Please turn in this homework on Sakai. You will need to turn in an html file and a qmd file, Please submit your homework in pdf format if you are not rendering a Quarto document. If you are using a Quarto doc to render your full homework, then you can keep it as an html!
You can download the .qmd file for this assignment from Github if you want to work in a Quarto doc. You do not need to work in a Quarto doc for this homework!!
It is a good idea to try rendering your document from time to time as you go along! Note that rendering automatically saves your Qmd file and rendering frequently helps you catch your errors more quickly.
Please note that the midterm feedback form is also due at the same time as this homework!
1 Book exercises
3.20 Area under the curve, Part II
For this problem:
- Make a sketch of the normal distribution curve with the mean and 1 sd away from the mean clearly labeled, and the area representing probability of interest shaded in.
- Calculate probabilities using R (You can hand write the code you used to find your answer if you do not want submit typed R code or a Quarto document.)
3.22 Triathlon times
3.28 Arsenic poisoning
3.32 Chickenpox, Part III
1.28 Mix-and-match
2 R exercises
2.1 R exercise 1
Below you will be using the dataset from Gapminder.
2.1.1 Load all the packages you need below here
You don’t need to do it all at once, you can add more libraries as you realize you need them.
2.1.2 Import dataset
Import the dataset called “Gapminder_2011_LifeExp_CO2.csv” You can find it in the student files under Data then Homework. You will need to download the file onto your computer, and use the correct file path to import the data.
2.1.3 Make a histogram
Using ggplot2, make a histogram of the variable CO2emissions.