I am trying to compute Sobol index by myself using python but I am facing some problems. The formula is very simple however I don't understand some part :

Here, E[Y|Qi] denotes the expected value of the output Y when parameter Qi is fixed. The first order Sobol sensitivity index tells us the expected reduction in the variance of the model when we fix parameter Qi. The sum of the first order Sobol sensitivity indices can not exceed one.
In my case, I have already the output and inputs in a dataframe.
the first thing is about E[Y|Qi], I dont know how to fix Qi? I tired this :
`
import numpy as np
import pandas as pd
data = pd.read_csv(path)
tb = data['toa_tb_h'].values # the output
sm = data['par_sm'].values # input
tau = data['par_tau'].values #input
ts = data['par.t_soil_surf'].values # input
c = data['par.c'].values # input
# compute E[tb|sm]
E[Y|Qi]
e_tb_per_sm = data.groupby("par_sm")["toa_tb_h"].mean()
si_sm = np.var(e_sm)/ np.var(tb)
I am not sure if what I am doing is correct, the problem is I find some time the is higher than 1 which is not correct.
I tried to compute the index based on the formula and expect to have results correct (less than 1)