In: Statistics and Probability
Please show the Rstudio code used in markdown. thank you!
3. Hypothesis Testing on Two Proportions
The Organization for Economic Cooperation and Development (OECD) summarizes data on labor-force participation rates in a publication called OECD in Figures. Independent simple random samples were taken of 300 U.S. women and 250 Canadian women. Of the U.S. women, 215 were found to be in the labor force; of the Canadian women, 186 were found to be in the labor force.
a) Compute the sample proportions for the two samples.
b) At a 3% significance level, do the data suggest that there is a difference between the
labor-force participation rates of U.S. and Canadian women?
c) Find and interpret a 97% confidence interval for the difference between the labor-force participation rates of U.S. and Canadian women.
a) Sample proportion of US women
= 215/300 = 0.7167
Sample proportion of Canadian women
=186/250 = 0.744
b) The null and alternative hypothesis
Test statistic
P= (215+186) / ( 300+250) = 401 / 550 = 0.7291
Q= 1-P = 0.2709
thus ,
For , the two tailed critical value of z is
zc = 2.17 ( from z table )
Reject H0 if z < -2.17 or z > 2.17
Since calculated value of test statistic is not in the critical region
Fail to reject H0
The data does not provide sufficient evidence that there is a difference between labor force participation rate of US and Canadian women .
c) The 97% confidence interval for difference in population proportions
= ( -0.1099 , 0.0553 )
Since the confidence interval includes zero( that means we cannot say that difference is not zero) , the data does not provide sufficient evidence that there is a difference between labor force participation rate of US and Canadian women .
Note : For 97% confidence ( ) , zc = 2.17