diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1475 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1475')
269 files changed, 1706 insertions, 0 deletions
diff --git a/1475/CH1/EX1.11/Example_1_11.sce b/1475/CH1/EX1.11/Example_1_11.sce new file mode 100755 index 000000000..82240afca --- /dev/null +++ b/1475/CH1/EX1.11/Example_1_11.sce @@ -0,0 +1,16 @@ +// Scilab Code Example 1.11 Probability of obtaining both heads, one head and one tail, both tail, at least one head
+N=4;
+disp(N,"Total No. of possible outcomes (N)=");
+M1=1;
+disp(M1,"No. of Favorable cases(both head)=");
+M2=2;
+disp(M2,"No. of Favorable cases(one head & one tail)=");
+M3=1;
+disp(M3,"No. of Favorable cases(both tails)=");
+M4=3;
+disp(M4,"No. of Favorable cases(At least one head)=");
+P1=M1/N;
+P2=M2/N;
+P3=M3/N;
+P4=M4/N;
+disp(P4,"P(atleast one head)= ",P3,"P(Both tails)=",P2,"P(one headand one tail)=",P1,"P(Both head)=");
diff --git a/1475/CH1/EX1.11/Output_1_11.PNG b/1475/CH1/EX1.11/Output_1_11.PNG Binary files differnew file mode 100755 index 000000000..f59be5a68 --- /dev/null +++ b/1475/CH1/EX1.11/Output_1_11.PNG diff --git a/1475/CH1/EX1.12/Example_1_12.sce b/1475/CH1/EX1.12/Example_1_12.sce new file mode 100755 index 000000000..fb66e7a81 --- /dev/null +++ b/1475/CH1/EX1.12/Example_1_12.sce @@ -0,0 +1,16 @@ +//Example 1.12
+N= 6;
+disp(N,"total No. of possible outcomes (N)=");
+M1= 3;
+disp(M1,"No. of Favorable cases(an even number)=");
+M2= 3;
+disp(M2,"No. of Favorable cases(an odd number)=");
+M3= 2;
+disp(M3,"No. of Favorable cases(less than 3)= ");
+M4= 1;
+disp(M4,"No. of Favorable cases(a Six)=");
+P1=M1/N;
+P2=M2/N;
+P3=M3/N;
+P4=M4/N;
+disp(P4,"Probab. of (a Six)= ",P3,"Probab. of (less than 3)=",P2,"Probab. of (an odd number)=",P1,"Probab. of (an even number)=");
diff --git a/1475/CH1/EX1.12/Output_1_12.PNG b/1475/CH1/EX1.12/Output_1_12.PNG Binary files differnew file mode 100755 index 000000000..03acbe66a --- /dev/null +++ b/1475/CH1/EX1.12/Output_1_12.PNG diff --git a/1475/CH1/EX1.13/Example_1_13.sce b/1475/CH1/EX1.13/Example_1_13.sce new file mode 100755 index 000000000..9b74935f6 --- /dev/null +++ b/1475/CH1/EX1.13/Example_1_13.sce @@ -0,0 +1,11 @@ +//Example 1.13
+N=4;
+disp(N,"total No. of possible outcomes (N)=");
+M1=0;
+disp(M1,"No. of Favorable cases(3 heads)=");
+M2=4
+disp(M2,"No. of Favorable cases(not more than 3 heads)=");
+P1=M1/N;
+P2=M2/N;
+disp(P2,"Probab. of (not more than 3 heads)=",P1,"Probab. of (3 heads)=");
+
diff --git a/1475/CH1/EX1.13/Output_1_13.PNG b/1475/CH1/EX1.13/Output_1_13.PNG Binary files differnew file mode 100755 index 000000000..93940c3e1 --- /dev/null +++ b/1475/CH1/EX1.13/Output_1_13.PNG diff --git a/1475/CH1/EX1.14/Example_1_14.sce b/1475/CH1/EX1.14/Example_1_14.sce new file mode 100755 index 000000000..3a472d26e --- /dev/null +++ b/1475/CH1/EX1.14/Example_1_14.sce @@ -0,0 +1,8 @@ +//Example 1.14
+N=4;
+disp(N,"total No. of possible outcomes (N)=");
+M=2;
+disp(M,"No. of Favorable cases(both heads or both tails)=");
+P1=M/N;
+disp(P1,"Probab. of (both heads or both tails)=");
+
diff --git a/1475/CH1/EX1.14/Output_1_14.PNG b/1475/CH1/EX1.14/Output_1_14.PNG Binary files differnew file mode 100755 index 000000000..26134f93a --- /dev/null +++ b/1475/CH1/EX1.14/Output_1_14.PNG diff --git a/1475/CH1/EX1.15/Example_1_15.sce b/1475/CH1/EX1.15/Example_1_15.sce new file mode 100755 index 000000000..85a77a687 --- /dev/null +++ b/1475/CH1/EX1.15/Example_1_15.sce @@ -0,0 +1,12 @@ +//Example 1.15
+clc;
+clear;
+disp("Possible outcomes...(1,1),(1,2)......(6,5),(6,6)");
+N=36;
+disp(N,"total No. of possible outcomes (N) =");
+disp("Favourable outcomes....(2,6),(3,4),(4,3),(6,2)");
+M=4
+disp(M,"No. of Favorable cases of (dice points product is 12)=");
+P=M/N;
+disp(P,"Probability of (dice points product is 12)=");
+
diff --git a/1475/CH1/EX1.15/Output_1_15.PNG b/1475/CH1/EX1.15/Output_1_15.PNG Binary files differnew file mode 100755 index 000000000..3947cb79f --- /dev/null +++ b/1475/CH1/EX1.15/Output_1_15.PNG diff --git a/1475/CH1/EX1.16/Example_1_16.sce b/1475/CH1/EX1.16/Example_1_16.sce new file mode 100755 index 000000000..d7c6b71b3 --- /dev/null +++ b/1475/CH1/EX1.16/Example_1_16.sce @@ -0,0 +1,12 @@ +//Example 1.16
+clc;
+clear;
+N=10;
+disp(N,"total No. of Balls (white+Black) (N)=");
+M1=6;
+disp(M1,"No. of (White Balls)= ");
+M2=4;
+disp(M2,"No. of (Black Balls)= ");
+P1=M1/N;
+disp(P1,"Probability of white ball to be drawn is=");
+
diff --git a/1475/CH1/EX1.16/Output_1_16.PNG b/1475/CH1/EX1.16/Output_1_16.PNG Binary files differnew file mode 100755 index 000000000..b86d30592 --- /dev/null +++ b/1475/CH1/EX1.16/Output_1_16.PNG diff --git a/1475/CH1/EX1.17/Example_1_17.sce b/1475/CH1/EX1.17/Example_1_17.sce new file mode 100755 index 000000000..99c88247f --- /dev/null +++ b/1475/CH1/EX1.17/Example_1_17.sce @@ -0,0 +1,13 @@ +//Example 1.17
+clc;
+clear;
+N=56;
+disp(N,"total No. of ways of seleting 2 balls(out of 8) one by one =");
+M1=15;
+disp(M1,"the 1st ball is white and the 2nd is black= ");
+M2=30;
+disp(M2,"one ball is white and the other is black");
+P1=M1/N;
+P2=M2/N;
+disp(P2,"Probability that one ball is white and the other is black",P1,"Probability that 1st ball is white and the 2nd is black=");
+
diff --git a/1475/CH1/EX1.17/Output_1_17.PNG b/1475/CH1/EX1.17/Output_1_17.PNG Binary files differnew file mode 100755 index 000000000..7a306b0b6 --- /dev/null +++ b/1475/CH1/EX1.17/Output_1_17.PNG diff --git a/1475/CH1/EX1.18/Example_1_18.sce b/1475/CH1/EX1.18/Example_1_18.sce new file mode 100755 index 000000000..b5de26ede --- /dev/null +++ b/1475/CH1/EX1.18/Example_1_18.sce @@ -0,0 +1,13 @@ +//Example 1.18
+clc;
+clear;
+N=1326;
+disp(N,"total No. of ways of seleting 2 cards(out of 52) one by one =");
+M1=325;
+disp(M1,"both are red cards= ");
+M2=169;
+disp(M2,"one is heart and the other is a diamod=");
+P1=M1/N;
+P2=M2/N;
+disp(P2,"Probability that one is heart and the other is a diamod= ",P1,"Probability that both are red cards=");
+
diff --git a/1475/CH1/EX1.18/Output_1_18.PNG b/1475/CH1/EX1.18/Output_1_18.PNG Binary files differnew file mode 100755 index 000000000..23a4802d2 --- /dev/null +++ b/1475/CH1/EX1.18/Output_1_18.PNG diff --git a/1475/CH1/EX1.19/Example_1_19.sce b/1475/CH1/EX1.19/Example_1_19.sce new file mode 100755 index 000000000..0b7c388e3 --- /dev/null +++ b/1475/CH1/EX1.19/Example_1_19.sce @@ -0,0 +1,11 @@ +//Example 1.19
+clc;
+clear;
+N=(365*365*365);
+//Assume 1 year = 365 days
+disp(N,"total No. of possible ways in which the 3 children have birthdays is =");
+M=(365*364*363);
+disp(M,"No. of favourable cases such that 3 children in a family have different birthdays= ");
+P=M/N;
+disp(,P,"Probability that 3 children in a family have different birthdays=");
+
diff --git a/1475/CH1/EX1.19/Output_1_19.PNG b/1475/CH1/EX1.19/Output_1_19.PNG Binary files differnew file mode 100755 index 000000000..770b15038 --- /dev/null +++ b/1475/CH1/EX1.19/Output_1_19.PNG diff --git a/1475/CH1/EX1.20/Example_1_20.sce b/1475/CH1/EX1.20/Example_1_20.sce new file mode 100755 index 000000000..c18f4e604 --- /dev/null +++ b/1475/CH1/EX1.20/Example_1_20.sce @@ -0,0 +1,10 @@ +//Example 1.20
+clc;
+clear;
+N=factorial(5);
+disp(N,"total No. of ways in which 5 Persons can occupy seats in row =");
+M=factorial(4)*2;
+disp(M,"No. of favourable cases such that A and B can sit next to each other= ");
+P=M/N;
+disp(,P,"Probability that A and B can sit next to each other= ");
+
diff --git a/1475/CH1/EX1.20/Output_1_20.PNG b/1475/CH1/EX1.20/Output_1_20.PNG Binary files differnew file mode 100755 index 000000000..10771e05c --- /dev/null +++ b/1475/CH1/EX1.20/Output_1_20.PNG diff --git a/1475/CH1/EX1.21/Example_1_21.sce b/1475/CH1/EX1.21/Example_1_21.sce new file mode 100755 index 000000000..e0e1c39e7 --- /dev/null +++ b/1475/CH1/EX1.21/Example_1_21.sce @@ -0,0 +1,9 @@ +//Example 1.21 A batch contains 10 articles of which 4 are defective .
+clc;
+clear;
+N=120;
+disp(N,"total no. of ways in which 3 articles are selected out of 10 =");
+M= 20;
+disp(M,"No. of favourable cases are ");
+P=M/N;
+disp(,P,"Probability that 3 articles are chosen at random and none is defective = ");
diff --git a/1475/CH1/EX1.21/Output_1_21.PNG b/1475/CH1/EX1.21/Output_1_21.PNG Binary files differnew file mode 100755 index 000000000..6b156ff78 --- /dev/null +++ b/1475/CH1/EX1.21/Output_1_21.PNG diff --git a/1475/CH1/EX1.22/Example_1_22.sce b/1475/CH1/EX1.22/Example_1_22.sce new file mode 100755 index 000000000..31799cf7b --- /dev/null +++ b/1475/CH1/EX1.22/Example_1_22.sce @@ -0,0 +1,10 @@ +//Example 1.22 10 distinguishable ball are distributed at random into 4 boxes.
+clc;
+clear;
+N=(4^10);
+disp(N,"total no. of ways in which 4 boxes are selected to distribute 10 balls =");
+M= (factorial(10)/(factorial(2)*factorial(8)))*(3^8);
+// M= 10C2 * 3^8
+disp(M,"No. of favourable cases when a specified box recieve 2 balls out of 10, and remaining 8 balls are distributed are ");
+P=M/N;
+disp(,P,"Probability that a specified box recieves exactly 2 balls = ");
diff --git a/1475/CH1/EX1.22/Output_1_22.PNG b/1475/CH1/EX1.22/Output_1_22.PNG Binary files differnew file mode 100755 index 000000000..c25e24f1a --- /dev/null +++ b/1475/CH1/EX1.22/Output_1_22.PNG diff --git a/1475/CH1/EX1.23/Example_1_23.sce b/1475/CH1/EX1.23/Example_1_23.sce new file mode 100755 index 000000000..f5f8d110d --- /dev/null +++ b/1475/CH1/EX1.23/Example_1_23.sce @@ -0,0 +1,15 @@ +//Example 1.23 If 10 persons are arranged at random
+clear;
+clc;
+N1=factorial(10);
+disp(N1,"total no. of ways in which 10 persons are arranged in a line =");
+M1= factorial(9)* factorial(2);
+disp(M1,"No. of favourable cases such that two persons will be next to each other in a line= ");
+N2= factorial(9);
+disp(N2,"total no. of ways in which 10 persons are arranged in a ring =");
+M2= factorial(8)* factorial(2);
+disp(M2,"No. of favourable cases such that two persons will be next to each other in a ring= ");
+P1=M1/N1;
+P2=M2/N2;
+disp(P2,"Probability that two persons will be next to each other in a ring of 10 persons= ",P1,"Probability that two persons will be next to each other in a line of 10 persons= ");
+
diff --git a/1475/CH1/EX1.23/Output_1_23.PNG b/1475/CH1/EX1.23/Output_1_23.PNG Binary files differnew file mode 100755 index 000000000..5c7585b4f --- /dev/null +++ b/1475/CH1/EX1.23/Output_1_23.PNG diff --git a/1475/CH1/EX1.24/Example_1_24.sce b/1475/CH1/EX1.24/Example_1_24.sce new file mode 100755 index 000000000..4c5b6c71e --- /dev/null +++ b/1475/CH1/EX1.24/Example_1_24.sce @@ -0,0 +1,11 @@ +//Example 1.24 X and Y stand in aline with 10 other people.
+clear;
+clc;
+N=factorial(12);
+disp(N,"total no. of ways in which 12 persons are arranged in a line =");
+M= 8*(2*factorial(10));
+disp(M,"No. of favourable cases such that there are 3 people between X and Y = ");
+// M= (1,5),(2,6),(3,7),(4,8),(5.9),(6,10),(7,11),(8,12)
+P=M/N;
+disp(P,"Probability that there are 3 people between X and Y= ");
+
diff --git a/1475/CH1/EX1.24/Output_1_24.PNG b/1475/CH1/EX1.24/Output_1_24.PNG Binary files differnew file mode 100755 index 000000000..d7d86165d --- /dev/null +++ b/1475/CH1/EX1.24/Output_1_24.PNG diff --git a/1475/CH1/EX1.25/Example_1_25.sce b/1475/CH1/EX1.25/Example_1_25.sce new file mode 100755 index 000000000..d8196245f --- /dev/null +++ b/1475/CH1/EX1.25/Example_1_25.sce @@ -0,0 +1,10 @@ +//Example 1.25 X and Y are seated at random at a round table
+clear;
+clc;
+N=(12*11);
+disp(N,"total no. of ways in X and Y can occupy seats=");
+M= (12*2);
+disp(M,"No. of favourable cases such that there are 3 people between X and Y at a round table = ");
+// M= (1,5),(2,6),(3,7),(4,8),(5.9),(6,10),(7,11),(8,12),(9,1),(10,2),(11,3),(12,4)
+P=M/N;
+disp(P,"Probability that there are 3 people between X and Y at a round table =");
diff --git a/1475/CH1/EX1.25/Output_1_25.PNG b/1475/CH1/EX1.25/Output_1_25.PNG Binary files differnew file mode 100755 index 000000000..7bde7c5f7 --- /dev/null +++ b/1475/CH1/EX1.25/Output_1_25.PNG diff --git a/1475/CH1/EX1.26/Example_1_26.sce b/1475/CH1/EX1.26/Example_1_26.sce new file mode 100755 index 000000000..8202404fc --- /dev/null +++ b/1475/CH1/EX1.26/Example_1_26.sce @@ -0,0 +1,12 @@ +//Example 1.26 A lady declares that by testing a cup of tea with milk
+clc;
+clear;
+N1=(factorial(10)/(factorial(5)*factorial(5)));
+disp(N1,"total no. of ways in which 10 cups of tea are prepared with 5 in one way and 5 in other =");
+M= 1;
+disp(M,"No. of favourable cases are =");
+N2= (2^5);
+disp(N2, "total no. of ways if cups are presented in pair =")
+P1=M/N1;
+P2=M/N2
+disp(P2,"The required Probability is =",P1," The required Probability is = ");
diff --git a/1475/CH1/EX1.26/Output_1_26.PNG b/1475/CH1/EX1.26/Output_1_26.PNG Binary files differnew file mode 100755 index 000000000..6e2317e31 --- /dev/null +++ b/1475/CH1/EX1.26/Output_1_26.PNG diff --git a/1475/CH1/EX1.27/Example_1_27.sce b/1475/CH1/EX1.27/Example_1_27.sce new file mode 100755 index 000000000..22a0d7302 --- /dev/null +++ b/1475/CH1/EX1.27/Example_1_27.sce @@ -0,0 +1,9 @@ +//Example 1.27 A box contains twenty tickets of identical appearance
+clc;
+clear;
+N=(factorial(20)/(factorial(3)*factorial(17)));
+disp(N,"total no. of ways in 3 tickets are chosen at random =");
+M= (18+16+14+12+10+8+6+4+2);
+disp(M,"No. of favourable cases with numbers in arithmetic progression are =");
+P=M/N;
+disp(P," The required Probability is = ");
diff --git a/1475/CH1/EX1.27/Output_1_27.PNG b/1475/CH1/EX1.27/Output_1_27.PNG Binary files differnew file mode 100755 index 000000000..8bd40c58f --- /dev/null +++ b/1475/CH1/EX1.27/Output_1_27.PNG diff --git a/1475/CH1/EX1.28/Example_1_28.sce b/1475/CH1/EX1.28/Example_1_28.sce new file mode 100755 index 000000000..cd33e8d6d --- /dev/null +++ b/1475/CH1/EX1.28/Example_1_28.sce @@ -0,0 +1,12 @@ +//Example 1.28 Four Cards are drawn at random from a full pack.
+clc;
+clear;
+N=(52*51*50*49);
+disp(N,"total no. of ways in which 4 cards are drawn =");
+M1= (52*39*26*13);
+disp(M1,"No. of favourable cases with cards of 4 different suits =");
+P1=M1/N;
+M2=(52*36*22*10);
+P2=M2/N;
+disp(M2,"No of favourable cases with cards of different suits and different denominations =")
+disp(P2,"The required Probability with cards of different suits and different denominations",P1," The required Probability with cards of 4 different suits = ");
diff --git a/1475/CH1/EX1.28/Output_1_28.PNG b/1475/CH1/EX1.28/Output_1_28.PNG Binary files differnew file mode 100755 index 000000000..5060a4249 --- /dev/null +++ b/1475/CH1/EX1.28/Output_1_28.PNG diff --git a/1475/CH1/EX1.31/Example_1_31.sce b/1475/CH1/EX1.31/Example_1_31.sce new file mode 100755 index 000000000..a80767ec4 --- /dev/null +++ b/1475/CH1/EX1.31/Example_1_31.sce @@ -0,0 +1,9 @@ +//Example 1.31 10 dissimilar balls are distributed at random into 4 boxes ar marked A B C D
+clc;
+clear;
+N=4^10;
+disp(N,"total no. of possible ways of distribution =");
+M= (factorial(10)/(factorial(2)*factorial(4)*factorial(4)*factorial(0)));
+disp(M,"No. of favourable cases such that 4 boxes contain respectively 2,4,4,0 balls =");
+P=M/N;
+disp(P," The required Probability is = ");
diff --git a/1475/CH1/EX1.31/Output_1_31.PNG b/1475/CH1/EX1.31/Output_1_31.PNG Binary files differnew file mode 100755 index 000000000..dece47ccf --- /dev/null +++ b/1475/CH1/EX1.31/Output_1_31.PNG diff --git a/1475/CH1/EX1.32/Example_1_32.sce b/1475/CH1/EX1.32/Example_1_32.sce new file mode 100755 index 000000000..7dabec262 --- /dev/null +++ b/1475/CH1/EX1.32/Example_1_32.sce @@ -0,0 +1,9 @@ +//Example 1.32 10 identical balls are distributed at random into 4 boxes ar marked A B C D
+clc;
+clear;
+N=(factorial(13)/(factorial(3)*factorial(10)));
+disp(N,"total no. of possible ways of distribution =");
+M= 1;
+disp(M,"No. of favourable cases such that 4 boxes contain respectively 2,4,4,0 identical balls =");
+P=M/N;
+disp(P," The required Probability is = ");
diff --git a/1475/CH1/EX1.32/Output_1_32.PNG b/1475/CH1/EX1.32/Output_1_32.PNG Binary files differnew file mode 100755 index 000000000..f347991d5 --- /dev/null +++ b/1475/CH1/EX1.32/Output_1_32.PNG diff --git a/1475/CH1/EX1.35/Example_1_35.sce b/1475/CH1/EX1.35/Example_1_35.sce new file mode 100755 index 000000000..6de305923 --- /dev/null +++ b/1475/CH1/EX1.35/Example_1_35.sce @@ -0,0 +1,9 @@ +// Example 1.35 Find the values of following probabilites
+clc;
+clear;
+A= 1/2 ;
+B= 1/3;
+AB= 1/4;
+//disp(AB,"P(AB)=", B, "P(B)=",A,"P(A)=");
+disp((1-A)+B-(B-AB),"P(~A + B)=",1-(A+B-AB),"P(~A~B)",B-AB,"P(~AB)",AB/B,"P(A/B)",A+B-AB,"P(A+B)=",1-A,"P(~A)");
+disp("Events A and B are neither mutually exclusive nor exhaustive nor equally likely nor independent ")
diff --git a/1475/CH1/EX1.35/Output_1_35.PNG b/1475/CH1/EX1.35/Output_1_35.PNG Binary files differnew file mode 100755 index 000000000..a32d36584 --- /dev/null +++ b/1475/CH1/EX1.35/Output_1_35.PNG diff --git a/1475/CH1/EX1.36/Example_1_36.sce b/1475/CH1/EX1.36/Example_1_36.sce new file mode 100755 index 000000000..d37e05a7a --- /dev/null +++ b/1475/CH1/EX1.36/Example_1_36.sce @@ -0,0 +1,9 @@ +// Example 1.36 Are A and B independent
+clc;
+clear;
+A= 3/8 ;
+B= 5/8;// Mistake in book printing In book it is 5/3
+C= 3/4;
+disp(C,"P(A+B)=", B, "P(B)=",A,"P(A)=");
+disp(A*B,"P(A).P(B)",(A+B-C),"P(AB)",(A+B-C)/(B),"P(A/B)",(A+B-C)/(A),"P(B/A)");
+disp("Since P(AB) is not equal to P(A).P(B), so events A and B are not independent");
diff --git a/1475/CH1/EX1.36/Output_1_36.PNG b/1475/CH1/EX1.36/Output_1_36.PNG Binary files differnew file mode 100755 index 000000000..3662835eb --- /dev/null +++ b/1475/CH1/EX1.36/Output_1_36.PNG diff --git a/1475/CH1/EX1.39/Example_1_39.sce b/1475/CH1/EX1.39/Example_1_39.sce new file mode 100755 index 000000000..2c7fa712a --- /dev/null +++ b/1475/CH1/EX1.39/Example_1_39.sce @@ -0,0 +1,9 @@ +// Example 1.39 The odds in favour of an event A are 3:4.
+clc;
+clear;
+A=3/7;
+B=4/11
+AB=A*B;
+disp(A,"Probab. of occurrence of A are P(A)=",B,"Probab. of occurrence of B are P(B)=");
+disp(A+B-AB,"The probab. of at least one of the events A and B is given by ");
+
diff --git a/1475/CH1/EX1.39/Output_1_39.PNG b/1475/CH1/EX1.39/Output_1_39.PNG Binary files differnew file mode 100755 index 000000000..f1017d2cd --- /dev/null +++ b/1475/CH1/EX1.39/Output_1_39.PNG diff --git a/1475/CH1/EX1.40/Example_1_40.sce b/1475/CH1/EX1.40/Example_1_40.sce new file mode 100755 index 000000000..002ed0db7 --- /dev/null +++ b/1475/CH1/EX1.40/Example_1_40.sce @@ -0,0 +1,7 @@ +// Example 1.40 A card is drawn from each of two well shuffled cards
+clc;
+clear;
+A=1/13;
+B=1/13;
+AB=A*B;
+disp(A+B-AB,"Probab. that at least one of them is ace=",AB,"Events A and B are independent so P(AB)=",B,"Probab. that the card from Pack II is an ace",A,"Probab. that card from Pack I is an ace");
diff --git a/1475/CH1/EX1.40/Output_1_40.PNG b/1475/CH1/EX1.40/Output_1_40.PNG Binary files differnew file mode 100755 index 000000000..846dcde29 --- /dev/null +++ b/1475/CH1/EX1.40/Output_1_40.PNG diff --git a/1475/CH1/EX1.41/Example_1_41.sce b/1475/CH1/EX1.41/Example_1_41.sce new file mode 100755 index 000000000..f64376e93 --- /dev/null +++ b/1475/CH1/EX1.41/Example_1_41.sce @@ -0,0 +1,7 @@ +//Example 1.41 An Article manufacture by company consists of two parts.
+clc;
+clear;
+A=1-(9/100);
+B=1-(5/100);
+disp(B,"Probab. that part II is not defective=", A, "Probab. that part I is not defective=");
+disp(A*B, "Probability that the assembled article is not defective= ");
diff --git a/1475/CH1/EX1.41/Output_1_41.PNG b/1475/CH1/EX1.41/Output_1_41.PNG Binary files differnew file mode 100755 index 000000000..73f998ae0 --- /dev/null +++ b/1475/CH1/EX1.41/Output_1_41.PNG diff --git a/1475/CH1/EX1.42/Example_1_42.sce b/1475/CH1/EX1.42/Example_1_42.sce new file mode 100755 index 000000000..5f64e5715 --- /dev/null +++ b/1475/CH1/EX1.42/Example_1_42.sce @@ -0,0 +1,13 @@ +// Example 1.42 One urn contains 2 white and 2 black balls;
+clc;
+clear;
+E1=(2/4)*(2/6);
+E2=(2/4)*(4/6);
+disp(E2, "Probab. that balls are of black colour=",E1,"Probab. that balls are of white colour=");
+disp(E1+E2,"The required Probability that they will be of same colour=");
+S=1/2;
+disp(S,"Selection of one urn out of two urn=");
+P1=S*(2/4);
+P2=S*(2/6);
+disp(P1, "Probab. that white ball is selected from urn I=", P2,"Probab. that white ball is selected from urn II");
+disp(P1+P2,"The required Probability that it will be a white colour=");
diff --git a/1475/CH1/EX1.42/Output_1_42.PNG b/1475/CH1/EX1.42/Output_1_42.PNG Binary files differnew file mode 100755 index 000000000..f2efcd240 --- /dev/null +++ b/1475/CH1/EX1.42/Output_1_42.PNG diff --git a/1475/CH1/EX1.43/Example_1_43.sce b/1475/CH1/EX1.43/Example_1_43.sce new file mode 100755 index 000000000..fca86fc2b --- /dev/null +++ b/1475/CH1/EX1.43/Example_1_43.sce @@ -0,0 +1,7 @@ +// Example 1.43 A salesman has a 80 percent chance of making a sale to each customer
+clc;
+clear;
+A= 8/10 ;
+B= 8/10;//
+disp((1-((1-A)*(1-B))),"Probab. that salesman will make a sale is P(A+B)=1-P(~A).P(~B)=",1- B, "P(~B)=",1-A,"P(~A)=");
+//(1-(1-A)*(1-B)),"P(A+B)=1-P(~A).P(~B)="
diff --git a/1475/CH1/EX1.43/Output_1_43.PNG b/1475/CH1/EX1.43/Output_1_43.PNG Binary files differnew file mode 100755 index 000000000..18c63591f --- /dev/null +++ b/1475/CH1/EX1.43/Output_1_43.PNG diff --git a/1475/CH1/EX1.44/Example_1_44.sce b/1475/CH1/EX1.44/Example_1_44.sce new file mode 100755 index 000000000..7499e8497 --- /dev/null +++ b/1475/CH1/EX1.44/Example_1_44.sce @@ -0,0 +1,8 @@ +// Example 1.44 There is 50 50 chance that a contractor's firm A will bid for construction.
+clc;
+clear;
+A=1/2;
+E=3/4;
+F=1/3;
+disp(F,"Probab. that firm B will get the job if firm A submits a bid is only = ",E, "Probab. that firm B will submit a bid and get the job provided firm A does not bid is = ",A, "Probab. that firm A submits the bid =");
+disp(A*F+(1-A)*E,"Probab. that firm B will get the job=");
diff --git a/1475/CH1/EX1.44/Output_1_44.PNG b/1475/CH1/EX1.44/Output_1_44.PNG Binary files differnew file mode 100755 index 000000000..f1d1f50cd --- /dev/null +++ b/1475/CH1/EX1.44/Output_1_44.PNG 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 Binary files differnew file mode 100755 index 000000000..ed930a8fc --- /dev/null +++ b/1475/CH1/EX1.45/Output_1_45.PNG diff --git a/1475/CH1/EX1.47/Example_1_47.sce b/1475/CH1/EX1.47/Example_1_47.sce new file mode 100755 index 000000000..edc108db7 --- /dev/null +++ b/1475/CH1/EX1.47/Example_1_47.sce @@ -0,0 +1,11 @@ +//Example 1.47 A bag contains 8 white and 6 black balls
+clc;
+clear;
+N=factorial(14)/(factorial(9)*factorial(5));
+disp(N,"total no. of possible ways to draw 5 balls out of 14 is 14_C_5 =");
+M1= (factorial(8)/(factorial(3)*factorial(5)));
+disp(M1,"A group of 3 white balls can be drawn out of 8 in 8_C_3 ways=");
+M2=(factorial(6)/(factorial(2)*factorial(4)));
+disp(M2,"A group of 2 black balls can be drawn out of 6 in 6_C_2 ways=");
+P=(M1*M2)/N;
+disp(P," The required Probability such that 3 white and 2 black balls are selected = ");
diff --git a/1475/CH1/EX1.47/Output_1_47.PNG b/1475/CH1/EX1.47/Output_1_47.PNG Binary files differnew file mode 100755 index 000000000..3a85b129c --- /dev/null +++ b/1475/CH1/EX1.47/Output_1_47.PNG diff --git a/1475/CH1/EX1.48/Example_1_48.sce b/1475/CH1/EX1.48/Example_1_48.sce new file mode 100755 index 000000000..82e272d6b --- /dev/null +++ b/1475/CH1/EX1.48/Example_1_48.sce @@ -0,0 +1,7 @@ +// Example 1.48 Five men in a compan of 20 are graduated
+clc;
+clear;
+N=factorial(20)/(factorial(3)*factorial(17));
+M1=(factorial(5)/(factorial(2)*factorial(3)))*(factorial(15)/(factorial(0)*factorial(15)));
+M2=(factorial(5)/(factorial(0)*factorial(5)))*(factorial(15)/(factorial(3)*factorial(12)));
+disp(1-(M2/N),"Probab. taht atleast one is graduate =",M1/N,"Probab. that all 3 are graduate =",M2,"No. of ways to select 3 men such that no one is Graduate=",M1,"No. of ways to select 3 men such that they are Graduate=",N,"No. of ways of selecting =");
diff --git a/1475/CH1/EX1.48/Output_1_48.PNG b/1475/CH1/EX1.48/Output_1_48.PNG Binary files differnew file mode 100755 index 000000000..e042ce1e1 --- /dev/null +++ b/1475/CH1/EX1.48/Output_1_48.PNG diff --git a/1475/CH1/EX1.49/Example_1_49.sce b/1475/CH1/EX1.49/Example_1_49.sce new file mode 100755 index 000000000..eaa17c13e --- /dev/null +++ b/1475/CH1/EX1.49/Example_1_49.sce @@ -0,0 +1,8 @@ +// Example 1.49 A bag contains 8 red and 5 white balls.
+clc;
+clear;
+N1=(factorial(13)/(factorial(10)*factorial(3)));
+M1=(factorial(8)/(factorial(0)*factorial(8)))*(factorial(5)/(factorial(2)*factorial(3)));
+N2=(factorial(10)/(factorial(7)*factorial(3)));
+M2=(factorial(8)/(factorial(5)*factorial(3)))*(factorial(2)/(factorial(0)*factorial(2)));
+disp((M1/N1)*(M2/N2),"Probability that first drawing will give 3 white balls and the second 3 red balls=",M2, "No. of ways to select 3 red balls from remaining 8 red and 2 white balls=",N2,"No . of ways of selecting 3 balls of remaining 10 balls =",M1, "No. of ways to select 3 white balls from 8 red and 5 white balls=",N1,"No . of ways of selecting 3 balls of remaining 13 balls =");
diff --git a/1475/CH1/EX1.49/Output_1_49.PNG b/1475/CH1/EX1.49/Output_1_49.PNG Binary files differnew file mode 100755 index 000000000..ac3c5f0ab --- /dev/null +++ b/1475/CH1/EX1.49/Output_1_49.PNG diff --git a/1475/CH1/EX1.50/Example_1_50.sce b/1475/CH1/EX1.50/Example_1_50.sce new file mode 100755 index 000000000..16377dd65 --- /dev/null +++ b/1475/CH1/EX1.50/Example_1_50.sce @@ -0,0 +1,6 @@ +// Example 1.50 Four cards are drawn from a full pack
+clc;
+clear;
+N1=(factorial(52)/(factorial(48)*factorial(4)));
+M1=(factorial(13)/(factorial(1)*factorial(12)))^4;
+disp((M1/N1),"Probability that four cards are of different suits =",M1, "No. of ways in which 4 cards of different suits can be drawn from a pack =",N1,"No . of ways of selecting 4 cards out of a pack of 52 cards =");
diff --git a/1475/CH1/EX1.50/Output_1_50.PNG b/1475/CH1/EX1.50/Output_1_50.PNG Binary files differnew file mode 100755 index 000000000..c276c6e09 --- /dev/null +++ b/1475/CH1/EX1.50/Output_1_50.PNG diff --git a/1475/CH1/EX1.52/Example_1_52.sce b/1475/CH1/EX1.52/Example_1_52.sce new file mode 100755 index 000000000..62d7e8a17 --- /dev/null +++ b/1475/CH1/EX1.52/Example_1_52.sce @@ -0,0 +1,13 @@ +// Example 1.52 A coin is tossed 10 times
+clc;
+clear;
+function result= binomial(n, k, p)
+ result = factorial(n)*(p^k)*((1-p)^(n-k))/(factorial(k)*factorial(n-k))
+endfunction
+n=10;
+k1=6;
+k2=9;
+p=1/2;
+prob1=binomial(n , k1 , p);
+prob2=binomial(n , k2 , p);
+disp(prob2," Probability of getting exactly 9 heads and 1 tail=",prob1, " Probability of getting exactly 6 heads=",p,"Probability of success=",n,"No. of time a coin is tossed=");
diff --git a/1475/CH1/EX1.52/Output_1_52.PNG b/1475/CH1/EX1.52/Output_1_52.PNG Binary files differnew file mode 100755 index 000000000..bef4449f6 --- /dev/null +++ b/1475/CH1/EX1.52/Output_1_52.PNG diff --git a/1475/CH1/EX1.53/Example_1_53.sce b/1475/CH1/EX1.53/Example_1_53.sce new file mode 100755 index 000000000..d1f8ed71b --- /dev/null +++ b/1475/CH1/EX1.53/Example_1_53.sce @@ -0,0 +1,13 @@ +// Example 1.53 The probabibility that an entering college student
+clc;
+clear;
+function result= binomial(n, k, p)
+ result = factorial(n)*(p^k)*((1-p)^(n-k))/(factorial(k)*factorial(n-k))
+endfunction
+n=5;
+k1=0;
+k2=1;
+p=0.4;
+prob1=binomial(n , k1 , p);
+prob2=binomial(n , k2 , p);
+disp(1-prob1,"Probability that atleast one is graduate",prob2," Probability that one is graduate =",prob1, " Probability that none is a graduate=",p,"Probability that student will be graduate =",n,"No. of student entering the college =");
diff --git a/1475/CH1/EX1.53/Output_1_53.PNG b/1475/CH1/EX1.53/Output_1_53.PNG Binary files differnew file mode 100755 index 000000000..0912759e3 --- /dev/null +++ b/1475/CH1/EX1.53/Output_1_53.PNG diff --git a/1475/CH1/EX1.54/Example_1_54.sce b/1475/CH1/EX1.54/Example_1_54.sce new file mode 100755 index 000000000..d577465e2 --- /dev/null +++ b/1475/CH1/EX1.54/Example_1_54.sce @@ -0,0 +1,13 @@ +// Example 1.54 A machine produces on the average 2 per cent defectives
+clc;
+clear;
+function result= binomial(n, k, p)
+ result = factorial(n)*(p^k)*((1-p)^(n-k))/(factorial(k)*factorial(n-k))
+endfunction
+n=4;
+k1=0;
+k2=1;
+p=0.02;
+prob1=binomial(n , k1 , p);
+prob2=binomial(n , k2 , p);
+disp(1-(prob1+prob2),"Probability that atleast 2 defective articles ",prob2," Probability that there is exactly one success in 4 trial =",prob1, " Probability that there is exactly 0 success in 4 trial=",p,"Probability that article is defective =",n,"No. of articles chosen randomly =");
diff --git a/1475/CH1/EX1.54/Output_1_54.PNG b/1475/CH1/EX1.54/Output_1_54.PNG Binary files differnew file mode 100755 index 000000000..655bd6c33 --- /dev/null +++ b/1475/CH1/EX1.54/Output_1_54.PNG diff --git a/1475/CH1/EX1.55/Example_1_55.sce b/1475/CH1/EX1.55/Example_1_55.sce new file mode 100755 index 000000000..93d557492 --- /dev/null +++ b/1475/CH1/EX1.55/Example_1_55.sce @@ -0,0 +1,8 @@ +// 1.55 Two boxes contain respectively 4 white and 2 black
+clc;
+clear;
+B1=(4/6);
+B2=(2/6);
+C= (3/5);
+D= (4/5);
+disp((B1*C)/((B1*C)+(B2*D)),"Using Bayes formula, Probability that transfered ball is white P(B1/A)=",D,"Probability that the ball drawn from the 2nd box is black, assuming that the transfered ball was black P(A/B2)=",C,"Probability that the ball drawn from the 2nd box is black, assuming that the transfered ball was white P(A/B1)=",B2,"Probability that the transfered ball was black P(B2)=",B1,"Probability that the transfered ball was white P(B1)=");
diff --git a/1475/CH1/EX1.55/Output_1_55.PNG b/1475/CH1/EX1.55/Output_1_55.PNG Binary files differnew file mode 100755 index 000000000..2ccd266a6 --- /dev/null +++ b/1475/CH1/EX1.55/Output_1_55.PNG diff --git a/1475/CH1/EX1.56/Example_1_56.sce b/1475/CH1/EX1.56/Example_1_56.sce new file mode 100755 index 000000000..a06ca04bc --- /dev/null +++ b/1475/CH1/EX1.56/Example_1_56.sce @@ -0,0 +1,8 @@ +// 1.56 Three identical boxes I II III
+clc;
+clear;
+B=(1/3);
+C= (4/7);
+D= (3/10);
+E= (2/5);
+disp((B*D)/((B*C)+(B*D)+(B*E)),"Using Bayes formula, Probability that box II was selected and ball was white P(B2/A)=",E,"Probability of getting a white ball, assuming that Box III was selected P(A/B3) ",D,"Probability of getting a white ball, assuming that Box II was selected P(A/B2)=",C,"Probability of getting a white ball, assuming that Box I was selected P(A/B1)=",B,"Probability of choosing a box out 3 is P(B1)=P(B2)= P(B3)=");
diff --git a/1475/CH1/EX1.56/Output_1_56.PNG b/1475/CH1/EX1.56/Output_1_56.PNG Binary files differnew file mode 100755 index 000000000..76ab182e7 --- /dev/null +++ b/1475/CH1/EX1.56/Output_1_56.PNG diff --git a/1475/CH1/EX1.57/Example_1_57.sce b/1475/CH1/EX1.57/Example_1_57.sce new file mode 100755 index 000000000..51125eb3b --- /dev/null +++ b/1475/CH1/EX1.57/Example_1_57.sce @@ -0,0 +1,12 @@ +// 1.57 In a bolt factory the machines
+clc;
+clear;
+B1=(25/100);
+B2=(35/100);
+B3=(40/100);
+C= (5/100);
+D= (4/100);
+E= (2/100);
+disp(B3,"Probability of choosing a bolt from Machine M3=",B2,"Probability of choosing a bolt from Machine M2=",B1,"Probability of choosing a bolt from Machine M1=")
+disp((B3*D)/((B1*C)+(B2*D)+(B3*E)),"Using Bayes formula, Probability that a defective bolt was manufactured by machine M3 P(B3/A)=",E,"Probability that a bolt is defective, if it comes from machine M3 P(A/B3)=",D,"Probability that a bolt is defective, if it comes from machine M2 P(A/B2)=",C,"Probability that a bolt is defective, if it comes from machine M1 P(A/B1)=");
+// Answer in Book is misprinted.
diff --git a/1475/CH1/EX1.57/Output_1_57.PNG b/1475/CH1/EX1.57/Output_1_57.PNG Binary files differnew file mode 100755 index 000000000..b5a8f4aab --- /dev/null +++ b/1475/CH1/EX1.57/Output_1_57.PNG diff --git a/1475/CH1/EX1.58/Example_1_58.sce b/1475/CH1/EX1.58/Example_1_58.sce new file mode 100755 index 000000000..af3cb005b --- /dev/null +++ b/1475/CH1/EX1.58/Example_1_58.sce @@ -0,0 +1,9 @@ +// Example 1.58 An unbiased die is thrown
+clc;
+clear;
+p=1/6;
+Ex=p*(1+2+3+4+5+6);
+Ey=p*(1+2+3+4+5+6);
+Ez=p*(1+2+3+4+5+6);
+Ew=p*(1+2+3+4+5+6);
+disp(Ex+Ey+Ez+Ew,"Mathematical expectation of the sum is the sum of mathematical expectations for 4 dice respectively (Es)=",Ex,"Mathematical Expectation of the number of points (Ex)=",p,"Variable x can take any of the values with probability (p)= ");
diff --git a/1475/CH1/EX1.58/Output_1_58.PNG b/1475/CH1/EX1.58/Output_1_58.PNG Binary files differnew file mode 100755 index 000000000..bab98234d --- /dev/null +++ b/1475/CH1/EX1.58/Output_1_58.PNG diff --git a/1475/CH1/EX1.59/Example_1_59.sce b/1475/CH1/EX1.59/Example_1_59.sce new file mode 100755 index 000000000..ce6d9256f --- /dev/null +++ b/1475/CH1/EX1.59/Example_1_59.sce @@ -0,0 +1,8 @@ +// Example 1.59 A box contains 4 white 6 black balls
+clc;
+clear;
+A0=((factorial(4)/(factorial(0)*factorial(4)))*(factorial(6)/(factorial(3)*factorial(3))))/(factorial(10)/(factorial(7)*factorial(3)));
+A1=((factorial(4)/(factorial(1)*factorial(3)))*(factorial(6)/(factorial(2)*factorial(4))))/(factorial(10)/(factorial(7)*factorial(3)));
+A2=((factorial(4)/(factorial(2)*factorial(2)))*(factorial(6)/(factorial(1)*factorial(5))))/(factorial(10)/(factorial(7)*factorial(3)));
+A3=((factorial(4)/(factorial(3)*factorial(1)))*(factorial(6)/(factorial(0)*factorial(6))))/(factorial(10)/(factorial(7)*factorial(3)));
+disp(A0*0+A1*1+A2*2+A3*3,"The mathematical expectation of the number of white balls",A0,"Probab. of 0 white balls",A1,"Probab. of 1 white balls",A2,"Probab. of 2 white balls",A3,"Probab. of 3 white balls",3,"X3=",2,"X2=",1,"X1=",0,"X0=","The possible values of x ");
diff --git a/1475/CH1/EX1.59/Output_1_59_1.PNG b/1475/CH1/EX1.59/Output_1_59_1.PNG Binary files differnew file mode 100755 index 000000000..f5eada40c --- /dev/null +++ b/1475/CH1/EX1.59/Output_1_59_1.PNG diff --git a/1475/CH1/EX1.59/Output_1_59_2.PNG b/1475/CH1/EX1.59/Output_1_59_2.PNG Binary files differnew file mode 100755 index 000000000..17af1c26f --- /dev/null +++ b/1475/CH1/EX1.59/Output_1_59_2.PNG diff --git a/1475/CH1/EX1.60/Example_1_60.sce b/1475/CH1/EX1.60/Example_1_60.sce new file mode 100755 index 000000000..0604c92b5 --- /dev/null +++ b/1475/CH1/EX1.60/Example_1_60.sce @@ -0,0 +1,5 @@ +//Example 1.60 A man purchases a lottery ticket, in which he win
+clc;
+clear;
+disp(1-(0.0001+0.0004),"Probab. that man does not get any prize=",0.0004,"Probab. that ma wins second prize of Rs 4000=",0.0001,"Probab. that man wins first prize of Rs 10,000=");
+disp((0.0001*10000+0.0004*4000+0.9995*0),"The Mathematical Expectation is (0.0001*10000+0.0004*4000+0.9995*0)=");
diff --git a/1475/CH1/EX1.60/Output_1_60.PNG b/1475/CH1/EX1.60/Output_1_60.PNG Binary files differnew file mode 100755 index 000000000..e5cbb2186 --- /dev/null +++ b/1475/CH1/EX1.60/Output_1_60.PNG diff --git a/1475/CH1/EX1.61/Example_1_61.sce b/1475/CH1/EX1.61/Example_1_61.sce new file mode 100755 index 000000000..61410a1b9 --- /dev/null +++ b/1475/CH1/EX1.61/Example_1_61.sce @@ -0,0 +1,6 @@ +// Example 1.61 Two dice with faces numbered 1 to 6
+clc;
+clear;
+disp(2,"For a score of less than 12 thrower will pay Rs = ",40,"For a score of 12 thrower is given Rs=");
+disp(35/36,"Probab. of getting a score less than 12 =",1/36,"Probab. of getting a total of 12 eith two dice");
+disp("thrower is expected to loose the above amount",(1/36)*40+(35/36)*(-2),"Expectation per throw =");
diff --git a/1475/CH1/EX1.61/Output_1_61.PNG b/1475/CH1/EX1.61/Output_1_61.PNG Binary files differnew file mode 100755 index 000000000..d1019c8d2 --- /dev/null +++ b/1475/CH1/EX1.61/Output_1_61.PNG diff --git a/1475/CH1/EX1.62/Example_1_62.sce b/1475/CH1/EX1.62/Example_1_62.sce new file mode 100755 index 000000000..ec6e1aae2 --- /dev/null +++ b/1475/CH1/EX1.62/Example_1_62.sce @@ -0,0 +1,6 @@ +// Example 1.62 A man tosses a coin twice
+clc;
+clear;
+disp(1/4,"Probab. of getting 2 tails in 2 throws",1/2,"Probab. of getting 1 head and 1 tail in 2 throws",1/4,"Probab. of getting 2 heads in 2 throw");
+disp(1,"If coin turns tail man will pay Rs =",2,"If coin turns head man will get Rs =");
+disp(4.5,"Variance =",(1/4)*2*2+(1/2)*((1*2)+(1*(-1)))+(1/4)*2*(-1),"Expected gain is (1/4)*2*2+(1/2)*(1*2)+(1*(-1))+(1/4)*2*(-1) =");
diff --git a/1475/CH1/EX1.62/Output_1_62.PNG b/1475/CH1/EX1.62/Output_1_62.PNG Binary files differnew file mode 100755 index 000000000..e7fa9988a --- /dev/null +++ b/1475/CH1/EX1.62/Output_1_62.PNG diff --git a/1475/CH1/EX1.63/Example_1_63.sce b/1475/CH1/EX1.63/Example_1_63.sce new file mode 100755 index 000000000..9270e2e63 --- /dev/null +++ b/1475/CH1/EX1.63/Example_1_63.sce @@ -0,0 +1,7 @@ +// Example 1.63 A man has the choice of running either a hot snack stall
+clc;
+clear;
+disp(0.6,"Probab. of cool summer",0.4,"Probab. of hot summer");
+disp(5000,"Gain from Hot snack stall if weather is cool",1000, "Gain from Hot snack Stall if weather is hot ");
+disp(1000,"Gain from Ice cream if weather is cool",6500, "Gain from Ice cream Stall if weather is hot ");
+disp((0.4*6500)+(0.6*1000),"Expected gain from ice cream stall",(0.4*1000)+(0.6*5000),"Expected gain from hot snack stall");
diff --git a/1475/CH1/EX1.63/Output_1_63.PNG b/1475/CH1/EX1.63/Output_1_63.PNG Binary files differnew file mode 100755 index 000000000..23144108e --- /dev/null +++ b/1475/CH1/EX1.63/Output_1_63.PNG diff --git a/1475/CH1/EX1.66/Example_1_66.sce b/1475/CH1/EX1.66/Example_1_66.sce new file mode 100755 index 000000000..6eef6c28a --- /dev/null +++ b/1475/CH1/EX1.66/Example_1_66.sce @@ -0,0 +1,6 @@ +// Example 1.66 1000 patients sufferring from disease
+clc;
+clear;
+disp(880/1000,"Relative Frequency of cure in first batch is 880/1000 =", 880,"No. of patient cured in first batch out of 1000=");
+disp((880+1300)/(1000+1500),"Relative Frequency of cure in combined group is (880+1300)/(1000+1500)= ", 1300,"No. of patient cured in second batch out of 1500=");
+disp((880+1300+450)/(1000+1500+500),"Relative Frequency of cure in combined group is (880+1300+450)/(1000+1500+500) =", 450,"No. of patient cured in third batch out of 500=");
diff --git a/1475/CH1/EX1.66/Output_1_66.PNG b/1475/CH1/EX1.66/Output_1_66.PNG Binary files differnew file mode 100755 index 000000000..430105c0b --- /dev/null +++ b/1475/CH1/EX1.66/Output_1_66.PNG diff --git a/1475/CH1/EX1.67/Example_1_67.sce b/1475/CH1/EX1.67/Example_1_67.sce new file mode 100755 index 000000000..875f77bc6 --- /dev/null +++ b/1475/CH1/EX1.67/Example_1_67.sce @@ -0,0 +1,5 @@ +// Example 1.67 There are 3 children in a family
+clc;
+clear;
+disp(8,"No.of sample points and sample space of 3 children in a family ");
+disp(4/8,"Probab. that there is not more than one girl (BBB,BBG,BGB,GBB)",3/8,"Probab. that there are exactly 2 girls (BGG,GBG,GGB)");
diff --git a/1475/CH1/EX1.67/Output_1_67.PNG b/1475/CH1/EX1.67/Output_1_67.PNG Binary files differnew file mode 100755 index 000000000..8f17217da --- /dev/null +++ b/1475/CH1/EX1.67/Output_1_67.PNG diff --git a/1475/CH1/EX1.68/Example_1_68.sce b/1475/CH1/EX1.68/Example_1_68.sce new file mode 100755 index 000000000..cb06fa3ea --- /dev/null +++ b/1475/CH1/EX1.68/Example_1_68.sce @@ -0,0 +1,5 @@ +// Example 1.68 Two urns marked I and II
+clc;
+clear;
+disp(30,"No.of sample points and sample space of ordered pair of balls from two Urn = ");
+disp(6/30,"Probab. that both the ball drawn are white is =",6,"Total favourable cases are (1,6),(1,7),(2,6),(2,7),(3,6),(3,7) is");
diff --git a/1475/CH1/EX1.68/Output_1_68.PNG b/1475/CH1/EX1.68/Output_1_68.PNG Binary files differnew file mode 100755 index 000000000..e664a7507 --- /dev/null +++ b/1475/CH1/EX1.68/Output_1_68.PNG diff --git a/1475/CH1/EX1.69/Example_1_69.sce b/1475/CH1/EX1.69/Example_1_69.sce new file mode 100755 index 000000000..cbbc4b361 --- /dev/null +++ b/1475/CH1/EX1.69/Example_1_69.sce @@ -0,0 +1,10 @@ +// Example 1.69 There are 3 childen in a family
+clc;
+clear;
+A=1;
+C=2;
+D=4;
+S=8;
+disp(D/S,"Probab. that at least 2 of the children are boys P(D)",C/S,"Probab. that eldest two are boys P(D)",A/S,"Probab. of all are boys P(A)",S, "total No. of samples ");
+disp((A/S)/(D/S),"Probab. that all children are boys, given that at least 2 of them are boys P(A/D)=",(A/S)/(C/S),"Probab. that all children are boys, given that the two eldest are boys P(A/C)=");
+
diff --git a/1475/CH1/EX1.69/Output_1_69.PNG b/1475/CH1/EX1.69/Output_1_69.PNG Binary files differnew file mode 100755 index 000000000..4995bea9b --- /dev/null +++ b/1475/CH1/EX1.69/Output_1_69.PNG diff --git a/1475/CH2/EX2.10/Example_2_10.sce b/1475/CH2/EX2.10/Example_2_10.sce new file mode 100755 index 000000000..104de24ed --- /dev/null +++ b/1475/CH2/EX2.10/Example_2_10.sce @@ -0,0 +1,14 @@ +//Example 2.10 the overall percentage of failure
+clc;
+clear;
+function value = binomial(n, k, p)
+value = factorial(n)*(p^k)*((1-p)^(n-k))/(factorial(k)*factorial(n-k));
+endfunction
+q=40/100;
+n=6;
+p=1-q;
+disp(n,"No. of candidates =",p,"Proabab. of(success) in a single trial",q,"Probab. of failure of a candidate");
+P_4=binomial(n,4,p);
+P_5=binomial(n,5,p);
+P_6=binomial(n,6,p);
+disp(P_4+P_5+P_6,"Required Probability =");
diff --git a/1475/CH2/EX2.10/Output_2_10.PNG b/1475/CH2/EX2.10/Output_2_10.PNG Binary files differnew file mode 100755 index 000000000..fa01d0f46 --- /dev/null +++ b/1475/CH2/EX2.10/Output_2_10.PNG diff --git a/1475/CH2/EX2.13/Example_2_13.sce b/1475/CH2/EX2.13/Example_2_13.sce new file mode 100755 index 000000000..755a224df --- /dev/null +++ b/1475/CH2/EX2.13/Example_2_13.sce @@ -0,0 +1,8 @@ +// Example 2.13 Arithmetic mean and standard deviation of a binomial distribution
+clc;
+clear;
+np=4;
+npq=8/3;
+q=npq/np;
+p=1-q;
+disp(q,"Value of q",p,"Value of p");
diff --git a/1475/CH2/EX2.13/Output_2_13.PNG b/1475/CH2/EX2.13/Output_2_13.PNG Binary files differnew file mode 100755 index 000000000..475f762ae --- /dev/null +++ b/1475/CH2/EX2.13/Output_2_13.PNG diff --git a/1475/CH2/EX2.15/Example_2_15.sce b/1475/CH2/EX2.15/Example_2_15.sce new file mode 100755 index 000000000..d4f84ca14 --- /dev/null +++ b/1475/CH2/EX2.15/Example_2_15.sce @@ -0,0 +1,19 @@ +// Example 2.15 A random variable x follow Poisson distribution
+clc;
+clear;
+m=3;
+disp(m,"Parameter =");
+function value = poisson(m, x)
+value = (exp(-m)*(m^x))/(factorial(x));
+endfunction
+X_0=poisson(m,0);
+X_1=poisson(m,1);
+X_2=poisson(m,2);
+X_3=poisson(m,3);
+
+disp(X_0,"Probability when x=0 is ");
+disp(X_1,"Probability when x=1 is ");
+disp(X_2,"Probability when x=2 is ");
+disp(X_3,"Probability when x=3 is ");
+disp(X_0+X_1+X_2,"Probability when the variable assumes the value less than 3 is ");
+disp(1-(X_0+X_1),"Probability when the variable assumes the value at least 2 is ");
diff --git a/1475/CH2/EX2.15/Output_2_15.PNG b/1475/CH2/EX2.15/Output_2_15.PNG Binary files differnew file mode 100755 index 000000000..88dd40f5d --- /dev/null +++ b/1475/CH2/EX2.15/Output_2_15.PNG diff --git a/1475/CH2/EX2.16/Example_2_16.sce b/1475/CH2/EX2.16/Example_2_16.sce new file mode 100755 index 000000000..a1256075c --- /dev/null +++ b/1475/CH2/EX2.16/Example_2_16.sce @@ -0,0 +1,12 @@ +// Example 2.16 A business firm receives on an average
+clc;
+clear;
+m=2.5;
+disp(m,"Average call =");
+function value = poisson(m, x)
+value = (exp(-m)*(m^x))/(factorial(x));
+endfunction
+X_0=poisson(m,0);
+X_4=poisson(m,4);
+disp(X_0,"Probability of no call is ");
+disp(X_4,"Probability of exactly 4 call is ");
diff --git a/1475/CH2/EX2.16/Output_2_16.PNG b/1475/CH2/EX2.16/Output_2_16.PNG Binary files differnew file mode 100755 index 000000000..c1e497003 --- /dev/null +++ b/1475/CH2/EX2.16/Output_2_16.PNG diff --git a/1475/CH2/EX2.2/Example_2_2.sce b/1475/CH2/EX2.2/Example_2_2.sce new file mode 100755 index 000000000..74c0f2102 --- /dev/null +++ b/1475/CH2/EX2.2/Example_2_2.sce @@ -0,0 +1,10 @@ +// Example 2.2 A random variable has the following proabability distribution
+clc;
+clear;
+x=[4 5 6 8];
+Probab=[0.1 0.3 0.4 0.2];
+disp(sum(x .* Probab),"Mean =");
+disp(sum((x .^2) .* Probab), "Expectation =");
+disp(sum((x .^2) .* Probab)-(sum(x .* Probab)^2), "Variance =");
+disp(sqrt(sum((x .^2) .* Probab)-(sum(x .* Probab)^2)),"Standard Deviation = ");
+
diff --git a/1475/CH2/EX2.2/Output_2_2.PNG b/1475/CH2/EX2.2/Output_2_2.PNG Binary files differnew file mode 100755 index 000000000..5852f2c7e --- /dev/null +++ b/1475/CH2/EX2.2/Output_2_2.PNG diff --git a/1475/CH2/EX2.20/Example_2_20.sce b/1475/CH2/EX2.20/Example_2_20.sce new file mode 100755 index 000000000..a827bc628 --- /dev/null +++ b/1475/CH2/EX2.20/Example_2_20.sce @@ -0,0 +1,11 @@ +// Example 2.20 In turning out certain toys
+clc;
+clear;
+n=10;
+p=0.1;
+m=n*p;
+function value = poisson(m, x)
+value = (exp(-m)*(m^x))/(factorial(x));
+endfunction
+X_3=poisson(m,3);
+disp(X_3,"Probability of 3 defective in the sample is ",);
diff --git a/1475/CH2/EX2.20/Output_2_20.PNG b/1475/CH2/EX2.20/Output_2_20.PNG Binary files differnew file mode 100755 index 000000000..05a1ed353 --- /dev/null +++ b/1475/CH2/EX2.20/Output_2_20.PNG diff --git a/1475/CH2/EX2.21/Example_2_21.sce b/1475/CH2/EX2.21/Example_2_21.sce new file mode 100755 index 000000000..ffaa2ac73 --- /dev/null +++ b/1475/CH2/EX2.21/Example_2_21.sce @@ -0,0 +1,14 @@ +// Example 2.21 2 percent of items made by a machine are defective
+clc;
+clear;
+n=100;
+p=2/100;
+m=n*p;
+disp(m,"Mean is n*p =",p,"probab. of defective items",n,"Total sample of item");
+function value = poisson(m, x)
+value = (exp(-m)*(m^x))/(factorial(x));
+endfunction
+X_0=poisson(m,0);
+X_1=poisson(m,1);
+X_2=poisson(m,2);
+disp(1-(X_0 + X_1 + X_2),"Probability of 3 or more defective in the sample is ",);
diff --git a/1475/CH2/EX2.21/Output_2_21.PNG b/1475/CH2/EX2.21/Output_2_21.PNG Binary files differnew file mode 100755 index 000000000..49bdfac13 --- /dev/null +++ b/1475/CH2/EX2.21/Output_2_21.PNG diff --git a/1475/CH2/EX2.22/Example_2_22.sce b/1475/CH2/EX2.22/Example_2_22.sce new file mode 100755 index 000000000..db8410d0a --- /dev/null +++ b/1475/CH2/EX2.22/Example_2_22.sce @@ -0,0 +1,20 @@ +// Example 2.22 Two defective tube lights are mixed
+clc;
+clear;
+n=3;
+N=10;
+p=2/10;
+m=n*p;
+q=1-p;
+var=n*p*q;
+S_d=sqrt(var);
+Np=N*p;
+Nq=N*q;
+disp(S_d,"Standard Deviation",var,"Variance",m,"Mean is n*p =",p,"probab. of defective items",N,"Total sample of item");
+function value = hyper(Np,Nq,N,n, x)
+value = (factorial(Np)*factorial(Nq)*factorial(N-n)*factorial(n))/(factorial(Np-x)*factorial(x)*factorial(n-x)*factorial(Nq-(n-x))*factorial(N));
+endfunction
+f_0=hyper(Np,Nq,N,n,0);
+f_1=hyper(Np,Nq,N,n,1);
+f_2=hyper(Np,Nq,N,n,2);
+disp(f_0,"Probability of 0 defective tube light in the sample of 3 is ",f_1,"Probability of 1 defective tube light in the sample of 3 is ",f_2,"Probability of 2 defective tube light in the sample of 3 is ",);
diff --git a/1475/CH2/EX2.22/Output_2_22.PNG b/1475/CH2/EX2.22/Output_2_22.PNG Binary files differnew file mode 100755 index 000000000..87b8a240c --- /dev/null +++ b/1475/CH2/EX2.22/Output_2_22.PNG diff --git a/1475/CH2/EX2.23/Example_2_23.sce b/1475/CH2/EX2.23/Example_2_23.sce new file mode 100755 index 000000000..b7a69841a --- /dev/null +++ b/1475/CH2/EX2.23/Example_2_23.sce @@ -0,0 +1,8 @@ +//Example 2.23 A dice is rolled 6 times
+clc;
+clear;
+p=1/6;
+n=6;
+x=1;
+probab=(factorial(n)*p*p*p*p*p*p)/(factorial(x)*factorial(x)*factorial(x)*factorial(x)*factorial(x)*factorial(x));
+disp(probab,"the required probability",n,"No. of independent trials");
diff --git a/1475/CH2/EX2.23/Output_2_23.PNG b/1475/CH2/EX2.23/Output_2_23.PNG Binary files differnew file mode 100755 index 000000000..48292cad5 --- /dev/null +++ b/1475/CH2/EX2.23/Output_2_23.PNG diff --git a/1475/CH2/EX2.24/Example_2_24.sce b/1475/CH2/EX2.24/Example_2_24.sce new file mode 100755 index 000000000..f9fe4626d --- /dev/null +++ b/1475/CH2/EX2.24/Example_2_24.sce @@ -0,0 +1,11 @@ +//Example 2.24 A box contains 4 white, 3 black and 5 red ball
+clc;
+clear;
+p1=1/3;
+p2=1/6;
+p3=5/12;
+n=6;
+probab1=(factorial(n)*(p1^3)*(p2^1)*(p3^2))/(factorial(3)*factorial(1)*factorial(2));
+probab2=(factorial(n)*(p1^2)*(p2^0)*(p3^4))/(factorial(2)*factorial(0)*factorial(4));
+disp(probab2,"the required probability of 2 are white and 4 are red",probab1,"the required probability of 3 are white , 1 black and 2 red",n,"No. of independent trials");
+
diff --git a/1475/CH2/EX2.24/Output_2_24.PNG b/1475/CH2/EX2.24/Output_2_24.PNG Binary files differnew file mode 100755 index 000000000..bcb99a55d --- /dev/null +++ b/1475/CH2/EX2.24/Output_2_24.PNG diff --git a/1475/CH2/EX2.35/Example_2_35.sce b/1475/CH2/EX2.35/Example_2_35.sce new file mode 100755 index 000000000..efc3959d9 --- /dev/null +++ b/1475/CH2/EX2.35/Example_2_35.sce @@ -0,0 +1,7 @@ +// Example 2.35 If a continuous random variable x follows rectangular distribution
+clc;
+clear;
+disp((4-2.5)/(7-2),"P(2.5<=x<=4) = (4-2.5)/(7-2)=");
+disp((3.4-2)/(7-2),"P(x<=3.4)= (3.4-2)/(7-2)=");
+disp(1-((6-2)/(7-2)),"P(x>6)=1-P(x<=6)= 1-((6-2)/(7-2))=");
+disp(0,"P(x=4.5)=0");
diff --git a/1475/CH2/EX2.35/Output_2_35.PNG b/1475/CH2/EX2.35/Output_2_35.PNG Binary files differnew file mode 100755 index 000000000..e84557514 --- /dev/null +++ b/1475/CH2/EX2.35/Output_2_35.PNG diff --git a/1475/CH2/EX2.36/Example_2_36.sce b/1475/CH2/EX2.36/Example_2_36.sce new file mode 100755 index 000000000..42e11b112 --- /dev/null +++ b/1475/CH2/EX2.36/Example_2_36.sce @@ -0,0 +1,7 @@ +// Example 2.36 The height distribution of a group of 10,000 men
+clc;
+clear;
+disp(4.5,"s.d =",64.5,"Mean =");
+disp("Hence the total no. of men whose height between 55.5 and 69 inch is 82% of 10,000 i.e 82000",(55.5-64.50)/4.5,"and",(69-64.5)/4.5,"Percentage of men whose height lies between 55.5 and 69 inch = Area under standard normal curve between the vertical lines at the corresponding values of ");
+disp("Hence the total no. of men whose height is less than 55.5 is 20% of 10,000 i.e 2000",(55.5-64.50)/4.5,"Percentage of men whose height is less than 55.5 inch = Area under standard normal curve between the vertical lines at the corresponding values of ");
+disp("Hence the total no. of men whose height is more than 73.5 is 20% of 10,000 i.e 2000",(73.5-64.50)/4.5,"Percentage of men whose height is more than 73.5 = Area under standard normal curve between the vertical lines at the corresponding values of ");
diff --git a/1475/CH2/EX2.36/Output_2_36.PNG b/1475/CH2/EX2.36/Output_2_36.PNG Binary files differnew file mode 100755 index 000000000..0f93e3f24 --- /dev/null +++ b/1475/CH2/EX2.36/Output_2_36.PNG diff --git a/1475/CH2/EX2.37/Example_2_37.sce b/1475/CH2/EX2.37/Example_2_37.sce new file mode 100755 index 000000000..31e0399a4 --- /dev/null +++ b/1475/CH2/EX2.37/Example_2_37.sce @@ -0,0 +1,7 @@ +// Example 2.36 The height distribution of a group of 10,000 men
+clc;
+clear;
+disp(15,"s.d =",151,"Mean =");
+disp("Hence the total no. of student whose weight lies between 120 and 155 lbs is 0.5872*500 i.e 294",(120-151)/15,"and",(155-151)/15,"Proportion of student whose weight lies between 120 and 155 lbs = Area under standard normal curve between the vertical lines at the corresponding values of ");
+disp("Hence the total no. of student whose weight is more than 155 lbs is 0.3964*500 i.e 197",(155-151)/15,"Proportion of student whose weight is more than 155 lbs = Area under standard normal curve between the vertical lines at the corresponding values ofis (155-151)/15 ");
+
diff --git a/1475/CH2/EX2.37/Output_2_37.PNG b/1475/CH2/EX2.37/Output_2_37.PNG Binary files differnew file mode 100755 index 000000000..e32723451 --- /dev/null +++ b/1475/CH2/EX2.37/Output_2_37.PNG diff --git a/1475/CH2/EX2.38/Example_2_38.sce b/1475/CH2/EX2.38/Example_2_38.sce new file mode 100755 index 000000000..ef9c79121 --- /dev/null +++ b/1475/CH2/EX2.38/Example_2_38.sce @@ -0,0 +1,7 @@ +// Example 2.38 A sample of 100 dry battery
+clc;
+clear;
+//disp(3,"s.d =",12,"Mean =");
+disp((0.5-0.3413)*100,"Hence percentage of battery cells expected to have life is (0.5-0.3413)*100",(15-12)/3,"Proportion of battery cell with life more than 15 hours= Area under standard normal curve between the vertical lines at the corresponding values of (15-12)/3 = ");
+disp((0.5-0.4772)*100,"Hence percentage of battery cells expected to have life is (0.5-0.4772)*100",(6-12)/3,"Proportion of battery cell with life less than 6 hours= Area under standard normal curve between the vertical lines at the corresponding values of (6-12)/3 = ");
+disp((2*0.2487)*100,"Hence percentage of battery cells expected to have life is (2*0.2487)*100",(10-12)/3,"and",(14-12)/3,"Proportion of battery cell with life between 10 and 14 hours= Area under standard normal curve between the vertical lines at the corresponding values of (10-12)/3 and (14-12)/3= ");
diff --git a/1475/CH2/EX2.38/Output_2_38.PNG b/1475/CH2/EX2.38/Output_2_38.PNG Binary files differnew file mode 100755 index 000000000..02d2bf422 --- /dev/null +++ b/1475/CH2/EX2.38/Output_2_38.PNG diff --git a/1475/CH2/EX2.42/Example_2_42.sce b/1475/CH2/EX2.42/Example_2_42.sce new file mode 100755 index 000000000..d167b1a36 --- /dev/null +++ b/1475/CH2/EX2.42/Example_2_42.sce @@ -0,0 +1,11 @@ +// Example 2.42 A fair coin is tossed 400 times
+clc;
+clear;
+n=400;
+p=1/2;
+q=1-p;
+m=n*p;
+s_d=sqrt(n*p*q);
+disp(2*0.199," = 2*(Area between z= 0 and z= 0.05)",(199.5-m)/s_d,"and",(200.5-m)/s_d,"Probability of obtaining exactly 200 heads = (199.5-m)/s_d and (200.5-m)/s_d =");
+disp(0.5+0.3289," = (Area between left of z= 0 + Area between z=0 and z= 0.95)",(209.5-m)/s_d,"Probability of obtaining less than 210 heads = (209.5-m)/s_d and ");
+disp(2*0.3531," = 2*(Area between z= -1.05 and z= 1.05)",(189.5-m)/s_d,"and",(210.5-m)/s_d,"Probability of obtaining betweeen 190 and 210 heads = (189.5-m)/s_d and (210.5-m)/s_d =");
diff --git a/1475/CH2/EX2.42/Output_2_42.PNG b/1475/CH2/EX2.42/Output_2_42.PNG Binary files differnew file mode 100755 index 000000000..e7a4bc400 --- /dev/null +++ b/1475/CH2/EX2.42/Output_2_42.PNG diff --git a/1475/CH2/EX2.43/Example_2_43.sce b/1475/CH2/EX2.43/Example_2_43.sce new file mode 100755 index 000000000..421cd397d --- /dev/null +++ b/1475/CH2/EX2.43/Example_2_43.sce @@ -0,0 +1,6 @@ +// Example 2.43 A variable x follows Poisson distribution
+clc;
+clear;
+m=16;
+s_d=sqrt(m);
+disp(1-0.8092," = 1-(Area of under standard normal curve )",(19.5-m)/s_d,"P(x>=20 of Poisson Distribution) = (19.5-m)/s_d =");
diff --git a/1475/CH2/EX2.43/Output_2_43.PNG b/1475/CH2/EX2.43/Output_2_43.PNG Binary files differnew file mode 100755 index 000000000..e7c8f07f1 --- /dev/null +++ b/1475/CH2/EX2.43/Output_2_43.PNG diff --git a/1475/CH2/EX2.6/Example_2_6.sce b/1475/CH2/EX2.6/Example_2_6.sce new file mode 100755 index 000000000..fe1ac5d75 --- /dev/null +++ b/1475/CH2/EX2.6/Example_2_6.sce @@ -0,0 +1,5 @@ +// Example 2.6 If a discrete random varaiable x follows
+clc;
+clear;
+disp(0,"Probab. that it takes a value other than the given",1/6,"Probab. that it takes any particular value of the given","Given that it assumes value 8 , 9 , 11 , 15 , 18 , 20 ");
+disp((1/6)*3,"P(|x-14|<5)=",(1/6)*2,"P(x>15)=",(1/6)*4,"P(x<=15) =",(1/6)*3,"P(x<15)=",0,"P(x=12)",1/6,"P(x=9)");
diff --git a/1475/CH2/EX2.6/Output_2_6.PNG b/1475/CH2/EX2.6/Output_2_6.PNG Binary files differnew file mode 100755 index 000000000..39b6f69a2 --- /dev/null +++ b/1475/CH2/EX2.6/Output_2_6.PNG diff --git a/1475/CH2/EX2.8/Example_2_8.sce b/1475/CH2/EX2.8/Example_2_8.sce new file mode 100755 index 000000000..c5356260b --- /dev/null +++ b/1475/CH2/EX2.8/Example_2_8.sce @@ -0,0 +1,14 @@ +// Example 2.8 Three coins are tossed
+clc;
+clear;
+function value = binomial(n, k, p)
+value = factorial(n)*(p^k)*((1-p)^(n-k))/(factorial(k)*factorial(n-k));
+endfunction
+p=1/2;
+n=3;
+disp(n,"No. of independent trials =",p,"Proabab. of success in a single trial");
+P_0=binomial(n,0,p);
+P_1=binomial(n,1,p);
+P_2=binomial(n,2,p);
+P_3=binomial(n,3,p);
+disp(1-(P_0),"Prob. of at least one success",P_2 + P_3,"Prob of more than one success",P_3,"Prob. of 3 success",P_2, "Prob. of 2 success",P_1,"Prob. of 1 success",P_0,"Prob. of 0 success");
diff --git a/1475/CH2/EX2.8/Output_2_8.PNG b/1475/CH2/EX2.8/Output_2_8.PNG Binary files differnew file mode 100755 index 000000000..8a1f89471 --- /dev/null +++ b/1475/CH2/EX2.8/Output_2_8.PNG diff --git a/1475/CH2/EX2.9/Example_2_9.sce b/1475/CH2/EX2.9/Example_2_9.sce new file mode 100755 index 000000000..4b6bc5baa --- /dev/null +++ b/1475/CH2/EX2.9/Example_2_9.sce @@ -0,0 +1,18 @@ +//Example 2.9 Five coins are tossed 3200 times
+clc;
+clear;
+function value = binomial(n, k, p)
+value = factorial(n)*(p^k)*((1-p)^(n-k))/(factorial(k)*factorial(n-k));
+endfunction
+p=1/2;
+n=5;
+q=1/2;
+disp(n,"No. of coins tossed =",p,"Proabab. of getting head (success) in a single trial");
+P_0=binomial(n,0,p);
+P_1=binomial(n,1,p);
+P_2=binomial(n,2,p);
+P_3=binomial(n,3,p);
+P_4=binomial(n,4,p);
+P_5=binomial(n,5,p);
+EF=sum([P_0 P_1 P_2 P_3 P_4 P_5]*3200);
+disp(sqrt(n*p*q),"Standard Deviation =",n*p,"Mean =",EF,"Efective frequency =");
diff --git a/1475/CH2/EX2.9/Output_2_9.PNG b/1475/CH2/EX2.9/Output_2_9.PNG Binary files differnew file mode 100755 index 000000000..cdbdbf2d1 --- /dev/null +++ b/1475/CH2/EX2.9/Output_2_9.PNG diff --git a/1475/CH3/EX3.14/Example_3_14.sce b/1475/CH3/EX3.14/Example_3_14.sce new file mode 100755 index 000000000..10e60c42c --- /dev/null +++ b/1475/CH3/EX3.14/Example_3_14.sce @@ -0,0 +1,8 @@ +//Example 3.14 A A simple random sample of size is 5
+clc;
+clear;
+n=5;
+N=41;
+s_d=6.25;
+disp(s_d,"Standard Deviation",N,"Total Units",n,"Drawn sample of size is ");
+disp((s_d/sqrt(n))*(sqrt((N-n)/(N-1))),"Standard error is " );
diff --git a/1475/CH3/EX3.14/Output_3_14.PNG b/1475/CH3/EX3.14/Output_3_14.PNG Binary files differnew file mode 100755 index 000000000..7e0fc0417 --- /dev/null +++ b/1475/CH3/EX3.14/Output_3_14.PNG diff --git a/1475/CH3/EX3.15/Example_3_15.sce b/1475/CH3/EX3.15/Example_3_15.sce new file mode 100755 index 000000000..f9e2e2c48 --- /dev/null +++ b/1475/CH3/EX3.15/Example_3_15.sce @@ -0,0 +1,9 @@ +//Example 3.15 The safety limit of a crane is known to be 32 tons
+clc;
+clear;
+m=0.3;
+s_d=0.2;
+n=100;
+disp(n,"Sample size =",s_d,"Standard Deviation",m,"Mean");
+disp(s_d/sqrt(n),"and Standard Deviation =",0.3,"Since the sample size n=100 is large, the sample mean follows normal distribution approx. with Mean=");
+disp(0.1587,"Probab. that mean is greater than 0.32=Area under the standard normal curve to the right of the ordinate at z=1",(0.32-m)/0.02,"The standarised value of sample mean 0.32 is ");
diff --git a/1475/CH3/EX3.15/Output_3_15.PNG b/1475/CH3/EX3.15/Output_3_15.PNG Binary files differnew file mode 100755 index 000000000..e4a3d4c5e --- /dev/null +++ b/1475/CH3/EX3.15/Output_3_15.PNG diff --git a/1475/CH3/EX3.16/Example_3_16.sce b/1475/CH3/EX3.16/Example_3_16.sce new file mode 100755 index 000000000..1dd4df31b --- /dev/null +++ b/1475/CH3/EX3.16/Example_3_16.sce @@ -0,0 +1,11 @@ +//Example 3.16 It has been found 2 percent of tools
+clc;
+clear;
+m=0.02;
+p=m;
+q=1-p;
+n=400;
+s_d=sqrt((p*q)/n);
+disp(n,"Sample size =",s_d,"Standard Deviation",m,"Mean");
+disp("Since the sample size n=400 is large, the sample mean follows normal distribution ");
+disp(0.5-0.4236,"Probab. that the sample proportion p exceeds 0.03 = Area under the standard normal curve to the right of the ordinate at z= (0.03-0.02)/0.007",(0.03-0.02)/0.007,"The standarised value of z is ");
diff --git a/1475/CH3/EX3.16/Output_3_16.PNG b/1475/CH3/EX3.16/Output_3_16.PNG Binary files differnew file mode 100755 index 000000000..e72cb65a8 --- /dev/null +++ b/1475/CH3/EX3.16/Output_3_16.PNG diff --git a/1475/CH3/EX3.26/Example_3_26.sce b/1475/CH3/EX3.26/Example_3_26.sce new file mode 100755 index 000000000..521a00ba9 --- /dev/null +++ b/1475/CH3/EX3.26/Example_3_26.sce @@ -0,0 +1,6 @@ +//Example 3.26 The mean of a certain normal distribution is equal to the standard error
+clc;
+clear;
+n=49;
+disp("Mean = S.E in sample size of 25 i.e s_d=5(m)",49,"Total Sample = ");
+disp(1-0.9192,"Probab. of P(x<0), when n=40. Since the population is normal = P(x<0)=");
diff --git a/1475/CH3/EX3.26/Output_3_26.PNG b/1475/CH3/EX3.26/Output_3_26.PNG Binary files differnew file mode 100755 index 000000000..b61454db0 --- /dev/null +++ b/1475/CH3/EX3.26/Output_3_26.PNG diff --git a/1475/CH4/EX4.11/Example_4_11.sce b/1475/CH4/EX4.11/Example_4_11.sce new file mode 100755 index 000000000..d664cc853 --- /dev/null +++ b/1475/CH4/EX4.11/Example_4_11.sce @@ -0,0 +1,9 @@ +//Example 4.11 A sample of 6500 screws is taken from a large consignment and 75 are found to be defective
+clc;
+clear;
+n=600;
+m=75;
+P=m/n;
+Q=1-P;
+SE=sqrt((P*Q)/n);
+disp("percent",(P-3*SE)*100,"to",(P+3*SE)*100,"Limits of P are from ");
diff --git a/1475/CH4/EX4.11/Output_4_11.PNG b/1475/CH4/EX4.11/Output_4_11.PNG Binary files differnew file mode 100755 index 000000000..e04712d18 --- /dev/null +++ b/1475/CH4/EX4.11/Output_4_11.PNG diff --git a/1475/CH4/EX4.12/Example_4_12.sce b/1475/CH4/EX4.12/Example_4_12.sce new file mode 100755 index 000000000..09626da23 --- /dev/null +++ b/1475/CH4/EX4.12/Example_4_12.sce @@ -0,0 +1,9 @@ +// Example 4.12 A random sample of 100 ball bearingd selected from a shipment
+clc;
+clear;
+n=100;
+x=0.354;
+N=2000;
+S=0.048;
+SE=(S/sqrt(n))*sqrt((N-n)/(N-1));
+disp("inch",(x-1.96*SE),"to",(x+1.96*SE),"The 95% confidence limits for the population mean are ",S,"Sample S.D =",N,"Population size N",n,"Sample size");
diff --git a/1475/CH4/EX4.12/Output_4_12.PNG b/1475/CH4/EX4.12/Output_4_12.PNG Binary files differnew file mode 100755 index 000000000..245597785 --- /dev/null +++ b/1475/CH4/EX4.12/Output_4_12.PNG diff --git a/1475/CH4/EX4.13/Example_4_13.sce b/1475/CH4/EX4.13/Example_4_13.sce new file mode 100755 index 000000000..aad958587 --- /dev/null +++ b/1475/CH4/EX4.13/Example_4_13.sce @@ -0,0 +1,11 @@ +//Example 4.13 A random sample of 100 articles taken from alarge batch of article contains 5 defective article
+clc;
+clear;
+n=100;
+p=5/100;
+q=1-p;
+N=2646;
+SE=sqrt((p*q)/n);
+disp((p-2.05*SE),"to",(p+2.05*SE),"The 96% confidence limits for Pare ",N,"Population size N",n,"Sample size");
+S_E=sqrt(p*q/(n))*sqrt((N-n)/(N-1));
+disp((p-1.96*S_E),"to",(p+1.96*S_E),"The required 95% confidence limits for P are ");
diff --git a/1475/CH4/EX4.13/Output_4_13.PNG b/1475/CH4/EX4.13/Output_4_13.PNG Binary files differnew file mode 100755 index 000000000..1c791763d --- /dev/null +++ b/1475/CH4/EX4.13/Output_4_13.PNG diff --git a/1475/CH4/EX4.14/Example_4_14.sce b/1475/CH4/EX4.14/Example_4_14.sce new file mode 100755 index 000000000..5ca5b7612 --- /dev/null +++ b/1475/CH4/EX4.14/Example_4_14.sce @@ -0,0 +1,9 @@ +//Example 4.14 10 life Insurance policies in a sample of 200 taken out of 50,000 were found to be insured for less than Rs 500
+clc;
+clear;
+N=50000;
+n=200;
+p=10/200;
+q=1-p;
+S_E=sqrt(p*q/(n))*sqrt((N-n)/(N-1));
+disp((p-1.96*S_E)*N,"and",(p+1.96*S_E)*N,"The number of each policies lies between ",(p-1.96*S_E),"to",(p+1.96*S_E),"The required 95% confidence limits for population proportion P are ");
diff --git a/1475/CH4/EX4.14/Output_4_14.PNG b/1475/CH4/EX4.14/Output_4_14.PNG Binary files differnew file mode 100755 index 000000000..696f17ed6 --- /dev/null +++ b/1475/CH4/EX4.14/Output_4_14.PNG diff --git a/1475/CH4/EX4.15/Example_4_15.sce b/1475/CH4/EX4.15/Example_4_15.sce new file mode 100755 index 000000000..e1d3e1296 --- /dev/null +++ b/1475/CH4/EX4.15/Example_4_15.sce @@ -0,0 +1,8 @@ +//Example 4.15 A random sample of size 10 was drawn from a normal population with an unknown mean
+clc;
+clear;
+n=10;
+v=44.1;
+x=[65 71 80 76 78 82 68 72 65 81];
+m=sum(x)/n;
+disp("inch",(m-1.96*sqrt(4.41)),"to",(m+1.96*sqrt(4.41)),"The 95% confidence interval ",v,"variance =",m,"Mean =",n,"Sample size");
diff --git a/1475/CH4/EX4.15/Output_4_15.PNG b/1475/CH4/EX4.15/Output_4_15.PNG Binary files differnew file mode 100755 index 000000000..870c7fc7a --- /dev/null +++ b/1475/CH4/EX4.15/Output_4_15.PNG diff --git a/1475/CH4/EX4.16/Example_4_16.sce b/1475/CH4/EX4.16/Example_4_16.sce new file mode 100755 index 000000000..683f52859 --- /dev/null +++ b/1475/CH4/EX4.16/Example_4_16.sce @@ -0,0 +1,8 @@ +//Example 4.16 A random sample of 10 students of class II was selected from schools in a certain region
+clc;
+clear;
+x=[38 46 45 40 35 39 44 45 33 37];
+n=10;
+m=sum(x)/n;
+s=sqrt(18.96);
+disp((m+2.26*(s/3)),"to",(m-2.26*(s/3)),"The 95% confidence limits for mean weight are "),
diff --git a/1475/CH4/EX4.16/Output_4_16.PNG b/1475/CH4/EX4.16/Output_4_16.PNG Binary files differnew file mode 100755 index 000000000..f1d904b20 --- /dev/null +++ b/1475/CH4/EX4.16/Output_4_16.PNG diff --git a/1475/CH4/EX4.17/Example_4_17.sce b/1475/CH4/EX4.17/Example_4_17.sce new file mode 100755 index 000000000..b6bcbff1b --- /dev/null +++ b/1475/CH4/EX4.17/Example_4_17.sce @@ -0,0 +1,6 @@ +// Example 4.17 The standard deviation of a random sample of size 12
+clc;
+clear;
+n=12;
+sd=5.5;
+disp(sqrt((n*(sd^2))/3.82),"to",sqrt((n*(sd^2))/21.92),"The required 95% confidence limits for population proportion s.d are ")
diff --git a/1475/CH4/EX4.17/Output_4_17.PNG b/1475/CH4/EX4.17/Output_4_17.PNG Binary files differnew file mode 100755 index 000000000..50020cee5 --- /dev/null +++ b/1475/CH4/EX4.17/Output_4_17.PNG diff --git a/1475/CH4/EX4.18/Example_4_18.sce b/1475/CH4/EX4.18/Example_4_18.sce new file mode 100755 index 000000000..0f4e13bba --- /dev/null +++ b/1475/CH4/EX4.18/Example_4_18.sce @@ -0,0 +1,6 @@ +// Example 4.18 A sample size 8 from a normal population yields as the unbiased estimate of population variance
+clc;
+clear;
+n=8;
+sd=4.4;
+disp(((n-1)*(sd))/0.99,"to",((n-1)*(sd))/20.3,"The required 99% confidence limits for population proportion variance are ")
diff --git a/1475/CH4/EX4.18/Output_4_18.PNG b/1475/CH4/EX4.18/Output_4_18.PNG Binary files differnew file mode 100755 index 000000000..6bfc8d089 --- /dev/null +++ b/1475/CH4/EX4.18/Output_4_18.PNG diff --git a/1475/CH4/EX4.3/Example_4_3.sce b/1475/CH4/EX4.3/Example_4_3.sce new file mode 100755 index 000000000..e8bc666b9 --- /dev/null +++ b/1475/CH4/EX4.3/Example_4_3.sce @@ -0,0 +1,9 @@ +//Example 4.3 The following observations constitute a random sample from an unknown population
+clear;
+clc;
+x=[14 19 17 20 25];
+n=5;
+M=sum(x)/n;
+s_d=sqrt(sum((x-M)^2)/4);
+SE=s_d/sqrt(n);
+disp(SE,"Standard Error =",s_d,"Standard Mean",M,"Mean");
diff --git a/1475/CH4/EX4.3/Output_4_3.PNG b/1475/CH4/EX4.3/Output_4_3.PNG Binary files differnew file mode 100755 index 000000000..5ecfc89c0 --- /dev/null +++ b/1475/CH4/EX4.3/Output_4_3.PNG diff --git a/1475/CH5/EX5.1/Example_5_1.sce b/1475/CH5/EX5.1/Example_5_1.sce new file mode 100755 index 000000000..dceaf8967 --- /dev/null +++ b/1475/CH5/EX5.1/Example_5_1.sce @@ -0,0 +1,53 @@ +// Example 5.1 A random sample of five motor car tyres
+clc;
+clear;
+Xij = [35 34 34 33 34; 32 32 31 28 29; 34 33 32 32 33 ];
+disp(Xij,"Xij =");
+Xij=Xij - 30;
+disp(Xij,"Xij-30 =");
+T1=0;
+T2=0;
+T3=0;
+Total_Square=0;
+ for i=1
+ for j=1:5
+ T1= Xij(i,j) + T1;
+ end
+end
+for i=2
+ for j=1:5
+ T2= Xij(i,j) + T2;
+ end
+end
+for i=3
+ for j=1:5
+ T3= Xij(i,j) + T3;
+ end
+end
+T=T1+T2+T3;
+disp(T,"T=T1+T2+T3 = ");
+ for i=1
+ for j=1:5e
+ Total_Square= Xij(i,j)^2 + Total_Square;
+ end
+end
+for i=2
+ for j=1:5
+ Total_Square= Xij(i,j)^2 + Total_Square;
+ end
+end
+for i=3
+ for j=1:5
+ Total_Square= Xij(i,j)^2 + Total_Square;
+ end
+end
+disp(Total_Square,"Total of Squares = ");
+N=15;
+C_F=(T^2)/N;
+Total_SS= Total_Square - C_F;
+SSB= ((T1^2)+(T2^2)+(T3^2))/5 -(C_F);
+SSE=Total_SS - SSB;
+disp(SSE,"SSE=",SSB,"SSB =",Total_SS,"Total SS =",C_F,"C.F =");
+c_d= sqrt(1.5)*sqrt(2*5)*2.18;
+disp(T1-T2,"|T1-T2| =",T1-T3,"|T1-T3|=",T3-T2,"|T2-T3|=" );
+disp("Comparing these figure with critical difference 8.44 we find that brands A and B are of Different quality and so are brand B and C. Brands A and C may be taken to be of the same quality ",c_d,"Critical Difference = ");
diff --git a/1475/CH5/EX5.1/Output_5_1_1.PNG b/1475/CH5/EX5.1/Output_5_1_1.PNG Binary files differnew file mode 100755 index 000000000..824d41f36 --- /dev/null +++ b/1475/CH5/EX5.1/Output_5_1_1.PNG diff --git a/1475/CH5/EX5.1/Output_5_1_2.PNG b/1475/CH5/EX5.1/Output_5_1_2.PNG Binary files differnew file mode 100755 index 000000000..a20441840 --- /dev/null +++ b/1475/CH5/EX5.1/Output_5_1_2.PNG diff --git a/1475/CH5/EX5.2/Example_5_2.sce b/1475/CH5/EX5.2/Example_5_2.sce new file mode 100755 index 000000000..21312838c --- /dev/null +++ b/1475/CH5/EX5.2/Example_5_2.sce @@ -0,0 +1,15 @@ +// Example 5.2 An Experimenter wished to study the effect of 4 fertilizers
+clc;
+clear;
+T_Obs= 24;
+T_df= 23;
+df_f=3;
+df_wg=20;
+disp(df_wg,"the df for With in groupis (23-3)= ",df_f,"df for fertilisers (4-1)=",T_df,"Total degree of freedom (df) is (24-1)= ",T_Obs, "Total observation =");
+Total_SS=6212;
+F_SS=2940;
+wg_SS=Total_SS-F_SS;
+Ms_Fert=F_SS/3;
+Ms_wg=wg_SS/20;
+F=(Ms_Fert)/(Ms_wg);
+disp("Since, the observed value of F (viz. 5.99) is larger than the tabulated value. Therefore, we conclude fertilizers differ significantly",F,"Observed value of F",Ms_wg,"MS within Group",Ms_Fert,"MS between Fertilizers",wg_SS,"With in Group SS ");
diff --git a/1475/CH5/EX5.2/Output_5_2.PNG b/1475/CH5/EX5.2/Output_5_2.PNG Binary files differnew file mode 100755 index 000000000..be055ec05 --- /dev/null +++ b/1475/CH5/EX5.2/Output_5_2.PNG diff --git a/1475/CH5/EX5.3/Example_5_3.sce b/1475/CH5/EX5.3/Example_5_3.sce new file mode 100755 index 000000000..1182ed90c --- /dev/null +++ b/1475/CH5/EX5.3/Example_5_3.sce @@ -0,0 +1,59 @@ +clc;
+clear;
+Xij = [-1 -8 -3 0 2 0 0; 1 6 5 8 0 0 0; 16 11 15 14 0 0 0; 12 10 13 12 11 14 12 ];
+disp(Xij,"Xij =");
+T1=0;
+T2=0;
+T3=0;
+T4=0;
+Total_Square=0;
+ for i=1
+ for j=1:7
+ T1= Xij(i,j) + T1;
+ end
+end
+for i=2
+ for j=1:7
+ T2= Xij(i,j) + T2;
+ end
+end
+for i=3
+ for j=1:7
+ T3= Xij(i,j) + T3;
+ end
+end
+for i=4
+ for j=1:7
+ T4= Xij(i,j) + T4;
+ end
+end
+T=T1+T2+T3+T4;
+disp(T,"T=T1+T2+T3 = ");
+ for i=1
+ for j=1:7
+ Total_Square= Xij(i,j)^2 + Total_Square;
+ end
+end
+for i=2
+ for j=1:7
+ Total_Square= Xij(i,j)^2 + Total_Square;
+ end
+end
+for i=3
+ for j=1:7
+ Total_Square= Xij(i,j)^2 + Total_Square;
+ end
+end
+for i=4
+ for j=1:7
+ Total_Square= Xij(i,j)^2 + Total_Square;
+ end
+end
+disp(Total_Square,"Total of Squares = ");
+N=20;
+C_F=(T^2)/N;
+Total_SS= Total_Square - C_F;
+SSB= ((T1^2)/5+(T2^2)/4+(T3^2)/4+(T4^2)/7) -(C_F);
+SSE=Total_SS - SSB;
+disp(SSE,"SSE=",SSB,"SSB =",Total_SS,"Total SS =",C_F,"C.F =");
+disp("Since the observed value of f is larger than the 1 % tabulated value corresponding to df. (3,16), we reject the null hypothesis and conclude that the means of normal populations are not equal = ");
diff --git a/1475/CH5/EX5.3/Output_5_3.PNG b/1475/CH5/EX5.3/Output_5_3.PNG Binary files differnew file mode 100755 index 000000000..2ba708000 --- /dev/null +++ b/1475/CH5/EX5.3/Output_5_3.PNG diff --git a/1475/CH5/EX5.4/Example_5_4.sce b/1475/CH5/EX5.4/Example_5_4.sce new file mode 100755 index 000000000..67188864f --- /dev/null +++ b/1475/CH5/EX5.4/Example_5_4.sce @@ -0,0 +1,64 @@ +clc;
+clear;
+Xij = [9 12 11; 10 11 12; 9 9 10; 10 11 12];
+disp(Xij,"Xij =");
+Xij=Xij - 10;
+disp(Xij,"Xij-30 =");
+T1=0;
+T2=0;
+T3=0;
+T4=0;
+Total_Square=0;
+ for i=1
+ for j=1:3
+ T1= Xij(i,j) + T1;
+ end
+end
+for i=2
+ for j=1:3
+ T2= Xij(i,j) + T2;
+ end
+end
+for i=3
+ for j=1:3
+ T3= Xij(i,j) + T3;
+ end
+end
+for i=4
+ for j=1:3
+ T4= Xij(i,j) + T4;
+ end
+end
+T=T1+T2+T3+T4;
+disp(T,"T=T1+T2+T3 = ");
+ for i=1
+ for j=1:3
+ Total_Square= Xij(i,j)^2 + Total_Square;
+ end
+end
+for i=2
+ for j=1:3
+ Total_Square= Xij(i,j)^2 + Total_Square;
+ end
+end
+for i=3
+ for j=1:3
+ Total_Square= Xij(i,j)^2 + Total_Square;
+ end
+end
+for i=4
+ for j=1:3
+ Total_Square= Xij(i,j)^2 + Total_Square;
+ end
+end
+disp(Total_Square,"Total of Squares = ");
+N=12;
+C_F=(T^2)/N;
+Total_SS= Total_Square - C_F;
+SS_b_C= ((T1^2)+(T2^2)+(T3^2)+(T4^2))/3 -(C_F);
+SS_b_E= 6.5
+SSE=Total_SS - SS_b_C - SS_b_E;
+disp(SSE,"SSE=",SS_b_E,"SS between Experiments =",SS_b_C,"SS between Consignments",Total_SS,"Total SS =",C_F,"C.F =");
+c_d= sqrt(0.47)*sqrt(2*4)*2.45;
+disp(T1-T2,"|T1-T2| =",T1-T3,"|T1-T3|=",T3-T2,"|T2-T3|=" );
+disp("Comparing these figure with critical difference 4.8 we find that experimenters A and B and A & C differ significantly ",c_d,"Critical Difference = ");
diff --git a/1475/CH5/EX5.4/Output_5_4_1.PNG b/1475/CH5/EX5.4/Output_5_4_1.PNG Binary files differnew file mode 100755 index 000000000..b882f5001 --- /dev/null +++ b/1475/CH5/EX5.4/Output_5_4_1.PNG diff --git a/1475/CH5/EX5.4/Output_5_4_2.PNG b/1475/CH5/EX5.4/Output_5_4_2.PNG Binary files differnew file mode 100755 index 000000000..94c01c514 --- /dev/null +++ b/1475/CH5/EX5.4/Output_5_4_2.PNG diff --git a/1475/CH6/EX6.11/Example_6_11.sce b/1475/CH6/EX6.11/Example_6_11.sce new file mode 100755 index 000000000..0044f3584 --- /dev/null +++ b/1475/CH6/EX6.11/Example_6_11.sce @@ -0,0 +1,24 @@ +// Example 6.11 Calculate the five year Moving Average
+clc;
+clear;
+Val=[105 115 100 90 80 95 85 75 60 65 70 58 55 53 60 52 50];
+MV1=0;
+MV2=0;
+MV16=0;
+MV17=0;
+MV3=Val(1)+Val(2)+Val(3)+Val(4)+Val(5);
+MV4=Val(2)+Val(3)+Val(4)+Val(5)+Val(6);
+MV5=Val(3)+Val(4)+Val(5)+Val(6)+Val(7);
+MV6=Val(4)+Val(5)+Val(6)+Val(7)+Val(8);
+MV7=Val(5)+Val(6)+Val(7)+Val(8)+Val(9);
+MV8=Val(6)+Val(7)+Val(8)+Val(9)+Val(10);
+MV9=Val(7)+Val(8)+Val(9)+Val(10)+Val(11);
+MV10=Val(8)+Val(9)+Val(10)+Val(11)+Val(12);
+MV11=Val(9)+Val(10)+Val(11)+Val(12)+Val(13);
+MV12=Val(10)+Val(11)+Val(12)+Val(13)+Val(14);
+MV13=Val(11)+Val(12)+Val(13)+Val(14)+Val(15);
+MV14=Val(12)+Val(13)+Val(14)+Val(15)+Val(16);
+MV15=Val(13)+Val(14)+Val(15)+Val(16)+Val(17);
+MV=[MV1 MV2 MV3 MV4 MV5 MV6 MV7 MV8 MV9 MV10 MV11 MV12 MV13 MV14 MV15 MV16 MV17 ];
+MA=MV./5;
+disp(MA,"5 year Moving Average",MV,"5 - Year Moving Total",Val,"Values =");
diff --git a/1475/CH6/EX6.11/Output_6_11.PNG b/1475/CH6/EX6.11/Output_6_11.PNG Binary files differnew file mode 100755 index 000000000..ee3dc7f72 --- /dev/null +++ b/1475/CH6/EX6.11/Output_6_11.PNG diff --git a/1475/CH6/EX6.12/Example_6_12.sce b/1475/CH6/EX6.12/Example_6_12.sce new file mode 100755 index 000000000..10e575176 --- /dev/null +++ b/1475/CH6/EX6.12/Example_6_12.sce @@ -0,0 +1,15 @@ +// Example 6.12 Find the trend for the following
+clc;
+clear;
+Year=[1 2 3 4 5 6 7 ];
+Val=[2 4 5 7 8 10 13];
+MV1=0;
+MV7=0;
+MV2=Val(1)+Val(2)+Val(3);
+MV3=Val(2)+Val(3)+Val(4);
+MV4=Val(3)+Val(4)+Val(5);
+MV5=Val(4)+Val(5)+Val(6);
+MV6=Val(5)+Val(6)+Val(7);
+MV=[MV1 MV2 MV3 MV4 MV5 MV6 MV7];
+MA=MV./3;
+disp(MA,"3 year Moving Average",MV,"3 Year Moving Total",Val,"Values =",Year,"Years are ");
diff --git a/1475/CH6/EX6.12/Output_6_12.PNG b/1475/CH6/EX6.12/Output_6_12.PNG Binary files differnew file mode 100755 index 000000000..209ef8a12 --- /dev/null +++ b/1475/CH6/EX6.12/Output_6_12.PNG diff --git a/1475/CH6/EX6.13/Example_6_13.sce b/1475/CH6/EX6.13/Example_6_13.sce new file mode 100755 index 000000000..0fb58cd32 --- /dev/null +++ b/1475/CH6/EX6.13/Example_6_13.sce @@ -0,0 +1,16 @@ +// Example 6.13 Find the trend for the following using 3 year weighted moving average
+clc;
+clear;
+Year=[1 2 3 4 5 6 7 ];
+Val=[2 4 5 7 8 10 13];
+MV1=0;
+MV7=0;
+MV2=Val(1)*1+Val(2)*2+Val(3)*1;
+MV3=Val(2)*1+Val(3)*2+Val(4)*1;
+MV4=Val(3)*1+Val(4)*2+Val(5)*1;
+MV5=Val(4)*1+Val(5)*2+Val(6)*1;
+MV6=Val(5)*1+Val(6)*2+Val(7)*1;
+WMV=[MV1 MV2 MV3 MV4 MV5 MV6 MV7];
+W=[1 2 1];
+MA=WMV./sum(W);
+disp(MA,"3 year Moving Average",WMV,"3 year Weighted Moving Total",Val,"Values =",Year,"Years are ");
diff --git a/1475/CH6/EX6.13/Output_6_13.PNG b/1475/CH6/EX6.13/Output_6_13.PNG Binary files differnew file mode 100755 index 000000000..129e60995 --- /dev/null +++ b/1475/CH6/EX6.13/Output_6_13.PNG diff --git a/1475/CH6/EX6.15/Example_6_15.sce b/1475/CH6/EX6.15/Example_6_15.sce new file mode 100755 index 000000000..098ed9abe --- /dev/null +++ b/1475/CH6/EX6.15/Example_6_15.sce @@ -0,0 +1,32 @@ +// Example 6.15 Compute the trend by the method of moving averages
+clc;
+clear;
+Year=[1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 ];
+Val=[54 40.5 47.0 48.5 42.9 42.1 36.6 42.7 45.7 45.1 37.8];
+MV1=0;
+MV2=0;
+MV10=0;
+MV11=0;
+MV3=Val(1)+Val(2)+Val(3)+Val(4);
+MV4=Val(2)+Val(3)+Val(4)+Val(5);
+MV5=Val(3)+Val(4)+Val(5)+Val(6);
+MV6=Val(4)+Val(5)+Val(6)+Val(7);
+MV7=Val(5)+Val(6)+Val(7)+Val(8);
+MV8=Val(6)+Val(7)+Val(8)+Val(9);
+MV9=Val(7)+Val(8)+Val(9)+Val(10);
+MV10=Val(8)+Val(9)+Val(10)+Val(11);
+MVT=[MV1 MV2 MV3 MV4 MV5 MV6 MV7 MV8 MV9 MV10 MV11];
+T1=0;
+T2=0;
+T10=0;
+T11=0;
+T3=MV3+MV4;
+T4=MV4+MV5;
+T5=MV5+MV6;
+T6=MV6+MV7;
+T7=MV7+MV8;
+T8=MV8+MV9;
+T9=MV9+MV10;
+T=[T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11];
+MA=T./8;
+disp(MA,"4 year Moving Average",T,"2 year Moving Average Total",MVT,"4 year Moving Average Total",Val,"Values =",Year,"Years are ");
diff --git a/1475/CH6/EX6.15/Output_6_15.PNG b/1475/CH6/EX6.15/Output_6_15.PNG Binary files differnew file mode 100755 index 000000000..d44f80bdd --- /dev/null +++ b/1475/CH6/EX6.15/Output_6_15.PNG diff --git a/1475/CH6/EX6.23/Example_6_23.sce b/1475/CH6/EX6.23/Example_6_23.sce new file mode 100755 index 000000000..77d1b4271 --- /dev/null +++ b/1475/CH6/EX6.23/Example_6_23.sce @@ -0,0 +1,10 @@ +// Example 6.23 The trend equation fitted to annual average
+clc;
+clear;
+x1=138;
+x2=139;
+x3=140;
+y1=230+(20*x1)/12;
+y2=230+(20*x2)/12;
+y3=230+(20*x3)/12;
+disp(y3,"Trend values for the month of Jan,1972 =",y2,"Trend values for the month of Feb,1972 =",y1,"Trend values for the month of March,1972 =","Considering Unit = 1 month");
diff --git a/1475/CH6/EX6.23/Output_6_23.PNG b/1475/CH6/EX6.23/Output_6_23.PNG Binary files differnew file mode 100755 index 000000000..da06fe58d --- /dev/null +++ b/1475/CH6/EX6.23/Output_6_23.PNG diff --git a/1475/CH6/EX6.24/Example_6_24.sce b/1475/CH6/EX6.24/Example_6_24.sce new file mode 100755 index 000000000..4c3ac3a8b --- /dev/null +++ b/1475/CH6/EX6.24/Example_6_24.sce @@ -0,0 +1,6 @@ +// Example 6.24 Trend equation for certain production
+clc;
+clear;
+x1=20;
+y1=(240)/12+(36*(x1+0.5))/(12*12);
+disp(y1,"Trend values for the month of March,1982 =","Considering Unit = 1 month",x1,"Time with origin at year July,1980= ");
diff --git a/1475/CH6/EX6.24/Output_6_24.PNG b/1475/CH6/EX6.24/Output_6_24.PNG Binary files differnew file mode 100755 index 000000000..ae3a9528f --- /dev/null +++ b/1475/CH6/EX6.24/Output_6_24.PNG diff --git a/1475/CH6/EX6.29/Example_6_29.sce b/1475/CH6/EX6.29/Example_6_29.sce new file mode 100755 index 000000000..7fa590f92 --- /dev/null +++ b/1475/CH6/EX6.29/Example_6_29.sce @@ -0,0 +1,8 @@ +// Example 6.29 A certain company estimates its average monthly sales in a particular year
+clc;
+clear;
+SI=[78 75 100 126 138 121 101 104 99 103 80 75];
+Total=sum(SI);
+SE=SI./100;
+ES=SE.*20;
+disp(ES,"Estimated Sales in lakhs =",SE,"Seasonal Effect =",Total,"Sum of seasonal index =",SI,"Seasonal Index =");
diff --git a/1475/CH6/EX6.29/Output_6_29.PNG b/1475/CH6/EX6.29/Output_6_29.PNG Binary files differnew file mode 100755 index 000000000..8294a55ec --- /dev/null +++ b/1475/CH6/EX6.29/Output_6_29.PNG diff --git a/1475/CH6/EX6.30/Example_6_30.sce b/1475/CH6/EX6.30/Example_6_30.sce new file mode 100755 index 000000000..15ce0c793 --- /dev/null +++ b/1475/CH6/EX6.30/Example_6_30.sce @@ -0,0 +1,7 @@ +// Example 6.30 Deseasonalise the following sales data
+clc;
+clear;
+Sales=[23.7 25.2 21.4 65.4];
+SI=[0.78 1.24 0.50 1.48];
+DD=Sales./SI;
+disp(DD,"Deseasonalise Data =",SI,"Seasonal Index",Sales,"Sales in thousand =");
diff --git a/1475/CH6/EX6.30/Output_6_30.PNG b/1475/CH6/EX6.30/Output_6_30.PNG Binary files differnew file mode 100755 index 000000000..b004cb54f --- /dev/null +++ b/1475/CH6/EX6.30/Output_6_30.PNG diff --git a/1475/CH6/EX6.31/Example_6_31.sce b/1475/CH6/EX6.31/Example_6_31.sce new file mode 100755 index 000000000..e5a47b76d --- /dev/null +++ b/1475/CH6/EX6.31/Example_6_31.sce @@ -0,0 +1,9 @@ +// Example 6.31 Sales of a company rose
+clc
+clear;
+SI2=103;
+SI3=150;
+S2=3945000;
+S3=4621000;
+ES= (S2*(SI3/100))/(SI2/100);
+disp(ES,"Expected sales during the thirs quarter =",S3,"Actual sales in third quarters =", S2,"Actual sales in second quarters =",SI3,"Seasonal Index for third Quarter =",SI2,"Seasonal Index for second Quarter =");
diff --git a/1475/CH6/EX6.31/Output_6_31.PNG b/1475/CH6/EX6.31/Output_6_31.PNG Binary files differnew file mode 100755 index 000000000..d2df6a31a --- /dev/null +++ b/1475/CH6/EX6.31/Output_6_31.PNG diff --git a/1475/CH6/EX6.33/Example_6_33.sce b/1475/CH6/EX6.33/Example_6_33.sce new file mode 100755 index 000000000..cb46b395d --- /dev/null +++ b/1475/CH6/EX6.33/Example_6_33.sce @@ -0,0 +1,16 @@ +//Example 6.33 Compute the average seasonal movements by the method of quarterly total for the following series of observation
+clc;
+clear;
+P1=[37 41 35];
+P2=[38 34 37 ];
+P3=[37 25 35];
+P4=[40 31 41];
+T1=sum(P1);
+T2=sum(P2);
+T3=sum(P3);
+T4=sum(P4);
+T=[T1 T2 T3 T4];
+AM=T./3;
+GA=sum(AM)/4;
+ASM=AM-GA;
+disp(ASM,"Average Seasonal Movements=",GA,"Grand Average =",AM,"Average Movement =");
diff --git a/1475/CH6/EX6.33/Output_6_33.PNG b/1475/CH6/EX6.33/Output_6_33.PNG Binary files differnew file mode 100755 index 000000000..948eb2507 --- /dev/null +++ b/1475/CH6/EX6.33/Output_6_33.PNG diff --git a/1475/CH6/EX6.34/Example_6_34.sce b/1475/CH6/EX6.34/Example_6_34.sce new file mode 100755 index 000000000..19658db85 --- /dev/null +++ b/1475/CH6/EX6.34/Example_6_34.sce @@ -0,0 +1,16 @@ +// Example 6.34 Calculate the seasonal indices in the case of the following
+clc;
+clear;
+Q1=[39 45 44 53];
+Q2=[21 23 26 23 ];
+Q3=[52 63 69 64];
+Q4=[81 76 75 84];
+T1=sum(Q1);
+T2=sum(Q2);
+T3=sum(Q3);
+T4=sum(Q4);
+T=[T1 T2 T3 T4];
+AM=T./4;
+GA=sum(AM)/4;
+SI=(AM./GA)*100;
+disp(SI,"Seasonal Index=",GA,"Grand Average =",AM,"Average Movement =");
diff --git a/1475/CH6/EX6.34/Output_6_34.PNG b/1475/CH6/EX6.34/Output_6_34.PNG Binary files differnew file mode 100755 index 000000000..1dd824d82 --- /dev/null +++ b/1475/CH6/EX6.34/Output_6_34.PNG diff --git a/1475/CH6/EX6.35/Example_6_35.sce b/1475/CH6/EX6.35/Example_6_35.sce new file mode 100755 index 000000000..612c02236 --- /dev/null +++ b/1475/CH6/EX6.35/Example_6_35.sce @@ -0,0 +1,58 @@ +//Example 6.35 Obtain seasonal fluctuation from the following time series
+clc;
+clear;
+Output=[65 58 56 61 68 63 63 67 70 59 56 52 60 55 51 58];
+MV1=0;
+MV2=0;
+MV16=0;
+MV3=Output(1)+Output(2)+Output(3)+Output(4);
+MV4=Output(2)+Output(3)+Output(4)+Output(5);
+MV5=Output(3)+Output(4)+Output(5)+Output(6);
+MV6=Output(4)+Output(5)+Output(6)+Output(7);
+MV7=Output(5)+Output(6)+Output(7)+Output(8);
+MV8=Output(6)+Output(7)+Output(8)+Output(9);
+MV9=Output(7)+Output(8)+Output(9)+Output(10);
+MV10=Output(8)+Output(9)+Output(10)+Output(11);
+MV11=Output(9)+Output(10)+Output(11)+Output(12);
+MV12=Output(10)+Output(11)+Output(12)+Output(13);
+MV13=Output(11)+Output(12)+Output(13)+Output(14);
+MV14=Output(12)+Output(13)+Output(14)+Output(15);
+MV15=Output(16)+Output(13)+Output(14)+Output(15);
+MVT=[MV1 MV2 MV3 MV4 MV5 MV6 MV7 MV8 MV9 MV10 MV11 MV12 MV13 MV14 MV15 MV16];
+T1=0;
+T2=0;
+T16=0;
+T15=0;
+T3=MV3+MV4;
+T4=MV4+MV5;
+T5=MV5+MV6;
+T6=MV6+MV7;
+T7=MV7+MV8;
+T8=MV8+MV9;
+T9=MV9+MV10;
+T10=MV10+MV11;
+T11=MV11+MV12;
+T12=MV12+MV13;
+T13=MV13+MV14;
+T14=MV14+MV15;
+T=[T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 T15 T16];
+MA=T./8;
+DT=Output-MA;
+disp(DT,"Deviation from tend",MA,"4 quarter Moving Total",T,"2 year Moving Total",MVT,"4 year Moving Average ",Output,"Output =");
+P1=[0 DT(5) DT(9) DT(13)];
+P2=[0 DT(6) DT(10) DT(14)];
+P3=[DT(3)DT(7) DT(11) 0];
+P4=[DT(4) DT(8) DT(12) 0];
+RT1=sum(P1);
+RT2=sum(P2);
+RT3=sum(P3);
+RT4=sum(P4);
+RT=[RT1 RT2 RT3 RT4];
+AM=RT./3;
+GA=sum(AM)/4;
+disp(GA,"Grand Average =",AM,"Seasonal Average Movement =",RT,"Total of Deviations ");
+
+
+
+
+
diff --git a/1475/CH6/EX6.35/Output_6_35.PNG b/1475/CH6/EX6.35/Output_6_35.PNG Binary files differnew file mode 100755 index 000000000..504597998 --- /dev/null +++ b/1475/CH6/EX6.35/Output_6_35.PNG diff --git a/1475/CH6/EX6.36/Example_6_36.sce b/1475/CH6/EX6.36/Example_6_36.sce new file mode 100755 index 000000000..bfe283496 --- /dev/null +++ b/1475/CH6/EX6.36/Example_6_36.sce @@ -0,0 +1,61 @@ +//Example 6.36 Deseasonalize the following production data
+clc;
+clear;
+Output=[30 49 50 35 49 50 61 20 35 62 60 25 75 79 65 70];
+MV1=0;
+MV2=0;
+MV16=0;
+MV3=Output(1)+Output(2)+Output(3)+Output(4);
+MV4=Output(2)+Output(3)+Output(4)+Output(5);
+MV5=Output(3)+Output(4)+Output(5)+Output(6);
+MV6=Output(4)+Output(5)+Output(6)+Output(7);
+MV7=Output(5)+Output(6)+Output(7)+Output(8);
+MV8=Output(6)+Output(7)+Output(8)+Output(9);
+MV9=Output(7)+Output(8)+Output(9)+Output(10);
+MV10=Output(8)+Output(9)+Output(10)+Output(11);
+MV11=Output(9)+Output(10)+Output(11)+Output(12);
+MV12=Output(10)+Output(11)+Output(12)+Output(13);
+MV13=Output(11)+Output(12)+Output(13)+Output(14);
+MV14=Output(12)+Output(13)+Output(14)+Output(15);
+MV15=Output(16)+Output(13)+Output(14)+Output(15);
+MVT=[MV1 MV2 MV3 MV4 MV5 MV6 MV7 MV8 MV9 MV10 MV11 MV12 MV13 MV14 MV15 MV16];
+T1=0;
+T2=0;
+T16=0;
+T15=0;
+T3=MV3+MV4;
+T4=MV4+MV5;
+T5=MV5+MV6;
+T6=MV6+MV7;
+T7=MV7+MV8;
+T8=MV8+MV9;
+T9=MV9+MV10;
+T10=MV10+MV11;
+T11=MV11+MV12;
+T12=MV12+MV13;
+T13=MV13+MV14;
+T14=MV14+MV15;
+T=[T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 T15 T16];
+MA=T./8;
+DT=Output-MA;
+disp(DT,"Deviation from tend",MA,"4 quarter Moving Total",T,"2 year Moving Total",MVT,"4 year Moving Average ",Output,"Output =");
+P1=[0 DT(5) DT(9) DT(13)];
+P2=[0 DT(6) DT(10) DT(14)];
+P3=[DT(3)DT(7) DT(11) 0];
+P4=[DT(4) DT(8) DT(12) 0];
+RT1=sum(P1);
+RT2=sum(P2);
+RT3=sum(P3);
+RT4=sum(P4);
+RT=[RT1 RT2 RT3 RT4];
+AM=RT./3;
+SS=AM-(0.57);
+M=[SS SS SS SS];
+DD=Output-M;
+GA=sum(AM)/4;
+disp(DD,"Deseasonalised Data =",GA,"Grand Average =",SS,"Seasonal @ =",AM,"Average Movement =",RT,"Total of Deviations = ");
+
+
+
+
+
diff --git a/1475/CH6/EX6.36/Output_6_36_1.PNG b/1475/CH6/EX6.36/Output_6_36_1.PNG Binary files differnew file mode 100755 index 000000000..869a90205 --- /dev/null +++ b/1475/CH6/EX6.36/Output_6_36_1.PNG diff --git a/1475/CH6/EX6.36/Output_6_36_2.PNG b/1475/CH6/EX6.36/Output_6_36_2.PNG Binary files differnew file mode 100755 index 000000000..a29d38365 --- /dev/null +++ b/1475/CH6/EX6.36/Output_6_36_2.PNG diff --git a/1475/CH6/EX6.37/Example_6_37.sce b/1475/CH6/EX6.37/Example_6_37.sce new file mode 100755 index 000000000..06d075952 --- /dev/null +++ b/1475/CH6/EX6.37/Example_6_37.sce @@ -0,0 +1,51 @@ +// Example.37 find the seasonal indices by the method
+clc;
+clear;
+Output=[101 93 79 98 106 96 83 103 110 101 88 106];
+MV1=0;
+MV2=0;
+MV12=0;
+MV3=Output(1)+Output(2)+Output(3)+Output(4);
+MV4=Output(2)+Output(3)+Output(4)+Output(5);
+MV5=Output(3)+Output(4)+Output(5)+Output(6);
+MV6=Output(4)+Output(5)+Output(6)+Output(7);
+MV7=Output(5)+Output(6)+Output(7)+Output(8);
+MV8=Output(6)+Output(7)+Output(8)+Output(9);
+MV9=Output(7)+Output(8)+Output(9)+Output(10);
+MV10=Output(8)+Output(9)+Output(10)+Output(11);
+MV11=Output(9)+Output(10)+Output(11)+Output(12);
+MVT=[MV1 MV2 MV3 MV4 MV5 MV6 MV7 MV8 MV9 MV10 MV11 MV12];
+T1=1;
+T2=1;
+T12=1;
+T11=1;
+T3=MV3+MV4;
+T4=MV4+MV5;
+T5=MV5+MV6;
+T6=MV6+MV7;
+T7=MV7+MV8;
+T8=MV8+MV9;
+T9=MV9+MV10;
+T10=MV10+MV11;
+T=[T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12];
+MA=T./8;
+RMA=(Output ./ MA)*100;
+disp(RMA,"Ratio to Moving Average =",MA,"4 quarter Moving Total",T,"2 year Moving Total",MVT,"4 year Moving Average ",Output,"Output =");
+P1=[0 RMA(5) RMA(9) ];
+P2=[0 RMA(6) RMA(10) ];
+P3=[RMA(3)RMA(7) 0];
+P4=[RMA(4) RMA(8) 0];
+RT1=sum(P1);
+RT2=sum(P2);
+RT3=sum(P3);
+RT4=sum(P4);
+RT=[RT1 RT2 RT3 RT4];
+AM=RT./2;
+SS=round(AM);
+GA=sum(AM)/4;
+disp(GA,"Grand Average =",SS,"Seasonal @ =",AM,"Average Movement =",RT,"Total of Deviations = ");
+
+
+
+
+
diff --git a/1475/CH6/EX6.37/Output_6_37_1.PNG b/1475/CH6/EX6.37/Output_6_37_1.PNG Binary files differnew file mode 100755 index 000000000..95efe3cdb --- /dev/null +++ b/1475/CH6/EX6.37/Output_6_37_1.PNG diff --git a/1475/CH6/EX6.37/Output_6_37_2.PNG b/1475/CH6/EX6.37/Output_6_37_2.PNG Binary files differnew file mode 100755 index 000000000..4776a7e1b --- /dev/null +++ b/1475/CH6/EX6.37/Output_6_37_2.PNG diff --git a/1475/CH6/EX6.40/Example_6_40.sce b/1475/CH6/EX6.40/Example_6_40.sce new file mode 100755 index 000000000..13a7215dd --- /dev/null +++ b/1475/CH6/EX6.40/Example_6_40.sce @@ -0,0 +1,39 @@ +// Example 6.40 Compute Seasonal Indices from the data
+clc;
+clear;
+
+Output=[65 58 56 61 68 63 63 67 70 59 56 52 60 55 51 58];
+LR1=0;
+LR2=Output(2)/Output(1);
+LR3=Output(3)/Output(2)
+LR4=Output(4)/Output(3);
+LR5=Output(5)/Output(4);
+LR6=Output(6)/Output(5);
+LR7=Output(7)/Output(6);
+LR8=Output(8)/Output(7);
+LR9=Output(9)/Output(8);
+LR10=Output(10)/Output(9)
+LR11=Output(11)/Output(10);
+LR12=Output(12)/Output(11);
+LR13=Output(13)/Output(12);
+LR14=Output(14)/Output(13);
+LR15=Output(15)/Output(14);
+LR16=Output(16)/Output(15);
+LRT=[LR1 LR2 LR3 LR4 LR5 LR6 LR7 LR8 LR9 LR10 LR11 LR12 LR13 LR14 LR15 LR16]*100;
+disp(,LRT,"Link relatives = ",Output,"Output =");
+P1=[0 LRT(5) LRT(9) LRT(13)];
+P2=[LRT(2) LRT(6) LRT(10) LRT(14)];
+P3=[LRT(3)LRT(7) LRT(11) LRT(15)];
+P4=[LRT(4) LRT(8) LRT(12) LRT(16)];
+RT1=sum(P1);
+RT2=sum(P2);
+RT3=sum(P3);
+RT4=sum(P4);
+RT=[RT1 RT2 RT3 RT4];
+AM=RT./[3 4 4 4];
+disp(AM,"Seasonal Index Movement =",RT,"Total = ");
+
+
+
+
+
diff --git a/1475/CH6/EX6.40/Output_6_40.PNG b/1475/CH6/EX6.40/Output_6_40.PNG Binary files differnew file mode 100755 index 000000000..e05411f13 --- /dev/null +++ b/1475/CH6/EX6.40/Output_6_40.PNG diff --git a/1475/CH7/EX7.10/Example_7_10.sce b/1475/CH7/EX7.10/Example_7_10.sce new file mode 100755 index 000000000..3f0d40644 --- /dev/null +++ b/1475/CH7/EX7.10/Example_7_10.sce @@ -0,0 +1,9 @@ +// Example 7.10 Calculate the price index for the year 1978 with
+clc;
+clear;
+Po=[12.5 10.5 15.00 9.40];
+Pn=[14 12 14 11.2];
+PoQo=[112.5 126.0 105 47];
+Qo=PoQo./Po
+LI=(sum(Pn.*Qo)/sum(Po.*Qo)*100);
+disp(LI,"Laspeyres index = ");
diff --git a/1475/CH7/EX7.10/Output_7_10.PNG b/1475/CH7/EX7.10/Output_7_10.PNG Binary files differnew file mode 100755 index 000000000..f34ec5e96 --- /dev/null +++ b/1475/CH7/EX7.10/Output_7_10.PNG diff --git a/1475/CH7/EX7.12/Example_7_12.sce b/1475/CH7/EX7.12/Example_7_12.sce new file mode 100755 index 000000000..a08adaaa4 --- /dev/null +++ b/1475/CH7/EX7.12/Example_7_12.sce @@ -0,0 +1,10 @@ +//Example 7.12 Given below are the data on prices of some consumer goods and the weights attached
+clc;
+clear;
+Po=[0.50 0.60 2.00 1.80 8.00];
+Pn= [0.75 0.75 2.40 2.10 10.00];
+W=[2 5 4 8 1];
+PR= (Pn./Po)*100;
+SI=sum(PR)/5;
+WAM=(sum(PR.*W)/sum(W));
+disp(WAM,"Weighted Average of PR index",SI,"Simple Average of PR Index",PR, "Price Relative =");
diff --git a/1475/CH7/EX7.12/Output_7_12.PNG b/1475/CH7/EX7.12/Output_7_12.PNG Binary files differnew file mode 100755 index 000000000..b8ef64ece --- /dev/null +++ b/1475/CH7/EX7.12/Output_7_12.PNG diff --git a/1475/CH7/EX7.13/Example_7_13.sce b/1475/CH7/EX7.13/Example_7_13.sce new file mode 100755 index 000000000..bba38523c --- /dev/null +++ b/1475/CH7/EX7.13/Example_7_13.sce @@ -0,0 +1,8 @@ +// Example 7.13 On the basis of the followinf data, compute the whole sale price index number for the 5 groups combined.
+clc;
+clear;
+W=[50 2 3 16 29];
+I=[241 221 204 256 179];
+IW=I.*W;
+IN=sum(IW)/100;
+disp(IN,"Index number of Wholesale Price")
diff --git a/1475/CH7/EX7.13/Output_7_13.PNG b/1475/CH7/EX7.13/Output_7_13.PNG Binary files differnew file mode 100755 index 000000000..7bb41749a --- /dev/null +++ b/1475/CH7/EX7.13/Output_7_13.PNG diff --git a/1475/CH7/EX7.14/Example_7_14.sce b/1475/CH7/EX7.14/Example_7_14.sce new file mode 100755 index 000000000..606fd9383 --- /dev/null +++ b/1475/CH7/EX7.14/Example_7_14.sce @@ -0,0 +1,8 @@ +// Example 7.14 Apply the geometric mean to find general index from the following
+clc;
+clear;
+I=[118 120 97 107 111 93];
+W=[4 1 2 6 5 2];
+IN=sum(log(I).*W)/sum(W);
+GI=exp(IN)
+disp(GI,"General Index",IN,"Log General Index number =")
diff --git a/1475/CH7/EX7.14/Output_7_14.PNG b/1475/CH7/EX7.14/Output_7_14.PNG Binary files differnew file mode 100755 index 000000000..240067ff8 --- /dev/null +++ b/1475/CH7/EX7.14/Output_7_14.PNG diff --git a/1475/CH7/EX7.18/Example_7_18.sce b/1475/CH7/EX7.18/Example_7_18.sce new file mode 100755 index 000000000..4e148a9f2 --- /dev/null +++ b/1475/CH7/EX7.18/Example_7_18.sce @@ -0,0 +1,17 @@ +// Example 7.18 Prepare price and quantity index numbers for 1972
+clc;
+clear;
+Po=[2 2.5 8 1];
+Pn=[4.5 3.2 4.5 1.8];
+Qo=[5 7 6 2];
+Qn= [7 10 6 9];
+PPI=(sum(Pn.*Qn)/sum(Po.*Qn)*100);
+LI=(sum(Pn.*Qo)/sum(Po.*Qo)*100);
+FI=sqrt(LI*PPI);
+disp(FI,"Fishers formula =",PPI,"Praasches Price Index",LI,"Laspeyres index = ","PRICE INDEX NUMBER : :");
+
+PQI=(sum(Pn.*Qn)/sum(Pn.*Qo)*100);
+LQI=(sum(Po.*Qn)/sum(Po.*Qo)*100);
+FQI=sqrt(LQI*PQI);
+disp(FQI,"Fishers formula =",PQI,"Praasches Price Index",LQI,"Laspeyres index = ","QUALITY INDEX NUMBER : :");
+
diff --git a/1475/CH7/EX7.18/Output_7_18.PNG b/1475/CH7/EX7.18/Output_7_18.PNG Binary files differnew file mode 100755 index 000000000..29521f1da --- /dev/null +++ b/1475/CH7/EX7.18/Output_7_18.PNG diff --git a/1475/CH7/EX7.19/Example_7_19.sce b/1475/CH7/EX7.19/Example_7_19.sce new file mode 100755 index 000000000..bfc80cc7d --- /dev/null +++ b/1475/CH7/EX7.19/Example_7_19.sce @@ -0,0 +1,7 @@ +// Example 7.19 Annual production of four commodities are given
+clc;
+clear;
+Q54=[125 175 144 140];
+R55=[135 187.5 136 130];
+W=[20 30 13 17 ];
+disp(sum(R55)/4,"Index number for 1955 ",sum(Q54)/4,"Index number for 1954","Using Simple Arithmetic mean of quality relatives",sum(R55.*W)/sum(W),"Index number for 1955 ",sum(Q54.*W)/sum(W),"Index number for 1954 ","Using weighted Arithmetic mean of quality relatives");
diff --git a/1475/CH7/EX7.19/Output_7_19.PNG b/1475/CH7/EX7.19/Output_7_19.PNG Binary files differnew file mode 100755 index 000000000..0e41624c0 --- /dev/null +++ b/1475/CH7/EX7.19/Output_7_19.PNG diff --git a/1475/CH7/EX7.20/Example_7_20.sce b/1475/CH7/EX7.20/Example_7_20.sce new file mode 100755 index 000000000..fa41a7604 --- /dev/null +++ b/1475/CH7/EX7.20/Example_7_20.sce @@ -0,0 +1,11 @@ +// Example 7.20 Calculate a number which will the percentage change in volume traffic
+clc;
+clear;
+Q=[1246 1125 4794];
+Qn=[1206 981 4229];
+W=[776 252 562];
+QR=(Qn./Q)*100;
+QI=sum(QR.*W)/sum(W);
+Po=W./Q;
+LQI=sum(Qn.*Po)*100/sum(W);
+disp(LQI,"Laspeyres Quantity Index ",QI,"Quantity Index number");
diff --git a/1475/CH7/EX7.20/Output_7_20.PNG b/1475/CH7/EX7.20/Output_7_20.PNG Binary files differnew file mode 100755 index 000000000..bbab72121 --- /dev/null +++ b/1475/CH7/EX7.20/Output_7_20.PNG diff --git a/1475/CH7/EX7.21/Example_7_21.sce b/1475/CH7/EX7.21/Example_7_21.sce new file mode 100755 index 000000000..357d290c7 --- /dev/null +++ b/1475/CH7/EX7.21/Example_7_21.sce @@ -0,0 +1,9 @@ +// Example 7.21 From the following data calculate Paasche Quantity index number
+clc;
+clear;
+Qo=[54 93 18 6 23];
+Qn=[250 75 56 8 47];
+PnQn=[540 852 448 56 141];
+Pn=PnQn./Qn;
+PQI=(sum(PnQn)/sum(Pn.*Qo)*100);
+disp(PQI,"Paasche Quantity index number");
diff --git a/1475/CH7/EX7.21/Output_7_21.PNG b/1475/CH7/EX7.21/Output_7_21.PNG Binary files differnew file mode 100755 index 000000000..853bacde8 --- /dev/null +++ b/1475/CH7/EX7.21/Output_7_21.PNG diff --git a/1475/CH7/EX7.34/Example_7_34.sce b/1475/CH7/EX7.34/Example_7_34.sce new file mode 100755 index 000000000..46b77756b --- /dev/null +++ b/1475/CH7/EX7.34/Example_7_34.sce @@ -0,0 +1,8 @@ +//Example 7.34 From the table of group index and group weights given below calculate the cost of index.
+clc;
+clear;
+I=[428 240 200 125 170];
+W=[45 15 8 20 12];
+IW=I.*W;
+disp(sum(IW)/sum(W),"Cost of Living Index =");
+
diff --git a/1475/CH7/EX7.34/Output_7_34.PNG b/1475/CH7/EX7.34/Output_7_34.PNG Binary files differnew file mode 100755 index 000000000..0fcfd7fdf --- /dev/null +++ b/1475/CH7/EX7.34/Output_7_34.PNG diff --git a/1475/CH7/EX7.35/Example_7_35.sce b/1475/CH7/EX7.35/Example_7_35.sce new file mode 100755 index 000000000..da9e2623c --- /dev/null +++ b/1475/CH7/EX7.35/Example_7_35.sce @@ -0,0 +1,7 @@ +//Example 7.35 In calculating a certain cost of living index number the following weights were used
+clc;
+clear;
+I=[32 54 47 78 58];
+W=[15 3 4 2 1];
+Avg=sum(I.*W)/sum(W);
+disp(100+Avg,"Cost of living index",Avg,"Average percentage increase for all groups taken together",I,"Average % Increase in Price");
diff --git a/1475/CH7/EX7.35/Output_7_35.PNG b/1475/CH7/EX7.35/Output_7_35.PNG Binary files differnew file mode 100755 index 000000000..a06748030 --- /dev/null +++ b/1475/CH7/EX7.35/Output_7_35.PNG diff --git a/1475/CH7/EX7.36/Example_7_36.sce b/1475/CH7/EX7.36/Example_7_36.sce new file mode 100755 index 000000000..8c47ae397 --- /dev/null +++ b/1475/CH7/EX7.36/Example_7_36.sce @@ -0,0 +1,12 @@ +
+//Example 7.36 The data below show the percentage increases in price of a few selected food items and the weights
+clc;
+clear;
+W=[33 11 8 5 5 3 7 9 9 10];
+I=[180 202 115 212 175 517 260 426 332 279];
+IW=I.*W;
+disp(100+ sum(IW)/sum(W),"Average Percentage increase in food price");
+Index=[340 310 220 150 300];
+Weight=[60 5 8 9 18];
+disp(sum(Index.*Weight)/sum(Weight),"Cost of living index");
+
diff --git a/1475/CH7/EX7.36/Output_7_36.PNG b/1475/CH7/EX7.36/Output_7_36.PNG Binary files differnew file mode 100755 index 000000000..003cd6f09 --- /dev/null +++ b/1475/CH7/EX7.36/Output_7_36.PNG diff --git a/1475/CH7/EX7.5/Example_7_5.sce b/1475/CH7/EX7.5/Example_7_5.sce new file mode 100755 index 000000000..c1407bb8f --- /dev/null +++ b/1475/CH7/EX7.5/Example_7_5.sce @@ -0,0 +1,9 @@ +//Example 7.5 Find the index number by the method of aggregates and method of relatives
+clc;
+clear;
+BP=[35 30 40 107];
+CP=[42 35 38 120];
+PR= (CP./BP)*100;
+SAI=(sum(CP)/sum(BP))*100;
+RI=sum(PR)/4;
+disp(RI, "Simple A.M of price Relative index =",SAI,"Simple Aggregrative Index = ",PR,"Price Relative = ",CP,"Current Price = ",BP,"Base Price =");
diff --git a/1475/CH7/EX7.5/Output_7_5.PNG b/1475/CH7/EX7.5/Output_7_5.PNG Binary files differnew file mode 100755 index 000000000..83ab00556 --- /dev/null +++ b/1475/CH7/EX7.5/Output_7_5.PNG diff --git a/1475/CH7/EX7.6/Example_7_6.sce b/1475/CH7/EX7.6/Example_7_6.sce new file mode 100755 index 000000000..7cba49da2 --- /dev/null +++ b/1475/CH7/EX7.6/Example_7_6.sce @@ -0,0 +1,10 @@ +// Example 7.6 Calculate price index numbers from the following data,
+clc;
+clear;
+BP=[80 10 40 50 12];
+CP= [110 15 56 95 18];
+W=[14 20 35 15 16];
+PR= (CP./BP)*100;
+WAI=((sum(CP.*W)/sum(BP.*W))*100);
+WAM=(sum(PR.*W)/sum(W));
+disp(WAM,"Weighted Arithmetic Mean",WAI,"Weighted Aggregrative Index",PR, "Price Relative =");
diff --git a/1475/CH7/EX7.6/Output_7_6.PNG b/1475/CH7/EX7.6/Output_7_6.PNG Binary files differnew file mode 100755 index 000000000..211922969 --- /dev/null +++ b/1475/CH7/EX7.6/Output_7_6.PNG diff --git a/1475/CH7/EX7.7/Example_7_7.sce b/1475/CH7/EX7.7/Example_7_7.sce new file mode 100755 index 000000000..f8764fa8f --- /dev/null +++ b/1475/CH7/EX7.7/Example_7_7.sce @@ -0,0 +1,10 @@ +// Example 7.7 From the following price and quantity data, compute Paashe's Price index
+clc;
+clear;
+Po=[4 60 35];
+Pn=[5 70 40];
+Qo=[95 118 50];
+Qn= [120 130 70];
+PPI=(sum(Pn.*Qn)/sum(Po.*Qn)*100);
+disp(PPI,"Praasches Price Index = ");
+
diff --git a/1475/CH7/EX7.7/Output_7_7.PNG b/1475/CH7/EX7.7/Output_7_7.PNG Binary files differnew file mode 100755 index 000000000..bb34ce17c --- /dev/null +++ b/1475/CH7/EX7.7/Output_7_7.PNG diff --git a/1475/CH7/EX7.8/Example_7_8.sce b/1475/CH7/EX7.8/Example_7_8.sce new file mode 100755 index 000000000..d9abda927 --- /dev/null +++ b/1475/CH7/EX7.8/Example_7_8.sce @@ -0,0 +1,10 @@ +// Example 7.8 Construct Fisher's ideal index number
+clc;
+clear;
+Po=[8 10 7];
+Pn=[12 11 8];
+Qo=[6 5 8];
+Qn= [5 6 5];
+PPI=(sum(Pn.*Qn)/sum(Po.*Qn)*100);
+LI=(sum(Pn.*Qo)/sum(Po.*Qo)*100);
+disp(PPI,"Praasches Price Index",LI,"Laspeyres index = ");
diff --git a/1475/CH7/EX7.8/Output_7_8.PNG b/1475/CH7/EX7.8/Output_7_8.PNG Binary files differnew file mode 100755 index 000000000..c24e74c36 --- /dev/null +++ b/1475/CH7/EX7.8/Output_7_8.PNG diff --git a/1475/CH7/EX7.9/Example_7_9.sce b/1475/CH7/EX7.9/Example_7_9.sce new file mode 100755 index 000000000..193995b02 --- /dev/null +++ b/1475/CH7/EX7.9/Example_7_9.sce @@ -0,0 +1,10 @@ +// Example 7.9 Marshall Edgeworth index number is a good approximation
+clc;
+clear;
+Po=[9.3 6.4 5.1];
+Pn=[4.5 3.7 2.7];
+Qo=[100 11 5];
+Qn= [90 10 3];
+FI=sqrt((sum(Pn.*Qn)*sum(Pn.*Qo))/(sum(Po.*Qo)*sum(Po.*Qn)))*100
+ME=(sum(Pn.*Qn)+sum(Pn.*Qo))/(sum(Po.*Qo)+sum(Po.*Qn))*100;
+disp("Yes, the two index are very close to each other",FI,"Fishers Ideal Price Index =",ME," Marshall Edgeworth Price Index = ");
diff --git a/1475/CH7/EX7.9/Output_7_9.PNG b/1475/CH7/EX7.9/Output_7_9.PNG Binary files differnew file mode 100755 index 000000000..3b5f2c335 --- /dev/null +++ b/1475/CH7/EX7.9/Output_7_9.PNG diff --git a/1475/CH8/EX8.1/Example_8_1.sce b/1475/CH8/EX8.1/Example_8_1.sce new file mode 100755 index 000000000..ed5b131a4 --- /dev/null +++ b/1475/CH8/EX8.1/Example_8_1.sce @@ -0,0 +1,9 @@ +// Example 8.1 From the following data
+clc;
+clear;
+P1=[1500 3000 5000 500];
+D1=[45 15 30 12];
+P2=[6000 5000 6000 3000];
+D2=[150 20 30 54];
+disp(sum(D2)*1000/sum(P2),"Crude Death Rate for Town II per thousand = ",sum(D1)*1000/sum(P1),"Crude Death Rate for Town I per thousand =");
+disp((D2./P2)*1000,"Specific Death Rate for Town II",(D1./P1)*1000,"Specific Death Rate for Town I");
diff --git a/1475/CH8/EX8.1/Output_8_1.PNG b/1475/CH8/EX8.1/Output_8_1.PNG Binary files differnew file mode 100755 index 000000000..fe6aabbb2 --- /dev/null +++ b/1475/CH8/EX8.1/Output_8_1.PNG diff --git a/1475/CH8/EX8.10/Example_8_10.sce b/1475/CH8/EX8.10/Example_8_10.sce new file mode 100755 index 000000000..644ddba2a --- /dev/null +++ b/1475/CH8/EX8.10/Example_8_10.sce @@ -0,0 +1,11 @@ +// Example 8.10 Calculate Gross Reproduction Rate and Net Reproduction Rate
+clc;
+clear;
+FP=[1558 1112 1595 1629 1627 1522 1401];
+FB=[18900 71100 96900 64200 34900 10800 800];
+SR=[0.914 0.899 0.884 0.868 0.852 0.834 0.8313];
+NFB=FB./(FP.*1000);
+NNB=NFB.*SR;
+GRR=sum(NFB) * 5;
+NRR=sum(NNB)*5;
+disp(NRR,"Net Reproduction Rate =",GRR,"Gross Reproduction Rate =",NNB,"No. of New born Females Surviving",NFB,"No. of New born Females Surviving ",SR,"Survival Rate",FB,"Female Birth",FP,"Female Population");
diff --git a/1475/CH8/EX8.10/Output_8_10.PNG b/1475/CH8/EX8.10/Output_8_10.PNG Binary files differnew file mode 100755 index 000000000..2507f9629 --- /dev/null +++ b/1475/CH8/EX8.10/Output_8_10.PNG diff --git a/1475/CH8/EX8.2/Example_8_2.sce b/1475/CH8/EX8.2/Example_8_2.sce new file mode 100755 index 000000000..d1cd8471c --- /dev/null +++ b/1475/CH8/EX8.2/Example_8_2.sce @@ -0,0 +1,8 @@ +//Example 8.2 Calculate Standarised Death Rates for Town I and Town II.
+clc;
+clear;
+T1=[30 5 6 24];
+T2=[25 6 5 28];
+Std_pop=[2200 3000 2700 2100];
+disp(Std_pop,"Standard Population =",T2,"Town II Specific death Rate =",T1,"Town I Specific death Rate =");
+disp(sum(T2.*Std_pop)/sum(Std_pop),"Standarised Death Rate for Town II =",sum(T1.*Std_pop)/sum(Std_pop),"Standarised Death Rate for ");
diff --git a/1475/CH8/EX8.2/Output_8_2.PNG b/1475/CH8/EX8.2/Output_8_2.PNG Binary files differnew file mode 100755 index 000000000..123bd1cd2 --- /dev/null +++ b/1475/CH8/EX8.2/Output_8_2.PNG diff --git a/1475/CH8/EX8.3/Example_8_3.sce b/1475/CH8/EX8.3/Example_8_3.sce new file mode 100755 index 000000000..e175db6b8 --- /dev/null +++ b/1475/CH8/EX8.3/Example_8_3.sce @@ -0,0 +1,15 @@ +// Given that the crude death rate of standard population
+clc;
+clear;
+P=[9736 8349 17101 37298 20746 6298 472 ];
+M=[8.90 1.19 1.07 2.22 5.21 6.32 38.98];
+CDR_std_pop=37.4
+CDR_city=37.14+(10/100)*37.4;
+disp(sum(P),"Total Population of city A = ",M,"Mortality of Standard Population =",CDR_city,"CDR Death Rate of City=",CDR_std_pop,"CDR Death Rate of Standard Population ");
+PxMx_Mx=(sum(P.*M)/sum(P));
+//disp(PxMx_Mx)
+Adj_fact=(CDR_std_pop)/(PxMx_Mx*10);
+Adj_Death_rate=CDR_city*(Adj_fact);
+disp(Adj_Death_rate,"Adjusted Death Rate= ");
+
+
diff --git a/1475/CH8/EX8.3/Output_8_3.PNG b/1475/CH8/EX8.3/Output_8_3.PNG Binary files differnew file mode 100755 index 000000000..c9fb534a0 --- /dev/null +++ b/1475/CH8/EX8.3/Output_8_3.PNG diff --git a/1475/CH8/EX8.5/Example_8_5.sce b/1475/CH8/EX8.5/Example_8_5.sce new file mode 100755 index 000000000..2e62324b5 --- /dev/null +++ b/1475/CH8/EX8.5/Example_8_5.sce @@ -0,0 +1,14 @@ +//Example 8.5 From the life table we have the following table
+clc;
+clear;
+I40=81685;
+I50= 74528;
+I60=62170;
+I70=42091;
+P1=I60/I40;
+P2=I70/I50;
+disp(P1,"Probab. that Smith survives 20 years is = ");
+disp(P2,"Probab. that Jones aged 50 years, survives 20 years is = ");
+disp(P1*P2,"So the required probability such that Partnership will continue undissolved = ");
+disp((1-P1)*P2,"Probability that in the next 20 years Smith will die but Jones survive = ");
+
diff --git a/1475/CH8/EX8.5/Output_8_5.PNG b/1475/CH8/EX8.5/Output_8_5.PNG Binary files differnew file mode 100755 index 000000000..aacc19dca --- /dev/null +++ b/1475/CH8/EX8.5/Output_8_5.PNG diff --git a/1475/CH8/EX8.6/Example_8_6.sce b/1475/CH8/EX8.6/Example_8_6.sce new file mode 100755 index 000000000..9df7414e7 --- /dev/null +++ b/1475/CH8/EX8.6/Example_8_6.sce @@ -0,0 +1,9 @@ +// Example 8.6 In 1981 a city had a total of 507
+clc;
+clear;
+total_births=507000;
+total_population=27512000;
+total_female=7576000;
+crude_br=(total_births/total_population)*1000;
+general_fr=(total_births/total_female)*1000;
+disp(general_fr,"General Fertility rate per thousand =",crude_br,"Crude Birth Rate per thousand = ",total_female,"Total Female Population = ",total_population,"Total Population =",total_births,"Total Births =");
diff --git a/1475/CH8/EX8.6/Output_8_6.PNG b/1475/CH8/EX8.6/Output_8_6.PNG Binary files differnew file mode 100755 index 000000000..28b299b70 --- /dev/null +++ b/1475/CH8/EX8.6/Output_8_6.PNG diff --git a/1475/CH8/EX8.7/Example_8_7.sce b/1475/CH8/EX8.7/Example_8_7.sce new file mode 100755 index 000000000..3ba07f538 --- /dev/null +++ b/1475/CH8/EX8.7/Example_8_7.sce @@ -0,0 +1,13 @@ +//Example 8.7 Calculate General fertility Rate
+clc;
+clear;
+No_of_female=4300;
+No_of_Women=[25000 24000 20000 16000 15000 12000 8000];
+No_of_Live_Births=[1140 3000 2740 1360 600 150 10];
+Total_No_of_Women=sum(No_of_Women);
+Total_No_of_Live_Births=sum(No_of_Live_Births);
+G_F_R=Total_No_of_Live_Births/Total_No_of_Women;
+S_F_R=No_of_Live_Births./No_of_Women;
+T_F_R=sum(S_F_R)*5;
+G_R_R=(No_of_female/Total_No_of_Live_Births)*T_F_R;
+disp(G_R_R,"Gross Reproduction Rate =",T_F_R,"Total Fertility Rate =",S_F_R,"Specific Fertility Rate =",G_F_R,"General Fertility Rate =",Total_No_of_Live_Births,"Total_No_of_Live_Births",Total_No_of_Women,"Total_No_of_Women");
diff --git a/1475/CH8/EX8.7/Output_8_7.PNG b/1475/CH8/EX8.7/Output_8_7.PNG Binary files differnew file mode 100755 index 000000000..ef1ee6f76 --- /dev/null +++ b/1475/CH8/EX8.7/Output_8_7.PNG diff --git a/1475/CH8/EX8.8/Example_8_8.sce b/1475/CH8/EX8.8/Example_8_8.sce new file mode 100755 index 000000000..dd094c368 --- /dev/null +++ b/1475/CH8/EX8.8/Example_8_8.sce @@ -0,0 +1,9 @@ +//Example 8.8 Calculate the Gross Reproduction Rate Reproduction Rate and Net
+clc;
+clear;
+N=[0.22 0.40 0.38 0.30 0.20 0.07 0.02];
+SR=[0.75 0.71 0.69 0.66 0.61 0.55 0.50];
+GRR=sum(N);
+NRR=sum(N.*SR);
+disp(NRR,"Net Reproduction Rate =",GRR,"Gross Reproduction Rate",SR,"Survival Rate for New born Females upto Begining of Age interval",N,"No. of Female Children borne per Woman");
+
diff --git a/1475/CH8/EX8.8/Output_8_8.PNG b/1475/CH8/EX8.8/Output_8_8.PNG Binary files differnew file mode 100755 index 000000000..9520ee463 --- /dev/null +++ b/1475/CH8/EX8.8/Output_8_8.PNG diff --git a/1475/CH8/EX8.9/Example_8_9.sce b/1475/CH8/EX8.9/Example_8_9.sce new file mode 100755 index 000000000..55669b509 --- /dev/null +++ b/1475/CH8/EX8.9/Example_8_9.sce @@ -0,0 +1,11 @@ +//Example 8.9 From the following table calculate TFR GRR NRR
+clc;
+clear;
+R=0.48;
+BR=[23.6 114.9 145.1 122.6 79.6 35.9 3.3];
+YL=[4482 4426 4359 4288 4202 4100 3979];
+SRR=BR./1000;
+TFR=sum(SRR)*5;
+GRR=R*TFR;
+NRR=(R*sum(SRR.*YL))/1000;
+disp(NRR,"Net Reproduction Rate =",GRR,"Gross Reproduction Rate =",TFR,"Total Fertility Rate =",SRR,"Age Specific Fertility Rate =",YL,"Years Lived by 1000 Females =",BR,"Birth Rates per 1000 Women",R,"Ratio of females to total birth is =");
diff --git a/1475/CH8/EX8.9/Output_8_9.PNG b/1475/CH8/EX8.9/Output_8_9.PNG Binary files differnew file mode 100755 index 000000000..261cf5e4e --- /dev/null +++ b/1475/CH8/EX8.9/Output_8_9.PNG diff --git a/1475/CH9/EX9.1/Example_9_1.sce b/1475/CH9/EX9.1/Example_9_1.sce new file mode 100755 index 000000000..2ebf37ae0 --- /dev/null +++ b/1475/CH9/EX9.1/Example_9_1.sce @@ -0,0 +1,10 @@ +// Example 9.1 In order to construct a control a contol Chart
+clc;
+clear;
+n=10;
+R=0.20;
+X=8.25;
+A2=0.308;
+UCL=X+(A2*R);
+LCL=X-(A2*R);
+disp(LCL,"Lower Control Limit =",UCL,"Upper Control Limit",A2,"Constant of conversion =",n," Sample Size =");
diff --git a/1475/CH9/EX9.1/Output_9_1.PNG b/1475/CH9/EX9.1/Output_9_1.PNG Binary files differnew file mode 100755 index 000000000..ba26c0bb5 --- /dev/null +++ b/1475/CH9/EX9.1/Output_9_1.PNG diff --git a/1475/CH9/EX9.3/Example_9_3.sce b/1475/CH9/EX9.3/Example_9_3.sce new file mode 100755 index 000000000..53120dff1 --- /dev/null +++ b/1475/CH9/EX9.3/Example_9_3.sce @@ -0,0 +1,34 @@ +// Example 9.3 The table below shows the thickness of mica discs produced in a machine
+clc;
+clear;
+S1=[13 8 12 15 8];
+S2=[14 12 18 19 10];
+S3=[11 10 8 16 9];
+S4=[14 10 12 9 13];
+S5=[12 10 12 13 7];
+S6=[10 12 8 10 8];
+S7=[10 16 8 8 10];
+S8=[8 12 10 8 10];
+S9=[13 8 11 14 7];
+S10=[5 8 9 5 10];
+S=[S1 ; S2 ; S3 ;S4 ; S5; S6; S7; S8; S9; S10];
+Total=0;
+n=10;
+for i=1:n
+ Total=sum(S(i))+Total;
+end
+Mean=0;
+for i=1:n
+ Mean=sum(S(i))/5+Total;
+end
+X=Mean/n;
+R=6.3;
+A2=0.577;
+D4=2.115;
+D3=0;
+UCL=X+(A2*R);
+LCL=X-(A2*R);
+UCLR=D4*R;
+LCLR=D3*R;
+disp(LCLR,"Lower Control Limit for Range",UCLR,"Upper Control Limit for Range",LCL,"Lower Control Limit for Mean =",UCL,"Upper Control Limit for Mean",A2,"Constant of conversion =",n," Sample Size =");
+
diff --git a/1475/CH9/EX9.3/Output_9_3.PNG b/1475/CH9/EX9.3/Output_9_3.PNG Binary files differnew file mode 100755 index 000000000..22305f0ab --- /dev/null +++ b/1475/CH9/EX9.3/Output_9_3.PNG diff --git a/1475/CH9/EX9.4/Example_9_4.sce b/1475/CH9/EX9.4/Example_9_4.sce new file mode 100755 index 000000000..bc3c2f34f --- /dev/null +++ b/1475/CH9/EX9.4/Example_9_4.sce @@ -0,0 +1,9 @@ +//Example 9.4 Based on 15 subgroups each of size 200 taken at intervals
+clc;
+clear;
+n=200;
+p=0.068;
+CL=p;
+UCL=p+3*(sqrt((p*(1-p)/n)));
+LCL=p-3*(sqrt((p*(1-p)/n)));
+disp(LCL,"Lower Control Limit =",UCL,"Upper Control Limit",CL,"Centre Line = ",p,"Average fraction defective =",n," Sample Size =");
diff --git a/1475/CH9/EX9.4/Output_9_4.PNG b/1475/CH9/EX9.4/Output_9_4.PNG Binary files differnew file mode 100755 index 000000000..8d6845dab --- /dev/null +++ b/1475/CH9/EX9.4/Output_9_4.PNG diff --git a/1475/CH9/EX9.5/Example_9_5.sce b/1475/CH9/EX9.5/Example_9_5.sce new file mode 100755 index 000000000..b55743d7d --- /dev/null +++ b/1475/CH9/EX9.5/Example_9_5.sce @@ -0,0 +1,17 @@ +// Example 9.5
+clc;
+clear;
+k=18;
+n=10;
+X=595.8;
+S=8.28;
+A1=1.03;
+B3=0.28;
+B4=1.72;
+CLM=X/k;
+CLSD=S/k;
+UCLM=CLM+(A1*CLSD);
+LCLM=CLM-(A1*CLSD);
+UCLS=B3*CLSD;
+LCLS=B4*CLSD;
+disp(LCLS,"Lower Control Limit for Standard Deviation",UCLS,"Upper Control Limit for Standard Deviation",LCLM,"Lower Control Limit for Mean =",UCLM,"Upper Control Limit for Mean",A1,"Constant of conversion =",n," Sample Size =",k,"No. of samples ");
diff --git a/1475/CH9/EX9.5/Output_9_5.PNG b/1475/CH9/EX9.5/Output_9_5.PNG Binary files differnew file mode 100755 index 000000000..b03cd6188 --- /dev/null +++ b/1475/CH9/EX9.5/Output_9_5.PNG diff --git a/1475/CH9/EX9.6/Example_9_6.sce b/1475/CH9/EX9.6/Example_9_6.sce new file mode 100755 index 000000000..8886d38ee --- /dev/null +++ b/1475/CH9/EX9.6/Example_9_6.sce @@ -0,0 +1,11 @@ +// Example 9.6 Measurements on average x and range
+clc;
+clear;
+S_D=3.017;
+x=99.6;
+R=7.0;
+n=5;
+SE=S_D/sqrt(n);
+UCL=x+3*(S_D/sqrt(n));
+LCL=x-3*(S_D/sqrt(n));
+disp(LCL,"Lower Control Limit =",UCL,"Upper Control Limit",SE,"Standard Error = ",x,"Mean Average =",R,"Mean Range =",n," Sample Size =");
diff --git a/1475/CH9/EX9.6/Output_9_6.PNG b/1475/CH9/EX9.6/Output_9_6.PNG Binary files differnew file mode 100755 index 000000000..bf5796205 --- /dev/null +++ b/1475/CH9/EX9.6/Output_9_6.PNG diff --git a/1475/CH9/EX9.7/Example_9_7.sce b/1475/CH9/EX9.7/Example_9_7.sce new file mode 100755 index 000000000..5061c548d --- /dev/null +++ b/1475/CH9/EX9.7/Example_9_7.sce @@ -0,0 +1,11 @@ +//Example 9.7 The following figures give the number of defectives in 20 sample
+clc;
+clear;
+Total=40000;
+Def=sum([425 430 216 341 225 322 280 306 337 305 356 402 216 264 126 409 193 326 280 390]);
+p=Def/Total;
+CL=p;
+n=2000;
+UCL=p+3*(sqrt((p*(1-p)/n)));
+LCL=p-3*(sqrt((p*(1-p)/n)));
+disp(LCL,"Lower Control Limit =",UCL,"Upper Control Limit",CL,"Centre Line = ",p,"Average fraction defective =",n,"Sample Items to be checked =",Total," Total No. of Samples =",Def,"Total defective identified =");
diff --git a/1475/CH9/EX9.7/Output_9_7.PNG b/1475/CH9/EX9.7/Output_9_7.PNG Binary files differnew file mode 100755 index 000000000..d951de8af --- /dev/null +++ b/1475/CH9/EX9.7/Output_9_7.PNG diff --git a/1475/CH9/EX9.9/Example_9_9.sce b/1475/CH9/EX9.9/Example_9_9.sce new file mode 100755 index 000000000..3f8c6e864 --- /dev/null +++ b/1475/CH9/EX9.9/Example_9_9.sce @@ -0,0 +1,10 @@ +// Examcle 9.9 The following are the numbers of defects noted in 20 hundred
+clc;
+clear;
+Total=20;
+Def=sum([3 3 6 3 0 1 3 5 7 8 4 10 5 5 4 3 4 5 4 1]);
+c=Def/Total;
+CL=c;
+UCL=c+3*(sqrt(c));
+LCL=c-3*(sqrt(c));
+disp(LCL,"Lower Control Limit =",UCL,"Upper Control Limit",CL,"Centre Line = ",Total," Total No. of Samples =",Def,"Total defective items =");
diff --git a/1475/CH9/EX9.9/Output_9_9.PNG b/1475/CH9/EX9.9/Output_9_9.PNG Binary files differnew file mode 100755 index 000000000..0227224f4 --- /dev/null +++ b/1475/CH9/EX9.9/Output_9_9.PNG |