diff options
Diffstat (limited to '3689/CH13/EX13.1/13_1.sce')
-rw-r--r-- | 3689/CH13/EX13.1/13_1.sce | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/3689/CH13/EX13.1/13_1.sce b/3689/CH13/EX13.1/13_1.sce new file mode 100644 index 000000000..ae83be9c8 --- /dev/null +++ b/3689/CH13/EX13.1/13_1.sce @@ -0,0 +1,14 @@ +////
+//Variable Declaration
+
+aH = 40 //Number of heads
+N = 100 //Total events
+
+//Calculations
+aT = 100 - aH
+We = factorial(N)/(factorial(aT)*factorial(aH))
+Wexpected = factorial(N)/(factorial(N/2)*factorial(N/2))
+
+//Results
+printf("\n The observed weight %5.2e compared to %5.2e",We,Wexpected)
+
|