library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)

Research Question

I am interested in analyzing if the increasing distrust in the media(media_2019), particularly within the Republican voter base, influences US citizens’ confidence in political institutions and feelings toward the opposing Democratic party.This analysis will include confidence in institutions(inst_court_2019, inst_FBI_2019), and feelings toward Democrats(Democrats_2019).

I will be studying the feelings of voters who have differing degrees of confidence in the media, divided by respondents who agree and disagree in the statement that “you can’t believe much of what you hear from the mainstream media” .

Data Source

This analysis uses the data set from the Democracy Fund Voter Study Group provided by Professor Brett Turner of Queens College.

Data Prep

voter_2019<-read.csv("C:/Users/12055/Documents/CUNY - Undergrad/Spring 2021 - CUNY/Data 333/Assignments/Recoding Variables/Data/Voter Data 2019.csv")

Voter_2019<-voter_2019%>%
  mutate(FakeMedia= ifelse(media_2019==8, NA,
                    ifelse(media_2019<3,"Agree",
                    ifelse(media_2019>2,"Disagree", NA))),
ConfidenceSupreme= ifelse(inst_court_2019==1,"A great deal",
                   ifelse(inst_court_2019==2,"Quite a lot", 
                   ifelse(inst_court_2019==3,"Some",
                   ifelse(inst_court_2019==4,"Very Little", NA)))), 
ConfidenceFBI= ifelse(inst_FBI_2019==1,"A great deal",
                ifelse(inst_FBI_2019==2,"Quite a lot", 
                ifelse(inst_FBI_2019==3,"Some",
                ifelse(inst_FBI_2019==4,"Very Little", NA)))),
FeelingsDemocrats= ifelse(Democrats_2019<=100, Democrats_2019,
                ifelse (Democrats_2019>100,NA, NA
                        )))%>%
select(FakeMedia, ConfidenceSupreme, ConfidenceFBI, FeelingsDemocrats)%>%
    filter(!is.na(FakeMedia), !is.na(ConfidenceSupreme), !is.na(ConfidenceFBI), !is.na(FeelingsDemocrats))

head(Voter_2019)
##   FakeMedia ConfidenceSupreme ConfidenceFBI FeelingsDemocrats
## 1     Agree              Some  A great deal                99
## 2  Disagree       Very Little   Quite a lot                25
## 3     Agree      A great deal  A great deal                31
## 4  Disagree              Some          Some               100
## 5  Disagree              Some   Very Little                53
## 6     Agree              Some          Some                97
colnames(Voter_2019)
## [1] "FakeMedia"         "ConfidenceSupreme" "ConfidenceFBI"    
## [4] "FeelingsDemocrats"
dim(Voter_2019)
## [1] 5906    4

Fake media and confidence in the Supreme Court

Cross tab

Fake media and confidence in the Supreme Court

table(Voter_2019$FakeMedia , Voter_2019$ConfidenceSupreme)%>%
prop.table(1)%>%
round(2)
##           
##            A great deal Quite a lot Some Very Little
##   Agree            0.19        0.36 0.35        0.10
##   Disagree         0.08        0.24 0.50        0.19

Analysis

From the cross tab, we can observe the following:

  • Respondents who distrust the media responded with more than double the confidence, or “a great deal” of confidence, in the Supreme Court as respondents who trust the media.
  • Respondents who have more trust in the media tended to have less confidence, or “very little” confidence, in the Supreme Court.

Visualization

Fake media and confidence in the Supreme Court

Voter_2019%>%
  group_by(FakeMedia,ConfidenceSupreme)%>%
  summarize(n=n())%>%
  mutate(percent=n/sum(n))%>%
  ggplot()+
  geom_col(aes(x=FakeMedia, y=percent, fill=ConfidenceSupreme))
## `summarise()` has grouped output by 'FakeMedia'. You can override using the `.groups` argument.

Analysis

From the bar chart depicting confidence in the Supreme Court based on distrust in the media, we can observe that greater confidence in the Supreme Court makes up more than half of the responses of voters who distrust the media.

Chi Squared Test

Fake media and confidence in the Supreme Court

chisq.test(Voter_2019$FakeMedia , Voter_2019$ConfidenceSupreme )
## 
##  Pearson's Chi-squared test
## 
## data:  Voter_2019$FakeMedia and Voter_2019$ConfidenceSupreme
## X-squared = 344.93, df = 3, p-value < 2.2e-16

Analysis

There is a statistically significant relationship between the variable FakeMedia and ConfidenceSupreme as the p-value is below 0.05. This implies that belief in fake news media has a significant relationship on the variable reflecting confidence in the Supreme Court.

Fake media and confidence in the FBI

Cross tab

Fake media and confidence in the FBI

table(Voter_2019$FakeMedia , Voter_2019$ConfidenceFBI)%>%
prop.table(1)%>%
round(2)
##           
##            A great deal Quite a lot Some Very Little
##   Agree            0.08        0.25 0.44        0.22
##   Disagree         0.30        0.40 0.26        0.04

Analysis

From the cross tab, we can observe that respondents who distrust the media responded with less than a third of confidence in the FBI as respondents who trust the media.

Visualization

Fake media and confidence in the FBI

Voter_2019%>%
  group_by(FakeMedia,ConfidenceFBI)%>%
  summarize(n=n())%>%
  mutate(percent=n/sum(n))%>%
  ggplot()+
  geom_col(aes(x=FakeMedia, y=percent, fill=ConfidenceFBI))
## `summarise()` has grouped output by 'FakeMedia'. You can override using the `.groups` argument.

Analysis

From the bar chart depicting confidence in the FBI based on distrust in the media, we can observe the following:

  • Respondents who distrust the media have a markedly lesser degree of confidence in the FBI than respondents who trust the media.

  • Greater confidence in the FBI amongst respondents who trust the media represents about twice the respective portion of respondents who distrust the media.

Chi Squared Test

Fake media and confidence in the FBI

chisq.test(Voter_2019$FakeMedia , Voter_2019$ConfidenceFBI )
## 
##  Pearson's Chi-squared test
## 
## data:  Voter_2019$FakeMedia and Voter_2019$ConfidenceFBI
## X-squared = 963.48, df = 3, p-value < 2.2e-16

Analysis

There is a statistically significant relationship between the variable FakeMedia and ConfidenceFBI as the p-value is below 0.05. This implies that belief in fake news media has a significant relationship on the variable reflecting confidence in the FBI.

Fake media and feelings toward the opposing political party

Table of Means

Voter_2019%>%
  filter(!is.na(FeelingsDemocrats))%>%
  group_by(FakeMedia)%>%
  summarize(FeelingsDemocrats=mean(FeelingsDemocrats,na.rm=TRUE))
## # A tibble: 2 x 2
##   FakeMedia FeelingsDemocrats
##   <chr>                 <dbl>
## 1 Agree                  25.0
## 2 Disagree               74.0

Analysis

From the table of means we can observe that the those who distrust the media responded with a much lower rating of their feelings toward Democrats, reflecting the phenomenon of belief in “fake news” within the Republican party.

Bar chart

Fake media and feelings toward Democrats

Voter_2019%>%
  filter(!is.na(FeelingsDemocrats))%>%
  group_by(FakeMedia)%>%
  summarize(FeelingsDemocrats=mean(FeelingsDemocrats,na.rm=TRUE))%>%
  ggplot(aes(x=FakeMedia,y=FeelingsDemocrats,fill=FakeMedia))+
  geom_col()

Analysis

The bar chart above is a visualization of the stark disparity in feelings toward Democrats based on distrust of the media. Voters in 2019 who responded with a distrust of the media have markedly lower ratings of feelings toward Democrats.

Visualization

Histogram - Fake Media and Feelings toward Democrats

Voter_2019%>%
  select(FakeMedia, FeelingsDemocrats)%>%
  filter(FakeMedia %in% c("Agree", "Disagree"))%>%
  ggplot()+
  geom_histogram(aes(x=FeelingsDemocrats, fill=FakeMedia))+
facet_wrap(~FakeMedia)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Analysis

The population distribution of respondents who distrust the media is skewed left based on lower ratings of Democrats. The poulation distribution of respondents who trust the media is skewed right based on greater ratings of Democrats.

Sampling Distributions

Histogram - Fake Media and Feelings toward Democrats

AgreeFM<-Voter_2019%>%
  filter(FakeMedia=="Agree")

DisagreeFM<-Voter_2019%>%
  filter(FakeMedia=="Disagree")

AgreeFM_Samp_Distro<-replicate(10000, sample(AgreeFM$FeelingsDemocrats, 40)%>%
mean(na.rm=TRUE))%>%
data.frame()%>%
rename("mean"=1)

DisagreeFM_Samp_Distro<-replicate(10000, sample(DisagreeFM$FeelingsDemocrats, 40)%>%
mean(na.rm=TRUE))%>%
data.frame()%>%
rename("mean"=1)

ggplot()+
  geom_histogram(data=AgreeFM_Samp_Distro, aes(x=mean), fill="white")+
  geom_histogram(data=DisagreeFM_Samp_Distro, aes(x=mean), fill="black")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Analysis

Sampling Distributions

The distribution of 2019 voters’ responses based on agreeing that mainstream media cannot be believed versus disagreeing, or trusting the media, and feelings toward Democrats are both distributed normally. Lack of confidence in news media is linked with less positive feelings toward Democrats, as observed with a distribution lower down the x axis.

t-test

Fake Media and Feelings toward Democrats

t.test(Voter_2019$FeelingsDemocrats ~ Voter_2019$FakeMedia)
## 
##  Welch Two Sample t-test
## 
## data:  Voter_2019$FeelingsDemocrats by Voter_2019$FakeMedia
## t = -70.475, df = 5904, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -50.36119 -47.63525
## sample estimates:
##    mean in group Agree mean in group Disagree 
##               25.02736               74.02558

Analysis

According to the results of the t-test between the variables “FakeMedia” and “FeelingsDemocrats”, there is a significant difference in the mean ratings of Democrats based on distrust of the media. The p value is 2.2x10-6, much smaller than the threshold of confidence (alpha=0.05).

Conclusion

The results of this analysis demonstrate that voters who have less trust in the media are also less confident in FBI and lean to the right on the political spectrum. Voters who have greater trust in the media are less confident in the Supreme Court but more confident in the FBI and lean left on the political spectrum based on feelings toward Democrats.