Tugas Statistika Part 2

Author

Retno Ayu I3502241003

  1. Gunakanlah dataset pada tautan yang telah diberikan untuk menjawab pertanyaan di bawah ini.

my_data <-read.csv("~/Downloads/Dataset3.csv", sep = ";") 
str(my_data)
'data.frame':   51 obs. of  9 variables:
 $ No                                   : int  4 6 17 18 19 20 22 28 30 34 ...
 $ Country                              : chr  "Austria" "Belgium" "Estonia" "Finland" ...
 $ Level.of.development                 : chr  "Developed" "Developed" "Developed" "Developed" ...
 $ European.Union.Membership            : chr  "Member" "Member" "Member" "Member" ...
 $ Currency                             : chr  "Euro" "Euro" "Euro" "Euro" ...
 $ Women.Entrepreneurship.Index         : num  54.9 63.6 55.4 66.4 68.8 63.6 43 64.3 51.4 56.6 ...
 $ Entrepreneurship.Index               : num  64.9 65.5 60.2 65.7 67.3 67.4 42 65.3 41.3 54.5 ...
 $ Inflation.rate                       : num  0.9 0.6 -0.88 -0.2 0 0.5 -1.7 -0.3 0 0.2 ...
 $ Female.Labor.Force.Participation.Rate: num  67.1 58 68.5 67.7 60.6 69.9 42.5 59.4 47.2 66.4 ...
head(my_data)
  No Country Level.of.development European.Union.Membership Currency
1  4 Austria            Developed                    Member     Euro
2  6 Belgium            Developed                    Member     Euro
3 17 Estonia            Developed                    Member     Euro
4 18 Finland            Developed                    Member     Euro
5 19  France            Developed                    Member     Euro
6 20 Germany            Developed                    Member     Euro
  Women.Entrepreneurship.Index Entrepreneurship.Index Inflation.rate
1                         54.9                   64.9           0.90
2                         63.6                   65.5           0.60
3                         55.4                   60.2          -0.88
4                         66.4                   65.7          -0.20
5                         68.8                   67.3           0.00
6                         63.6                   67.4           0.50
  Female.Labor.Force.Participation.Rate
1                                  67.1
2                                  58.0
3                                  68.5
4                                  67.7
5                                  60.6
6                                  69.9
summary(my_data)
       No          Country          Level.of.development
 Min.   : 1.00   Length:51          Length:51           
 1st Qu.:14.50   Class :character   Class :character    
 Median :30.00   Mode  :character   Mode  :character    
 Mean   :29.98                                          
 3rd Qu.:45.50                                          
 Max.   :60.00                                          
 European.Union.Membership   Currency         Women.Entrepreneurship.Index
 Length:51                 Length:51          Min.   :25.30               
 Class :character          Class :character   1st Qu.:36.35               
 Mode  :character          Mode  :character   Median :44.50               
                                              Mean   :47.84               
                                              3rd Qu.:59.15               
                                              Max.   :74.80               
 Entrepreneurship.Index Inflation.rate   Female.Labor.Force.Participation.Rate
 Min.   :24.80          Min.   :-2.250   Min.   :13.00                        
 1st Qu.:31.90          1st Qu.:-0.500   1st Qu.:55.80                        
 Median :42.70          Median : 0.600   Median :61.00                        
 Mean   :47.24          Mean   : 2.588   Mean   :58.48                        
 3rd Qu.:65.40          3rd Qu.: 3.600   3rd Qu.:67.40                        
 Max.   :77.60          Max.   :26.500   Max.   :82.30                        
names(my_data)
[1] "No"                                   
[2] "Country"                              
[3] "Level.of.development"                 
[4] "European.Union.Membership"            
[5] "Currency"                             
[6] "Women.Entrepreneurship.Index"         
[7] "Entrepreneurship.Index"               
[8] "Inflation.rate"                       
[9] "Female.Labor.Force.Participation.Rate"
tail(my_data)
   No      Country Level.of.development European.Union.Membership
46 47       Russia           Developing                Not Member
47 48 Saudi Arabia           Developing                Not Member
48 57     Thailand           Developing                Not Member
49 58      Tunisia           Developing                Not Member
50 59       Turkey           Developing                Not Member
51 60      Uruguay           Developing                Not Member
            Currency Women.Entrepreneurship.Index Entrepreneurship.Index
46 National Currency                         35.6                   31.7
47 National Currency                         37.0                   49.6
48 National Currency                         36.6                   32.1
49 National Currency                         30.7                   35.5
50 National Currency                         39.3                   54.6
51 National Currency                         44.5                   41.4
   Inflation.rate Female.Labor.Force.Participation.Rate
46          15.50                                 65.20
47           1.20                                 13.00
48          -0.90                                 62.00
49           4.80                                 25.19
50           7.70                                 30.40
51           8.67                                 68.00

a. Are European Union membership variable and development variable independent from each other?

#Membuat tabel kontingensi
table_idn <- table(my_data$European.Union.Membership, my_data$Level.of.development)

#Uji chi-square untuk independensi 
chisq.test(table_idn)

    Pearson's Chi-squared test with Yates' continuity correction

data:  table_idn
X-squared = 26.222, df = 1, p-value = 3.043e-07

Terdapat hubungan yang signifikan secara statistik antara keanggotaan Uni Eropa dan tingkat pembangunan negara.
Karena p-value < 0.05, maka Hipotesis Nol ditolak → variabel tidak independen.

b. Do the Women Entrepreneurship Index and Global Entrepreneurship Index values show a statistically significant difference between the countries that are members of the European Union and not? (Method Mann-Whitney U)

#Uji Mann-Whitney untuk Women Entrepreneurship Index 
wilcox.test(my_data$Women.Entrepreneurship.Index ~ my_data$European.Union.Membership)
Warning in wilcox.test.default(x = DATA[[1L]], y = DATA[[2L]], ...): cannot
compute exact p-value with ties

    Wilcoxon rank sum test with continuity correction

data:  my_data$Women.Entrepreneurship.Index by my_data$European.Union.Membership
W = 536, p-value = 1.358e-05
alternative hypothesis: true location shift is not equal to 0
#uji Mann-Whitney untuk Global Entrepreneurship Index 
wilcox.test(my_data$Entrepreneurship.Index ~ my_data$European.Union.Membership)
Warning in wilcox.test.default(x = DATA[[1L]], y = DATA[[2L]], ...): cannot
compute exact p-value with ties

    Wilcoxon rank sum test with continuity correction

data:  my_data$Entrepreneurship.Index by my_data$European.Union.Membership
W = 490, p-value = 0.0005338
alternative hypothesis: true location shift is not equal to 0

Karena p-value < 0.05, maka tolak hipotesis nol.
Artinya, terdapat perbedaan yang signifikan secara statistik dalam nilai Entrepreneurship Index antara negara yang menjadi anggota Uni Eropa dan yang bukan.

c. Is there a statistically significant relationship between Women’s Entrepreneurship Index and Global Entrepreneurship Index values?

#Menghitung korelasi antara Women Entrepreneurship Index dan Entrepreneurship Index
Korelasi <- cor(my_data$Women.Entrepreneurship.Index, my_data$Entrepreneurship.Index)
print(Korelasi)
[1] 0.9145797

Nilai korelasi sebesar 0.9145797 menunjukkan adanya hubungan positif yang sangat kuat antara Women Entrepreneurship Index dan Entrepreneurship Index.