I have two proportions and I need to see if they are associated somehow. The null hypothesis is that they are equal. I'm using R.
So I get the pooled proportion:
pp = (prop_1+prop_2)/(dim(dist_1)+dim(dist_2))
then the standard error:
se = sqrt((pp*(1-pp))/dim(dist_1)+(pp*(1-pp))/dim(dist_2))
then the z value:
z = ((prop_1-prop_2)-0)/se
and then p value:
pvalue = 2*(1-pnorm(abs(z)))
The problem is that using this formula the p value is 0 since the z value is too big. Should I use
pt instead of
pnorm in this case?