def t_paired(a, b, tails='two-sided', exp_diff=0):
 if (len(a) != len(b)):
  raise ValueError('Unequal length lists in ttest_paired.')
 return t_one_sample((array(a) - array(b)), popmean=exp_diff, tails=tails)

def t_paired ( a , b , tails = 'two-sided' , exp_diff = 0 ) : if ( len ( a ) != len ( b ) ) : raise ValueError ( 'Unequal length lists in ttest_paired.' ) return t_one_sample ( ( array ( a ) - array ( b ) ) , popmean = exp_diff , tails = tails )
returns t and prob for two related samples of scores a and b .