Proportion test output R There are two populations at two different sites. Site 1: 15 male geckos out of total 20 and Site 2: 12 male out of 24.  
> x <- c(15,12)
> n <- c(20,24)
> prop.test(x,n)

        2-sample test for equality of proportions with continuity correction

data:  x out of n
X-squared = 1.918, df = 1, p-value = 0.1661
alternative hypothesis: two.sided
95 percent confidence interval:
 -0.07156667  0.57156667
sample estimates:
prop 1 prop 2 
  0.75   0.50 

I understand that I cannot reject the null hypothesis of equal proportions.
What does X-squared = 1.918 tell me? What does the confidence interval tell me exactly?
 A: The $\chi^2$ is the test statistic that measures how much the squared deviations of counts in your date deviate from their expected values, "normalized" to the expected value. To get a clear idea of the expected values, it is worthwhile to build a contingency table with marginals like this:
              SITE
GENDER        Site 1      Site 2     TOTALS
  males       15          12         27
  females      5          12         17
  TOTALS      20          24         44

The expected values are:
              SITE
GENDER        Site 1                   Site 2                     TOTALS
  males       20 * 27 / 44 = 12.27     24 * 27 /44 = 14.73        27
  females     20 * 17 / 44 =  7.73     24 * 17 /44 =  9.27        17
  TOTALS      20                       24                         44

The $\chi^2$ statistic will be hence calculated as:
$\chi^2 = \frac{(15 - 12.3)^2}{12.3}+\frac{(12 - 14.7)^2}{14.7}+\frac{(5 - 7.7)^2}{7.7}+\frac{(12 - 9.3)^2}{9.3} = 2.88$. This value differs from the one you calculated due to the continuity correction. If you redo your calculation without correction, i.e. prop.test(x, n, correct = F) the X-squared = 2.8758. 
The intuition is that if the deviations from expected follow a normal distribution $X \sim N(0, 1)$ (we are normalizing by dividing by the variance, which coincides with the expected value), their squared values will follow a $\chi^2_{df=1}$, and in general $\chi^2$ is the distribution resulting from squaring a normally distributed variable.
The confidence interval indicates that if the difference between the observed proportions is 0.75 - 0.50 = 0.25(see the last line of your output), if we were to repeat the experiment $100$ times the values observed would oscillate between -0.07156667  0.57156667, and only in $5\%$ of the instances would they be more extreme. Since this interval includes the number $0$, the possibility of no difference between proportions is perfectly within this calculated CI.
