summaryrefslogtreecommitdiff
path: root/291/CH3
diff options
context:
space:
mode:
Diffstat (limited to '291/CH3')
-rwxr-xr-x291/CH3/EX3.4a/eg3_4a.sce5
-rwxr-xr-x291/CH3/EX3.5a/eg3_5a.sce7
-rwxr-xr-x291/CH3/EX3.5b/eg3_5b.sce6
-rwxr-xr-x291/CH3/EX3.5c/eg3_5c.sce6
-rwxr-xr-x291/CH3/EX3.5d/eg3_5d.sce7
-rwxr-xr-x291/CH3/EX3.5f/eg3_5f.sce30
-rwxr-xr-x291/CH3/EX3.6a/eg3_6a.sce4
-rwxr-xr-x291/CH3/EX3.6b/eg3_6b.sce5
-rwxr-xr-x291/CH3/EX3.6c/eg3_6c.sce3
-rwxr-xr-x291/CH3/EX3.7a/eg3_7a.sce5
-rwxr-xr-x291/CH3/EX3.7b/eg3_7b.sce6
-rwxr-xr-x291/CH3/EX3.7c/eg3_7c.sce3
-rwxr-xr-x291/CH3/EX3.7d/eg3_7d.sce5
-rwxr-xr-x291/CH3/EX3.7e/eg3_7e.sce5
-rwxr-xr-x291/CH3/EX3.7f/eg3_7f.sce8
-rwxr-xr-x291/CH3/EX3.8a/eg3_8a.sce3
16 files changed, 108 insertions, 0 deletions
diff --git a/291/CH3/EX3.4a/eg3_4a.sce b/291/CH3/EX3.4a/eg3_4a.sce
new file mode 100755
index 000000000..9338a25c4
--- /dev/null
+++ b/291/CH3/EX3.4a/eg3_4a.sce
@@ -0,0 +1,5 @@
+cigarette = 0.28;
+cigar = 0.07;
+cigar_and_cigarette = 0.05 ;
+cigar_or_cigarette = cigarette + cigar - cigar_and_cigarette;
+disp( "% of the males smoke neither cigar nor cigarette", (1-cigar_or_cigarette)*100 ) \ No newline at end of file
diff --git a/291/CH3/EX3.5a/eg3_5a.sce b/291/CH3/EX3.5a/eg3_5a.sce
new file mode 100755
index 000000000..e39708760
--- /dev/null
+++ b/291/CH3/EX3.5a/eg3_5a.sce
@@ -0,0 +1,7 @@
+white_balls= 6;
+black_balls = 5;
+total = white_balls + black_balls;
+probability_whiteandblack = white_balls*black_balls/(total*(total-1));
+probability_blackandwhite = white_balls*black_balls/(total*(total-1));
+reqd_probability = probability_whiteandblack + probability_blackandwhite;
+disp(reqd_probability, "Thus, the required probability is") \ No newline at end of file
diff --git a/291/CH3/EX3.5b/eg3_5b.sce b/291/CH3/EX3.5b/eg3_5b.sce
new file mode 100755
index 000000000..67cda7548
--- /dev/null
+++ b/291/CH3/EX3.5b/eg3_5b.sce
@@ -0,0 +1,6 @@
+maths = 4;
+chemistry = 3;
+history = 2;
+language = 1;
+total_arrangements = factorial(4)*factorial(maths)*factorial(chemistry)*factorial(history)*factorial(language);
+disp(total_arrangements, "The total number of possible arrangements is ") \ No newline at end of file
diff --git a/291/CH3/EX3.5c/eg3_5c.sce b/291/CH3/EX3.5c/eg3_5c.sce
new file mode 100755
index 000000000..522a97855
--- /dev/null
+++ b/291/CH3/EX3.5c/eg3_5c.sce
@@ -0,0 +1,6 @@
+men = 6;
+women = 4;
+disp(factorial(men+women), "No of different rankings possible is")
+women_top4 = factorial(women)*factorial(men);
+prob = women_top4/factorial(men+women);
+disp(prob, "Probability that women receive the top 4 scores is") \ No newline at end of file
diff --git a/291/CH3/EX3.5d/eg3_5d.sce b/291/CH3/EX3.5d/eg3_5d.sce
new file mode 100755
index 000000000..fc6b7a990
--- /dev/null
+++ b/291/CH3/EX3.5d/eg3_5d.sce
@@ -0,0 +1,7 @@
+men = 6;
+women = 9;
+reqd_size =5;
+total =factorial(men+women)/(factorial(reqd_size)*factorial(men+women-reqd_size));
+given_committee = factorial(men)*factorial(women)/(factorial(3)*factorial(2)*factorial(men-3)*factorial(women-2));
+prob = given_committee/total;
+disp(prob, "Probability that the committee consists of 3 men and 2 women is") \ No newline at end of file
diff --git a/291/CH3/EX3.5f/eg3_5f.sce b/291/CH3/EX3.5f/eg3_5f.sce
new file mode 100755
index 000000000..d7f727210
--- /dev/null
+++ b/291/CH3/EX3.5f/eg3_5f.sce
@@ -0,0 +1,30 @@
+black_p = 6;
+white_p = 6;
+pair = 2;
+total_p = black_p + white_p;
+
+
+
+
+total_pairs = 1;
+while(total_p >0)
+ total_pairs = total_pairs*factorial(total_p)/(factorial(pair) * factorial(total_p - pair) );
+ total_p = total_p -2;
+ //disp(total_pairs)
+end
+//disp(total_pairs)
+total_pairs= total_pairs/factorial(6);
+black_pairs = 1;
+while(black_p >0)
+ black_pairs = black_pairs*factorial(black_p)/((factorial(pair) * factorial(black_p - pair) ));
+ black_p = black_p -2;
+ //disp(black_pairs)
+end
+black_pairs= black_pairs/factorial(3);
+//disp(black_pairs)
+
+
+white_pairs = black_pairs;
+allowed_pairs = black_pairs * white_pairs;
+probb = allowed_pairs/ total_pairs;
+disp(probb, " Probability that a random pairing will not result in any of the white and black players rooming together is ") \ No newline at end of file
diff --git a/291/CH3/EX3.6a/eg3_6a.sce b/291/CH3/EX3.6a/eg3_6a.sce
new file mode 100755
index 000000000..9add0151b
--- /dev/null
+++ b/291/CH3/EX3.6a/eg3_6a.sce
@@ -0,0 +1,4 @@
+defective =5;
+partially_defective = 10;
+acceptable = 25;
+disp(acceptable/(acceptable+partially_defective), "The required probability is") \ No newline at end of file
diff --git a/291/CH3/EX3.6b/eg3_6b.sce b/291/CH3/EX3.6b/eg3_6b.sce
new file mode 100755
index 000000000..cac6321e5
--- /dev/null
+++ b/291/CH3/EX3.6b/eg3_6b.sce
@@ -0,0 +1,5 @@
+prob_bb = 0.25;
+prob_bg = 0.25;
+prob_gb = 0.25;
+prob_gg = 0.25;
+disp(prob_bb/(prob_bg+prob_gb+prob_bb), "Probability that both are boys is") \ No newline at end of file
diff --git a/291/CH3/EX3.6c/eg3_6c.sce b/291/CH3/EX3.6c/eg3_6c.sce
new file mode 100755
index 000000000..0afa95cfd
--- /dev/null
+++ b/291/CH3/EX3.6c/eg3_6c.sce
@@ -0,0 +1,3 @@
+prob_phoenix = 0.3;
+prob_manager = 0.6;
+disp(prob_phoenix*prob_manager , "Probability that Perez will be a Phoenix branch office manager is") \ No newline at end of file
diff --git a/291/CH3/EX3.7a/eg3_7a.sce b/291/CH3/EX3.7a/eg3_7a.sce
new file mode 100755
index 000000000..aace4beb7
--- /dev/null
+++ b/291/CH3/EX3.7a/eg3_7a.sce
@@ -0,0 +1,5 @@
+accident_prone= 0.4;
+nonaccident_prone= 0.2;
+pop_accident = 0.3;
+prob = pop_accident*accident_prone + (1-pop_accident)*nonaccident_prone;
+disp(prob, "The required probability is "); \ No newline at end of file
diff --git a/291/CH3/EX3.7b/eg3_7b.sce b/291/CH3/EX3.7b/eg3_7b.sce
new file mode 100755
index 000000000..e97c869c4
--- /dev/null
+++ b/291/CH3/EX3.7b/eg3_7b.sce
@@ -0,0 +1,6 @@
+accident_prone= 0.4;
+nonaccident_prone= 0.2;
+pop_accident = 0.3;
+prob_of_accident = pop_accident*accident_prone + (1-pop_accident)*nonaccident_prone;
+prob = pop_accident * accident_prone /prob_of_accident;
+disp(prob, "The required probability is") \ No newline at end of file
diff --git a/291/CH3/EX3.7c/eg3_7c.sce b/291/CH3/EX3.7c/eg3_7c.sce
new file mode 100755
index 000000000..ea129f90d
--- /dev/null
+++ b/291/CH3/EX3.7c/eg3_7c.sce
@@ -0,0 +1,3 @@
+m = 5;
+p =1/2;
+disp( (m*p)/(1+((m-1)*p)), "The required probability is") \ No newline at end of file
diff --git a/291/CH3/EX3.7d/eg3_7d.sce b/291/CH3/EX3.7d/eg3_7d.sce
new file mode 100755
index 000000000..90937bb5e
--- /dev/null
+++ b/291/CH3/EX3.7d/eg3_7d.sce
@@ -0,0 +1,5 @@
+detect_present = 0.99;
+detect_notpresent = 0.01;
+pop_disease = 0.005;
+prob = detect_present*pop_disease/((detect_present*pop_disease) +(detect_notpresent*(1-pop_disease)) ) ;
+disp(prob, "The required probability is") \ No newline at end of file
diff --git a/291/CH3/EX3.7e/eg3_7e.sce b/291/CH3/EX3.7e/eg3_7e.sce
new file mode 100755
index 000000000..b63bebc96
--- /dev/null
+++ b/291/CH3/EX3.7e/eg3_7e.sce
@@ -0,0 +1,5 @@
+criminal_char = 0.9
+convinced= 0.6;
+pop_char = 0.2;
+prob = (convinced*criminal_char) /((convinced*criminal_char) + (pop_char*(1-convinced)));
+disp(prob, "The required probability is") \ No newline at end of file
diff --git a/291/CH3/EX3.7f/eg3_7f.sce b/291/CH3/EX3.7f/eg3_7f.sce
new file mode 100755
index 000000000..6063f2727
--- /dev/null
+++ b/291/CH3/EX3.7f/eg3_7f.sce
@@ -0,0 +1,8 @@
+alpha1 = 0.4;
+plane_in_region1 = 1/3;
+plane_in_region2 = 1/3;
+plane_in_region3 = 1/3;
+prob1 = (alpha1*plane_in_region1)/((alpha1*plane_in_region1)+ 1*plane_in_region2 + 1*plane_in_region3);
+prob2 = (1*plane_in_region2)/((alpha1*plane_in_region1)+ 1*plane_in_region2 + 1*plane_in_region3);
+disp(prob1 , "The probability that the planes is in region 1 given that the search of region 1 did not uncover it ");
+disp(prob2 , "The probability that the planes is in region 2/3 given that the search of region 1 did not uncover it "); \ No newline at end of file
diff --git a/291/CH3/EX3.8a/eg3_8a.sce b/291/CH3/EX3.8a/eg3_8a.sce
new file mode 100755
index 000000000..8dc33d834
--- /dev/null
+++ b/291/CH3/EX3.8a/eg3_8a.sce
@@ -0,0 +1,3 @@
+prob_A = 4/52;
+prob_H = 13/52;
+disp(prob_A*prob_H , "P(AH) is") \ No newline at end of file