# How to find the samples that contribute to the differences between two distributions?

I have two very large distributions, I did anderson-darling test on these two distributions and the result shows they're from different populations, significantly. Now I want to know which samples in these two distributions are making them different. Is there a way to tell?

To be clearer, here's an example:

library(kSamples)
set.seed(1234)
ad.test(rnorm(100, 0, 0.1), c(rnorm(100, 0, 0.1), rnorm(10,100,1)))


and result shows:

      Anderson-Darling k-sample test.

Number of samples:  2
Sample sizes:  100, 110
Number of ties: 0

Mean of  Anderson-Darling  Criterion: 1
Standard deviation of  Anderson-Darling  Criterion: 0.75453

T.AD = ( Anderson-Darling  Criterion - mean)/sigma

Null Hypothesis: All samples come from a common population.

version 1: 4.78 5.009         0.003532
version 2: 4.80 5.030         0.003476


Now if I remove the last 10 samples from the latter distribution:

set.seed(1234)
ad.test(rnorm(100, 0, 0.1), rnorm(100, 0, 0.1))


the result becomes:

 Anderson-Darling k-sample test.

Number of samples:  2
Sample sizes:  100, 100
Number of ties: 0

Mean of  Anderson-Darling  Criterion: 1
Standard deviation of  Anderson-Darling  Criterion: 0.75419

T.AD = ( Anderson-Darling  Criterion - mean)/sigma

Null Hypothesis: All samples come from a common population.


And also, why is the p-value of ad.test(rnorm(100, 0, 0.1), rnorm(100, 0, 0.1)) so small (0.05841) by a-d test even if they're actually two distributions drawn from the same population by rnorm?