I apologize for my stats illiteracy in advance–I'm not a stats guru by any stretch, but am trying to learn. To start, I'll just introduce what my data set looks like, then what I'd like to accomplish.
I am working with geological data (Euclidean vectors) that are numeric (float). I have two variables, and I'll call them $x$ and $y$. In this sample, $x$ ranges from 0–200 and $y$ ranges from 2.4 to 2.9. My sample size is approximately $n=1000$.
If I understand $t$-tests correctly, they are useful for testing whether a difference in means between two groups is statistically significant. In my dataset, for example, I could divide the sample into two groups based on the value of $x$ (e.g. group 1 could be 0–100; group 2 would then be 100–200) and test then whether those groups show meaningful variation with respect to variable $y$.
With that in mind, here is my question that I was hoping this community could help me answer:
I want to divide the dataset into two continuous groups based on the value of $x$ (e.g., one group might be 0–75, the other might be 75–200). In doing so, though, I'd like to find the value of $x$ where the difference in means of the two groups (based on $t$-test) is most significant. Is there an efficient way to run many $t$-tests at once to search for the that value of $x$? The only other constraint I'd want to introduce is a minimum sample size for each group (say, 100). Or is the only way to do this an ad hoc approach?
If you could point me in the right direction or even help me with the correct stats terminology (to make it easier to search the web), I would greatly appreciate it. Thanks.