# Tests of independence in contingency tables

I want to perform a test of independence for a contingency table where the Y characteristic codes for whether an individual go to school or not, and X stands for its gender (MA, male; FE, female). A typical contingency table would be:

+-----+-----------+-----------------+
| X/Y | Go School | No Go to school |
+-----+-----------+-----------------+
| MA  |           |                 |
+-----+-----------+-----------------+
| FE  |           |                 |
+-----+-----------+-----------------+


This kind of test is clear to me. Now suppose that my contingency is like the following one

+-----+-----------+-----------------+
| X/Y | Go School | No Go to school |
+-----+-----------+-----------------+
| MA  |           |                 |
+-----+-----------+-----------------+
| MA  |           |                 |
+-----+-----------+-----------------+


In other words the X variable refers to sample of "the same type"; that is, they are both extracted from the same population and have the same gender.

My question is: If I discover that there is a significant difference between the proportions of these two samples, I can't conclude that these two samples are "similar"; rather, there must be another factor or characteristic (that I haven't considered) which causes this difference although the samples come from the same population. Is this correct?