house <- read.csv("house.csv")
# P1: 1972, 1992, 1996, 2000, and 2004
table(house$year)
##
## 1972 1976 1980 1984 1988 1992 1996 2000 2004 2008 2012 2016
## 434 435 435 435 435 434 434 433 434 435 435 435
# P2: 1996, 2000, 2004, 2012, and 2016
prop.table(table( house$year, house$party))
##
## D R
## 1972 0.04622171 0.03701573
## 1976 0.05600307 0.02742616
## 1980 0.04641350 0.03701573
## 1984 0.04852321 0.03490602
## 1988 0.04948216 0.03394707
## 1992 0.04948216 0.03375527
## 1996 0.03970081 0.04353663
## 2000 0.04065976 0.04238588
## 2004 0.03874185 0.04449559
## 2008 0.04948216 0.03394707
## 2012 0.03855006 0.04487917
## 2016 0.03720752 0.04622171
# P3: Stronger linear relationship, split vote is less of a thing in 1972 than in 2016.
cor(house$dcong[house$year == 1972], house$dpres[house$year == 1972] )
## [1] 0.2895487
cor(house$dcong[house$year == 2016], house$dpres[house$year == 2016] )
## [1] 0.884185
# P4: They are both bipolar, liberals and conservatives have diverted from their beliefs and have become more radical. They have both gone further down to their sides. No more moderates which indicates polarization.
# P5: The Standard Deviation is increasing so the ideology scores are increasing over time showing polarization. Congress has their ideology shift from being slightly right or left to into the far regions.