Q1. Create this dataset (countrydata) by coping and pasting the following into R:
nation <- c("Angola","Argentina","Belize","Burundi","Chad","Cote
d'Ivoire","Cyprus","Guatemala","India","Kenya","South
Korea","Lebanon","Malaysia","Romania","Sierra
Leone","Suriname","Swaziland","Thailand","United States","Zambia")
#
womenparliament <- c(16,34,3,18,6,9,11,8,8,7,13,2,9,11,15,18,11,9,14,12)
#
militarygdp <- c(4,1,1,7,1,2,2,1,3,2,2,5,2,2,2,1,2,1,4,2)
#
femalerep <- NA
femalerep[womenparliament < 10] <- "Low"
femalerep[womenparliament > 10] <- "High"
femalerep <- as.factor(femalerep)
#
countrydata <- data.frame(nation,womenparliament,militarygdp,femalerep)
Q2. Use the following data to conduct a difference of means test:
Female representation
|
Number of observation
|
Mean Military GDP
|
SD Military GDP
|
Low
|
9
|
2.00
|
1.32
|
High
|
11
|
2.64
|
1.75
|
Combined
|
20
|
2.35
|
1.57
|
(a) Calculate the t-statistic.
(b) Calculate the degrees of freedom.
(c) Compare the t-statistic to the critical value for p = 0.05 for the corresponding degrees of freedom.
Q3. Use the following covariance table to conduct a correlation coefficient test:
(n = 20)
|
womenparliament
|
militarygdp
|
womenparliament
|
46.75
|
|
militarygdp
|
0.22
|
2.45
|
(a) Calculate the correlation coefficient (r) between womenparliament and militarygdp.
(b) Calculate the t-statistic for r.
(c) Compare the t-statistic for r to the critical value for p = 0.05 for the corresponding degrees of freedom.