Query_Demo1_week18

I’m getting er"ror like TypeError: unsupported operand type(s) for -: ‘list’ and ‘float’

def var_vs_n(n_sample, n_throw):

       x_bar = [ ]
       var = [ ]
       for i in range(n_sample):
           r_n = [np.random.randint(1,6) for i in range(n_throw)]
           x_bar.append(sum(r_n)/len(r_n))
       mu = sum(x_bar)/n_sample
       print('Overall mean', mu)
       for i in x_bar:
          var = (x_bar-mu)/(n_sample-1)