From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2951/CH9/EX9.3/ex_9_3.sce | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 2951/CH9/EX9.3/ex_9_3.sce (limited to '2951/CH9/EX9.3') diff --git a/2951/CH9/EX9.3/ex_9_3.sce b/2951/CH9/EX9.3/ex_9_3.sce new file mode 100755 index 000000000..dabbc322f --- /dev/null +++ b/2951/CH9/EX9.3/ex_9_3.sce @@ -0,0 +1,22 @@ +clc; +clear; +P_box1=0.25; //P(box1) +P_box2=0.25; //P(box2) +P_box3=0.25; //P(box3) +P_box4=0.25; //P(box4) + +Pdef_1=0.05; //P(defective/box1) +Pdef_2=0.4; //P(defective/box2) +Pdef_3=0.10; //P(defective/box3) +Pdef_4=0.10; //P(defective/box4) + +//a) + +Pcomp_def=(P_box1*Pdef_1)+(P_box2*Pdef_2)+(P_box3*Pdef_3)+(P_box4*Pdef_4); //Theoram of total probability + +//b) +Pbox2_def=(P_box2*Pdef_2)/((P_box1*Pdef_1)+(P_box2*Pdef_2)+(P_box3*Pdef_3)+(P_box4*Pdef_4)); //Bayes theoram + +disp(Pcomp_def," a) P(component is defective)="); + +disp(Pbox2_def," b) P(box2|defective)="); -- cgit