Thank you for ihearditonwednesday!

Variables:

stfgov: How satisfied with the national government: from 1-completely dissatisfied to 10-extremely satisfied.

prtcldua: Which party feel closer to, Ukraine: to which party belongs.

Information about variables:

Summary:

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    0.00    1.00    2.00    2.88    5.00   10.00

Size of groups:

## Fatherland    Freedom Communists       UDAR    Regions      Other 
##        245        119         94        140        274         21

Means of each group:

## Fatherland    Freedom Communists       UDAR    Regions      Other 
##   2.048980   1.478992   2.563830   2.314286   4.726277   1.619048

Variances of each group:

## Fatherland    Freedom Communists       UDAR    Regions      Other 
##   3.841853   2.505911   4.291581   4.634327   5.532860   3.247619

Distribution in boxplots:

From these boxplots we see that Party of Regions have a way more satisfaction with national goverment, but not that much (near the 5) and that’s interesting, that governing party not really satisfied with themselves.

Hypothesis

We assume that there is significant difference between adherents of different political parties according to their satisfaction with the national government:

H0 - there is no significant difference between adherents of different political parties.

H1 - there is significant difference between adherents of different political parties.

Assumptions:

Check normality:

## 
##  Shapiro-Wilk normality test
## 
## data:  as.numeric(politics$stfgov)
## W = 0.91427, p-value < 0.00000000000000022

QQ-plot and Shapiro-Wilk normality test show that our variable haven’t normal distribution.

Check equality of variances:

## Levene's Test for Homogeneity of Variance (center = median)
##        Df F value     Pr(>F)    
## group   5  5.7439 0.00003163 ***
##       887                       
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Bartlett test of homogeneity of variances
## 
## data:  politics$stfgov by politics$prtcldua
## Bartlett's K-squared = 26.356, df = 5, p-value = 0.00007611

The p-values of Levene Test=0.00003163 and Bartlett Test=0.00007611 above the significance level of 0.05 so we can assume that variances are unequal. From that we set “var.equal = FALSE

OneWay-ANOVA:

oneway.test(politics$stfgov~politics$prtcldua, var.equal = FALSE)
## 
##  One-way analysis of means (not assuming equal variances)
## 
## data:  politics$stfgov and politics$prtcldua
## F = 61.338, num df = 5.00, denom df = 165.21, p-value <
## 0.00000000000000022

The p-value of OneWay.ANOVA=0.00000000000000022 above the significance level of 0.05 so we can assept H1-hypothesis and can assume that there is difference between adherents of different political parties according to their satisfaction with the national government.

Now with the Tukey Test we can know which exact groups have difference:

##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = stfgov ~ prtcldua, data = politics)
## 
## $prtcldua
##               diff         lwr         upr     p adj
## FD-FL   -0.5699880 -1.23498096  0.09500497 0.1411635
## CM-FL    0.5148502 -0.20721392  1.23691431 0.3224786
## U-FL     0.2653061 -0.36522450  0.89583675 0.8361185
## PR-FL    2.6772978  2.15400079  3.20059477 0.0000000
## Othr-FL -0.4299320 -1.78316008  0.92329613 0.9446633
## CM-FD    1.0848382  0.26358839  1.90608799 0.0023718
## U-FD     0.8352941  0.09324054  1.57734770 0.0169702
## PR-FD    3.2472858  2.59389892  3.90067263 0.0000000
## Othr-FD  0.1400560 -1.26859615  1.54870820 0.9997518
## U-CM    -0.2495441 -1.04314628  0.54405813 0.9469801
## PR-CM    2.1624476  1.45105787  2.87383730 0.0000000
## Othr-CM -0.9447822 -2.38125768  0.49169334 0.4161937
## PR-U     2.4119917  1.79371372  3.03026960 0.0000000
## Othr-U  -0.6952381 -2.08795278  0.69747658 0.7113682
## Othr-PR -3.1072298 -4.45479239 -1.75966712 0.0000000

According to this output we can see that differences Freedom-Fatherland, Communists-Fatherland, Udar-Fatherland, Other-Fatherland, Udar-Communists, Other-Communists, Other-Udar are not significant, while Regions-Fatherland, Communists-Freedom, Regions-Fatherland, Regions-Communists, Regions-Uda, Other-Regions have a significant level of difference.

Significant difference Not significant difference
Regions-Fatherland Freedom-Fatherland
Communists-Freedom Communists-Fatherland
Regions-Freedom Udar-Fatherland
Regions-Communists Other-Fatherland
Regions-Udar Udar-Communists
Other-Regions Other-Communists
Other-Udar

Our data was someway obvious cause Party of Regions was governing party at 2012 so this party have significant dofference with other parties in satisfaction with national goverment, but we proved it statistically.

Omega squared:

## [1] 0.2656263

And omega-squared=0.2656263 shows us that we have slightly dependence between satisfaction with national goverment and chosen political party.