t-test comparing two proportions

I have two populations

population 1:
n=160, male=14, female=146

population 2:
n=150, male=16, female=134

How can I test if the two populations are significantly different?
I guess I have to use a t-test for two proportions, but I don't know how to do this with R

The t-test can be called with the function t.test(). You can type ?t.test in the console to get the documentation.

However, the t-test won't help you compare proportions (it compares the mean between two samples, here the "mean" doesn't really make sense). R has a function prop.test() that can help you, see ?prop.test to get some details.

You may need to learn a bit about R to be able to use it efficiently. I find the (free) book R for Data Science quite clear and a good resource.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.