1 2 3 4 5 6 7 8 9 10
n= 200; v = 120; p =0.5; if(v < (n/2)) pvalue = 2*cdfbin("PQ", v, n, p,1-p); else pvalue = 2*cdfbin("PQ", n-v, n, p,1-p); end disp(pvalue, "Pvalue is ");