Description
1. (5 ppoints.) Reproduce the following graph of cat weights and write a brief description
of the distribution (including numbers.) The data is variable Bwt in data frame cats in
library(MASS).
2. (10 points.) The file anes pilot 2016.csv contains data for 1200 respondents to the 2016
American National Election Studies (ANES) pilot study conducted in January 2016. To
simplify things, we assume the respondents are a simple random sample from the population
of adult U.S. citizens (this is not true but is close enough for our purposes.)
The data includes “feeling thermometer” measurements for various public figures. Respondents give a score from 0 to 100 for the figure, where 0 indicates “very cold” and 100 indicates
“very warm.” (A value of more than 100 denotes a missing value and should be omitted.)
We’ll look at the feeling thermometer scores for four Presidential candidates: Donald Trump
(variable fttrump), Hillary Clinton (fthrc), Bernie Sanders (ftsanders), and Marco Rubio
(ftrubio).
In addition, we know (in retrospect) that immigration was a decisive issue in the 2016 election.
One of the questions asked in the pilot study was “Should the number of people who are
allowed to legally move to the United States to live and work be increased, decreased, or
1
kept the same as it is now?” The responses, recorded in the variable immig numb, were coded
numerically:
• 1: Increased a lot
• 2: Increased a moderate amount
• 3: Increased a little
• 4: Kept the same
• 5: Decreased a little
• 6: Decreased a moderate amount
• 7: Decreased a lot
For the purpose of this problem set, treat this as an (ordered) categorical variable.
(a) Draw ONE graph that clearly shows the differences in the shape of the distributions of
feeling thermometer scores for Clinton, Sanders, Rubio, and Trump. (A faceted plot
counts as one graph.) Describe what you see in a paragraph (including numbers.)
(b) Draw ONE graph that clearly shows the differences in the mean feeling thermometer
score for each level of immigration attitude for each of the four candidates. (Again, a
faceted plot counts as one graph.) Describe what you see in a paragraph (including
numbers.)
You’ll be graded on both graphs and writing. All graphs should be sufficiently labeled such
that if they’re taken out of context, a viewer should have a chance of working out what
they are showing. Check that your graphs (in whatever format you upload it) is readable on
Canvas; you’ll lose points if it isn’t. If your graphs show really interesting things that you
don’t talk about, you’ll lose points for that as well.
2