Introduction:

This analysis looks into the possible correlation between dog ownership percentage by state and the poll percentages for Trump. I aimed to show patterns to prove this demographic has an influence on political views. I found that there is a positive correlation between dog ownership and republican voting percentages. Dog ownership had stronger correlation than cat ownership but having more pets in general was linked to higher republican votes.

Data

Used poll data from the website provided to us and a data set with pet ownership by state for cats and dogs. From these datasets the columns used to aid in this analysis were:

Method

Chose to focus solely on Trump percentages within the poll data. I grouped by state and changed state to a factor to use in graphs.

The first chart made me loosely see that states like west virginia, Idaho and other “red” states were at the top of the graph which made me decide to dive deeper into the trends of the percentages.

Pairs chart

Dog ownership shows the clearest correlation. While cats still show a strong correlation it is much more scattered.

Comparison Chart

This chart takes the first chart put into the form of a bar chart paired with state poll percentages to show the trend between the two variables

Regression Model

This is the prediction portion of this analysis and shows that at each percentage of dog ownership there is a predicted percentage to vote for Trump. The chart has a relatively high error of 5% which will be covered in limitations. Below shows the RSME and the R-squared numbers aswell

## 
## Call:
## lm(formula = pct ~ perc_dog_owner, data = w_cats_results)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -13.5559  -2.0319   0.4611   3.3409  16.5794 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     20.4309     4.4069   4.636 2.95e-05 ***
## perc_dog_owner   0.6414     0.1091   5.880 4.39e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 5.988 on 46 degrees of freedom
##   (2 observations deleted due to missingness)
## Multiple R-squared:  0.4291, Adjusted R-squared:  0.4167 
## F-statistic: 34.57 on 1 and 46 DF,  p-value: 4.385e-07
## $RMSE
## [1] 5.862302
## 
## $R_squared
## [1] 0.4290715

Limitations

Limitations for this analysis contributed to the lower than preferred R-squared and higher error. I think with more years of data I would be able to lower my error. Measuring the change in ownership over the years would also be interesting to help predict possible swing state changes in political preference of one party over the other.

Discussion

Originally I predicted that states with a dog ownership percentage of 38% and higher would vote for Trump in the upcoming election. The states with over 38% dog ownership were predicted to have Trump Votes over 48%. The actual results showed the predictions for red states to be pretty accurate but for swing states it predicted all correct except for georgia with only 36% dog ownership. The prediction was worst at predicting blue states as california was over the 38% ownership. Overall I was happy with what I gathered with the information I ended up collecting by the due date but think to draw real conclusions from this data and learn more about this correlation I would have needed to collect more years of data to track change in ownership over the years.

References