I have a df with different features. I will focous on one feature here, called 'x':

```
count    2152.000000
mean       95.162587
std         0.758480
min        92.882304
25%        94.648659
50%        95.172078
75%        95.648485
max        97.407068

```

I want to perfom a ttest on my df while i sample data out of the df. I want to see the effect of the sampleSize. As i expect it to saturate after a number of samples. Therefore i loop the sampleSize for a specific random\_state:

```
for N in np.arange(1,2153,1):
    pull = helioPosition.sample(N,random_state= 140)
    ttest_pull.append(stats.ttest_ind(df['x'],pull['x'])[1])

```

the distribution of 'x' is a normal distribution:

[![dist 'x'](https://i.stack.imgur.com/rPmeG.png)](https://i.stack.imgur.com/rPmeG.png)

When i plot the p of the ttest over my sampleSize I get the following plot: 

[![ttest](https://i.stack.imgur.com/zNG5V.png)](https://i.stack.imgur.com/zNG5V.png)

Is there a mistake in my code or method. I would expect to get a better p value with a higher sampleSize, but this is not true for every sampleSize. How can a sampleSize of ~1500 be worse than a sample size of ~450?