diff options
Diffstat (limited to '149/CH35')
-rwxr-xr-x | 149/CH35/EX34.15/ex15.sce | 37 | ||||
-rwxr-xr-x | 149/CH35/EX35.1/example1.sce | 14 | ||||
-rwxr-xr-x | 149/CH35/EX35.10/ex10.sce | 13 | ||||
-rwxr-xr-x | 149/CH35/EX35.12/ex12.sce | 30 | ||||
-rwxr-xr-x | 149/CH35/EX35.13/ex13.sce | 10 | ||||
-rwxr-xr-x | 149/CH35/EX35.2/ex2.sce | 14 | ||||
-rwxr-xr-x | 149/CH35/EX35.3/ex3.sce | 8 | ||||
-rwxr-xr-x | 149/CH35/EX35.4/ex4.sce | 14 | ||||
-rwxr-xr-x | 149/CH35/EX35.5/ex5.sce | 14 | ||||
-rwxr-xr-x | 149/CH35/EX35.6/ex6.sce | 10 | ||||
-rwxr-xr-x | 149/CH35/EX35.9/ex9.sce | 11 |
11 files changed, 175 insertions, 0 deletions
diff --git a/149/CH35/EX34.15/ex15.sce b/149/CH35/EX34.15/ex15.sce new file mode 100755 index 000000000..286953621 --- /dev/null +++ b/149/CH35/EX34.15/ex15.sce @@ -0,0 +1,37 @@ +clear
+clc
+n=11
+disp('the first row denotes the boy no. ')
+A(1,:)=[1 2 3 4 5 6 7 8 9 10 11];
+disp('the second row denotes the marks in test I (x1) ')
+A(2,:)=[23 20 19 21 18 20 18 17 23 16 19];
+disp('the third row denotes the marks in test I (x2) ')
+A(3,:)=[24 19 22 18 20 22 20 20 23 20 17];
+disp('the fourth row denotes the difference of marks in two tests (d)')
+for i=1:11
+ A(4,i)=A(3,i)-A(2,i);
+end
+disp('the fifth row denotes the (d-1) ')
+for i=1:11
+ A(5,i)=A(4,i)-1;
+end
+disp('the sixth row denotes the square of elements of fourth row')
+for i=1:11
+ A(6,i)=A(4,i)^2;
+end
+A
+a=0;
+disp('the sum of elements of fourth row= ')
+for i=1:11
+ a=a+A(4,i);
+end
+a
+b=0;
+disp('the sum of elements of sixth row= ')
+for i=1:11
+ b=b+A(6,i);
+end
+b
+disp('standard deviation')
+d=(b/(n-1))^0.5
+t=(1-0)*(n)^0.5/2.24
\ No newline at end of file diff --git a/149/CH35/EX35.1/example1.sce b/149/CH35/EX35.1/example1.sce new file mode 100755 index 000000000..f608bdd30 --- /dev/null +++ b/149/CH35/EX35.1/example1.sce @@ -0,0 +1,14 @@ +clc
+disp('suppose the coin is unbiased ')
+disp('then probability of getting the head in a toss=1/2')
+disp('then,expected no. of successes=a=1/2*400 ')
+a=1/2*400
+disp('observed no. of successes =216')
+b=216
+disp('the excess of observed value over expected value=')
+b-a
+disp('S.D. of simple sampling = (n*p*q)^0.5=c')
+c=(400*0.5*0.5)^0.5
+disp('hence,z=(b-a)/c=')
+(b-a)/c
+disp('as z<1.96,the hypothesis is accepted at 5% level of significance')
\ No newline at end of file diff --git a/149/CH35/EX35.10/ex10.sce b/149/CH35/EX35.10/ex10.sce new file mode 100755 index 000000000..6159bcfc5 --- /dev/null +++ b/149/CH35/EX35.10/ex10.sce @@ -0,0 +1,13 @@ +clc
+disp('m1,d1 and n1 denotes mean,deviation and no. of objects in first sample')
+m1=67.85
+d1=2.56
+n1=6400
+disp('m2,d2 and n2 denotes mean,deviation and no. of objects in second sample')
+m2=68.55
+d2=2.52
+n2=1600
+disp('S.E. of the difference of the mean heights is ')
+e=((d1^2/n1)+(d2^2/n2))^0.5
+m1-m2
+disp('|m1-m2| > 10e,this is highly significant.hence,the data indicates that the sailors are on the average taller than the soldiers.')
\ No newline at end of file diff --git a/149/CH35/EX35.12/ex12.sce b/149/CH35/EX35.12/ex12.sce new file mode 100755 index 000000000..5a9a1a347 --- /dev/null +++ b/149/CH35/EX35.12/ex12.sce @@ -0,0 +1,30 @@ +clear
+clc
+n=9
+disp('first of row denotes the different values of sample ')
+A(1,:)=[45 47 50 52 48 47 49 53 51];
+disp('the second row denotes the corresponding deviation ')
+for i=1:9
+ A(2,i)=A(1,i)-48;
+end
+disp('the third row denotes the corresponding square of deviation')
+for i=1:9
+ A(3,i)=A(2,i)^2;
+end
+disp('the sum of second row elements =')
+a=0;
+for i=1:9
+ a=a+A(2,i);
+end
+a
+disp('the sum of third row elements ")
+b=0;
+for i=1:9
+ b=b+A(3,i);
+end
+b
+disp('let m be the mean ')
+m=48+a/n
+disp('let d be the standard deviation ')
+d=((b/n)-(a/n)^2)^0.5
+t=(m-47.5)*(n-1)^0.5/d
\ No newline at end of file diff --git a/149/CH35/EX35.13/ex13.sce b/149/CH35/EX35.13/ex13.sce new file mode 100755 index 000000000..6150d62e1 --- /dev/null +++ b/149/CH35/EX35.13/ex13.sce @@ -0,0 +1,10 @@ +clc
+disp('d and n represents the deviation and no. of objects in given sample')
+n=10
+d=0.04
+m=0.742
+M=0.700
+disp('taking the hypothesis that the product is not inferior i.e. there is no significant differene between m and M')
+t=(m-M)*(n-1)^0.5/d
+disp('degrees of freedom=')
+f=n-1
\ No newline at end of file diff --git a/149/CH35/EX35.2/ex2.sce b/149/CH35/EX35.2/ex2.sce new file mode 100755 index 000000000..88f30715a --- /dev/null +++ b/149/CH35/EX35.2/ex2.sce @@ -0,0 +1,14 @@ +clc
+disp('suppose the die is unbiased ')
+disp('then probability of getting 5 or 6 with one die=1/3')
+disp('then,expected no. of successes=a=1/3*9000 ')
+a=1/3*9000
+disp('observed no. of successes =3240')
+b=3240
+disp('the excess of observed value over expected value=')
+b-a
+disp('S.D. of simple sampling = (n*p*q)^0.5=c')
+c=(9000*(1/3)*(2/3))^0.5
+disp('hence,z=(b-a)/c=')
+(b-a)/c
+disp('as z>2.58,the hypothesis has to be rejected at 1% level of significance')
\ No newline at end of file diff --git a/149/CH35/EX35.3/ex3.sce b/149/CH35/EX35.3/ex3.sce new file mode 100755 index 000000000..c137110f6 --- /dev/null +++ b/149/CH35/EX35.3/ex3.sce @@ -0,0 +1,8 @@ +clc
+p=206/840
+disp('q=1-p')
+q=1-p
+n=840
+disp('standard error of the population of families having a monthly income of rs. 250 or less=(p*q/n)^0.5=')
+(p*q/n)^0.5
+disp('hence taking 103/420 to be the estimate of families having a monthly income of rs. 250 or less,the limits are 20% and 29% approximately')
\ No newline at end of file diff --git a/149/CH35/EX35.4/ex4.sce b/149/CH35/EX35.4/ex4.sce new file mode 100755 index 000000000..78c66582a --- /dev/null +++ b/149/CH35/EX35.4/ex4.sce @@ -0,0 +1,14 @@ +clear
+clc
+n1=900
+n2=1600
+p1=20/100
+p2=18.5/100
+disp('p=(n1*p1+n2*p2)/(n1+n2) ')
+p=(n1*p1+n2*p2)/(n1+n2)
+disp('q=1-p')
+q=1-p
+disp('e=(p*q*(1/n1+1/n2))^0.5 ')
+e=(p*q*((1/n1)+(1/n2)))^0.5
+z=(p1-p2)/e
+disp('as z<1,the difference between the proportions is not significant.')
diff --git a/149/CH35/EX35.5/ex5.sce b/149/CH35/EX35.5/ex5.sce new file mode 100755 index 000000000..f710de5a2 --- /dev/null +++ b/149/CH35/EX35.5/ex5.sce @@ -0,0 +1,14 @@ +clear
+clc
+p1=0.3
+p2=0.25
+disp('q1=1-p1')
+q1=1-p1
+disp('q2=1-p2')
+q2=1-p2
+n1=1200
+n2=900
+disp('e=((p1*q1/n1)+(p2*q2/n2))^0.5 ')
+e=((p1*q1/n1)+(p2*q2/n2))^0.5
+z=(p1-p2)/e
+disp('hence,it is likely that real difference will be hidden.')
\ No newline at end of file diff --git a/149/CH35/EX35.6/ex6.sce b/149/CH35/EX35.6/ex6.sce new file mode 100755 index 000000000..ee3d4be43 --- /dev/null +++ b/149/CH35/EX35.6/ex6.sce @@ -0,0 +1,10 @@ +clear
+clc
+disp('m and n represents mean and number of objects in sample respectively')
+m=3.4
+n=900
+M=3.25
+d=1.61
+disp('z=(m-M)/(d/(n^0.5)')
+z=(m-M)/(d/(n^0.5))
+disp('as z>1.96,it cannot be regarded as a random sample ")
\ No newline at end of file diff --git a/149/CH35/EX35.9/ex9.sce b/149/CH35/EX35.9/ex9.sce new file mode 100755 index 000000000..2ea0a2181 --- /dev/null +++ b/149/CH35/EX35.9/ex9.sce @@ -0,0 +1,11 @@ +clc
+disp('m1 and n1 represents mean and no. of objects in sample 1')
+disp('m2 and n2 represents mean and no. of objects in sample 2')
+m1=67.5
+m2=68
+n1=1000
+n2=2000
+d=2.5
+disp('on the hypothesis that the samples are drawn from the same population of d=2.5,we get ')
+z=(m1-m2)/(d*((1/n1)+(1/n2))^0.5)
+disp('since |z|> 1.96,thus samples cannot be regarded as drawn from the same population ')
\ No newline at end of file |