I would like to see if two 2-dimentional datasets are the same, my data consists of two groups of xy data - the data is not linearly related (both xy distributions form a u-shaped curve) - is it possible to compare the x and y values from both group simultaneously and calculate a p-value?

For example, say I measured parameter P and Q, for group 1, and find them to be (non-linearly) correlated and then measure P and Q in group 2 - can I compare these two variables between the two groups in some kind of t-test like way, or do I have to do t-tests on P vs P between groups 1 and 2 and then do a separate t-test on Q vs Q for groups 1 and 2?

Any advice, or names of tests I can look up, would be gratefully received.

Best Regards