Answered step by step
Verified Expert Solution
Question
1 Approved Answer
POL 51 - Hare Third Assignment 1. Generate an object in R (call it whatever you want to name it) with 100 random draws from
POL 51 - Hare Third Assignment 1. Generate an object in R (call it whatever you want to name it) with 100 random draws from a standard normal distribution. Using this object, calculate and provide: a. A histogram of the object b. The mean c. The standard deviation d. The standard error of the mean e. The 95% confidence interval 2. Use the following data to conduct a difference of means test: Female representation Low High Combined Number of observations 9 11 20 Mean Military GDP 2.00 2.64 2.35 SD Military GDP 1.32 1.75 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. *** If you want to check your answers for #2 in R, you can paste the following code to create the dataset countrydata and conduct a t-test: 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)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started