summaryrefslogtreecommitdiff
path: root/1475/CH1/EX1.45
diff options
context:
space:
mode:
Diffstat (limited to '1475/CH1/EX1.45')
-rwxr-xr-x1475/CH1/EX1.45/Example_1_45.sce10
-rwxr-xr-x1475/CH1/EX1.45/Output_1_45.PNGbin0 -> 12516 bytes
2 files changed, 10 insertions, 0 deletions
diff --git a/1475/CH1/EX1.45/Example_1_45.sce b/1475/CH1/EX1.45/Example_1_45.sce
new file mode 100755
index 000000000..ec2c12eea
--- /dev/null
+++ b/1475/CH1/EX1.45/Example_1_45.sce
@@ -0,0 +1,10 @@
+// Example 1.45 Two players A and B toss a die alternately
+clc;
+clear;
+//E1=1/6;
+//E2=(5/6)*(5/6)*(1/6);
+//E3=(5/6)*(5/6)*(5/6)*(5/6)*(1/6);
+disp("A fails, B fails,A fails,B fails, and then A get six =(5/6)*(5/6)*(5/6)*(5/6)*(1/6)", "A fails, B fails and then A get a six = (5/6)*(5/6)*(1/6)","A gets a six in first toss=1/6,");
+disp((1/6)/(1-(5/6)^2),"Probability that A wins");
+disp("A fails, B fails,A fails,B fails,A fails and then B get six =(5/6)*(5/6)*(5/6)*(5/6)*(5/6)*(1/6)", "A fails, B fails and then A fails but in next trial B get a six = (5/6)*(5/6)*(5/6)*(1/6)","A fails to get a six in first trial but B gets a six in first toss=(5/6)*(1/6)");
+disp((5/36)/(1-(5/6)^2),"Probability that B wins");
diff --git a/1475/CH1/EX1.45/Output_1_45.PNG b/1475/CH1/EX1.45/Output_1_45.PNG
new file mode 100755
index 000000000..ed930a8fc
--- /dev/null
+++ b/1475/CH1/EX1.45/Output_1_45.PNG
Binary files differ