diff options
Diffstat (limited to '291/CH12/EX12.2a/eg12_2a.sce')
-rwxr-xr-x | 291/CH12/EX12.2a/eg12_2a.sce | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/291/CH12/EX12.2a/eg12_2a.sce b/291/CH12/EX12.2a/eg12_2a.sce new file mode 100755 index 000000000..b82cfcff7 --- /dev/null +++ b/291/CH12/EX12.2a/eg12_2a.sce @@ -0,0 +1,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 ");
\ No newline at end of file |