In: Math
Instructions This assignment is to be typed up in the supplied R-Script. You need to show all of your work in R in the given script. Be sure and use # in front of any text that you type in. You are allowed to work with your peer group, but please site your sources! If you get help from anyone, you need to mention that in your write up. This assignment is worth 60 points (10 per problem) and you can use it to replace the online Midterm Quiz. That is, if you chose to, you can count it twice.
6. Minimum wage. A Rasmussen Reports survey of 1,000 US adults found that 42% believe raising the minimum wage will help the economy. Construct a 99% confidence interval for the true proportion of US adults who believe this.
Use the blow code for RStudio:
# Finding confidence interval for population proportion
# Method1:
n = 1000 # Number of respondents
p.hat = 0.42 # Sample prop, 42% = 42/100 = 0.42
x = n*p.hat # Number of successes
c = 0.99 # Confidence level,99%=99/100=0.99
One_proptest = prop.test(x,n,conf.level=c)
One_proptest$conf.int # Confidence interval
#....................................................................................................................
# Method2:
n = 1000 # Number of respondents
p.hat = 0.42 # Sample prop, 42% = 42/100 = 0.42
c = 0.99 # Confidence level,99%=99/100=0.99
alpha = 1-c # Level of significance
z.star = round(qnorm(1-alpha/2),2)
z.star
E = round(z.star*sqrt(p.hat*(1-p.hat)/n),4) # Margin of Error
E
p.hat + c(-1,1)*E #Confidence interval
RStudio Console/Output:
The 99% confidence interval for the true proportion of US adults who believe this is (0.3780, 0.4611).