summaryrefslogtreecommitdiff
path: root/291/CH14/EX14.3d/eg14_3d.sce
diff options
context:
space:
mode:
Diffstat (limited to '291/CH14/EX14.3d/eg14_3d.sce')
-rwxr-xr-x291/CH14/EX14.3d/eg14_3d.sce8
1 files changed, 8 insertions, 0 deletions
diff --git a/291/CH14/EX14.3d/eg14_3d.sce b/291/CH14/EX14.3d/eg14_3d.sce
new file mode 100755
index 000000000..4ef967626
--- /dev/null
+++ b/291/CH14/EX14.3d/eg14_3d.sce
@@ -0,0 +1,8 @@
+r = 30;
+T = 600;
+theta = 25;
+val1 = cdfchi("PQ", 2*T/theta, 2*r);
+val2 = 1- cdfchi("PQ", 2*T/theta, 2*(r+1));
+pvalue = min(val1, val2);
+disp(pvalue, "The pvalue is");
+disp("H0 would be accepted when the significance level is 0.10"); \ No newline at end of file