From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 3808/CH7/EX7.5/Ex7_5.sce | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 3808/CH7/EX7.5/Ex7_5.sce (limited to '3808/CH7/EX7.5/Ex7_5.sce') diff --git a/3808/CH7/EX7.5/Ex7_5.sce b/3808/CH7/EX7.5/Ex7_5.sce new file mode 100644 index 000000000..0e73ebb24 --- /dev/null +++ b/3808/CH7/EX7.5/Ex7_5.sce @@ -0,0 +1,22 @@ +//Chapter 07: Discrete Probability + +clc; +clear; + +total_balls=50 //total no of balls in bin +pr=1 +//Part-(A) Sampling without replacement +given_no=5 //11 4 17 39 23 +select_ways=1 //ways in which that particular order can be drawn +n=total_balls-given_no +for i=total_balls:-1:n+1 +pr=pr*i +end +prob=select_ways/pr +disp(prob,'The probability that 11,4,17,39,23 are drawn in that order is') + +//Part-(B) Sampling with replacement +total_ways=total_balls**given_no //5 is the no.of balls ,i.e, 11 4 17 39 23 +select_ways=1 //numbers are drawn in that order +prob=select_ways/total_ways +disp(prob,'The probability that 11,4,17,39,23 are drawn in that order is') -- cgit