#!/usr/bin/env python
#
import math; from math import factorial
import itertools; from itertools import combinations
n_large_W_T = 0
for treated_sample_ranks in combinations( range(1,12), 5 ) : # for every possible ranks of the treated samples
W_T = sum(treated_sample_ranks)
if W_T >= 43 :
n_large_W_T += 1
print treated_sample_ranks, W_T
print "Significance probablity = ", float(n_large_W_T) / ( factorial(11) / (factorial(5)*factorial(6)) )