In this homework assignment you will…
ggplot2
Go to the sta210-fa21-003 organization on GitHub. Click on the repo with the prefix hw-03. It contains the starter documents you need to complete the assignment.
Clone the repo and start a new project in RStudio. See the Lab 01 instructions for details on cloning a repo and starting a new R project.
You will work with the following packages:
library(tidyverse)
library(fivethirtyeight)
Bob Ross was a painter who was most famous for his PBS television show The Joy of Painting. In each episode, Ross created a new oil painting and provided instructions and commentary as he painted it. Ambitious viewers could paint along but viewers simply enjoyed watching and listening to Ross’s soothing voice as he painted an outdoor scene in 30 minutes.
In 2014, Walt Hickey wrote an article for FiveThirtyEight using statistics to analyze the paintings created on the show.The article focused on features that were often seen in Ross’s paintings, such as trees, clouds, cabins, among others. Click here to see the article.
In this assignment, you will analyze the data that was used for the article. The data is in the bob_ross
data set in the fivethirtyeight R package. Each observation represents an episode of the TV show. One painting was created in an episode. The analysis will focus on the following variables:
conifer
: (0) painting has 0 coniferous trees (1) painting has at least one coniferous treedeciduous
: (0) painting has 0 deciduous trees (1) painting has at least one deciduous treeguest
: (0) show featured Bob Ross (1) show featured guest paintertree
: (0) painting included no tree (1) painting has at least one treetrees
: (0) painting had 0 or 1 trees (1) painting has at least two treesType ??bob_ross
in the console to see the full data dictionary.
A few reminders as you complete the assignment:
Though Bob Ross created an overwhelming majority of the paintings on the show The Joy of Painting, a guest painter was occasionally featured on the show. What is the probability a randomly selected episode featured a guest painter?
Bob Ross is known for painting “happy little trees”, but was he actually more likely to have a tree in this paintings than other artists? To answer this question…
geom_col
to create a visualization of these probabilities. Make the axis labels for the painter “Bob Ross” and “Guest Painter” instead of 0 and 1. Fill in the bars using the color Sap Green (Hex Code #0a3410), a color commonly used in Bob Ross’s paintings.The next few questions will focus only on paintings created by Bob Ross. Make a new data frame called ross_paintings
that only includes episodes (and thus paintings) made by Bob Ross. Save this data frame and use it for exercises 4 - 6
Let’s do further analysis on the trees Bob Ross painted. This exercise will focus on paintings that feature exactly one tree.
Consider all paintings created by Bob Ross. Are the following events disjoint?
Briefly explain, showing the code, output and/or visualizations used to support your response.
In the FiveThirtyEight article, Walt Hickey calculates various probabilities to describe the combination of features typically found in Bob Ross paintings. He states the following about the presence of cabins and lakes in Ross’s paintings: “About 18 percent of his paintings feature a cabin. Given that Ross painted a cabin, there’s a 35 percent chance that it’s on a lake…” Additionally, about 34% of Ross’s paintings feature a lake.
Your turn! Use this data to explore a question of your choice about paintings created in the TV show The Joy of Painting. Your question should explore the relationship between 3 variables in the data set; at least one of the variables must be one that hasn’t been used in exercises 1 - 6. You may use the entire data set or focus the analysis on paintings made by Bob Ross.
ggplot2
.Knit to PDF to create a PDF document. Stage and commit all remaining changes, and push your work to GitHub. Make sure all files are updated on your GitHub repo.
Only upload your PDF document to Gradescope. Before you submit the uploaded document, mark where each answer is to the exercises. If any answer spans multiple pages, then mark all pages. Associate the “Overall” section with the first page.
Component | Points |
---|---|
Ex 1 | 3 |
Ex 2 | 8 |
Ex 3 | 2 |
Ex 4 | 8 |
Ex 5 | 6 |
Ex 6 | 8 |
Ex 7 | 10 |
Workflow & formatting | 5 |
Workflow and formatting includes includes having at least three meaningful commits, a neatly formatted PDF document with readable headers, updating the name and date, using the tidyverse syntax, and naming all code chunks.