Repository: evidentlyai/evidently
Issue: custom statistical function - Datadrift
Root cause: Configuration Error

Hi,

I need some help please, I am unable to get the custom statistical test quite right when producing the datadrift report.

I have posted below snippets from my code, please let me know if you need more info.

```
evidently version: 0.1.45.dev0
Python version: 3.9.7
Mac M1 pro
```

```
from scipy.stats import  ttest_ind
```

```
column_mapping = ColumnMapping()
column_mapping.target = "target"
column_mapping.prediction = "prediction"
```

```
def welch_ttest(reference_data: pd.Series, current_data: pd.Series): 
    return float(ttest_ind(reference_data, current_data)[1])
```

```
options = DataDriftOptions(
    feature_stattest_func=welch_ttest
    confidence=0.95
)

```

```
data_and_target_drift_dashboard = Dashboard(tabs=[DataDriftTab()])
```
```
data_and_target_drift_dashboard.calculate(dev_data, 
                                        prod_data,
                                        column_mapping = column_mapping)
```
```
data_and_target_drift_dashboard.show(mode='inline')
```

The output produced in the dashboard has "0" p-value for all features, which does not correspond to the output I get if I run the welch_ttest like so;

```
for i in dev_data.columns:
    print(i , welch_ttest(dev_data[i], prod_data[i]))
```

I do know if I run the Kolmogorov-Smirnov (K-S) test on my dataset I get "0" p-values for all features. Now I don't know whether the dashboard displaying "0" p-value for when I pass the  `feature_stattest_func=welch_ttest` is a coincidence (hard-coded, K-S test p-values??) or if it is because I am doing something wrong. 

PS: I have tried other custom tests as well and the p-value of the HTML dashboard is always "0", which does match K-S test but not the other custom tests I want to run.

<img width="1715" alt="Screenshot 2022-03-07 at 21 59 08" src="https://user-images.githubusercontent.com/26812995/157125196-4ff24227-d210-4ffc-a409-9dc088f8fed3.png">

Thanks 



Hi @shahasim,
I see in your example: you created `options` object, but it is unused in `Dashboard` object:

```data_and_target_drift_dashboard = Dashboard(tabs=[DataDriftTab()], options=[options])```

If it isn't typo in Issue so it would lead to your problem.

hey @Liraim , many thanks for your reply. It was a typo in the example in pasted above and in the meantime I've also identified the bug in my code :). Happy for you to close this ticket. Thanks again 👍 

@shahasim can you tell what your bug fix was ?

Hi @MoritzWag, if you have a problem with options, you can create an issue or ask question on our Discord server. 

hello @MoritzWag 

We have created a framework whereby we can run multiple statistical test for any model.

The tests that need to run are configured and passed as a list parameter. The program would then based on the tests selected in the list execute them one by one.

The **bug** in our case was that in the prototype the list was hardcoded on the backend, so it would always run K-S test 😞 .

Let me know if you need to have a chat or want to know more

Thanks,
Asim