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 /2606/CH6 | |
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 '2606/CH6')
-rwxr-xr-x | 2606/CH6/EX6.14/ex6_14.jpg | bin | 0 -> 13693 bytes | |||
-rwxr-xr-x | 2606/CH6/EX6.14/ex6_14.sce | 49 | ||||
-rwxr-xr-x | 2606/CH6/EX6.16/ex6_16.jpg | bin | 0 -> 12686 bytes | |||
-rwxr-xr-x | 2606/CH6/EX6.16/ex6_16.sce | 21 | ||||
-rwxr-xr-x | 2606/CH6/EX6.17/ex6_17.jpg | bin | 0 -> 8341 bytes | |||
-rwxr-xr-x | 2606/CH6/EX6.17/ex6_17.sce | 25 | ||||
-rwxr-xr-x | 2606/CH6/EX6.20/ex6_20.jpg | bin | 0 -> 10284 bytes | |||
-rwxr-xr-x | 2606/CH6/EX6.20/ex6_20.sce | 28 | ||||
-rwxr-xr-x | 2606/CH6/EX6.23/ex6_23.jpg | bin | 0 -> 5052 bytes | |||
-rwxr-xr-x | 2606/CH6/EX6.23/ex6_23.sce | 17 | ||||
-rwxr-xr-x | 2606/CH6/EX6.41/ex6_41.jpg | bin | 0 -> 16049 bytes | |||
-rwxr-xr-x | 2606/CH6/EX6.41/ex6_41.sce | 28 | ||||
-rwxr-xr-x | 2606/CH6/EX6.7/ex6_7.jpg | bin | 0 -> 5189 bytes | |||
-rwxr-xr-x | 2606/CH6/EX6.7/ex6_7.sce | 13 |
14 files changed, 181 insertions, 0 deletions
diff --git a/2606/CH6/EX6.14/ex6_14.jpg b/2606/CH6/EX6.14/ex6_14.jpg Binary files differnew file mode 100755 index 000000000..7febdc216 --- /dev/null +++ b/2606/CH6/EX6.14/ex6_14.jpg diff --git a/2606/CH6/EX6.14/ex6_14.sce b/2606/CH6/EX6.14/ex6_14.sce new file mode 100755 index 000000000..7fc8eeb2a --- /dev/null +++ b/2606/CH6/EX6.14/ex6_14.sce @@ -0,0 +1,49 @@ +//Page Number: 6.18
+//Example 6.14
+clc;
+//Given
+p=0.1;
+q=0.2;
+Pm0=0.5;
+Pr1bym0=p;
+Pr0bym1=q;
+
+//(a) Find Pr0 and Pr1
+
+Pm1=1-Pm0;
+Pr0bym0=1-Pr1bym0;
+Pr1bym1=1-Pr0bym1;
+
+//By formula
+//P(r0)=(P(r0/m0)*P(m0))+(P(r0/m1)*P(m1);
+//P(r1)=(P(r1/m0)*P(m0))+(P(r1/m1)*P(m1);
+
+Pr0=(Pr0bym0*Pm0)+(Pr0bym1*Pm1);
+Pr1=(Pr1bym0*Pm0)+(Pr1bym1*Pm1);
+disp(Pr0,'P(r0):');
+disp(Pr1,'P(r1):');
+
+//(b)P(m0/r0)
+//Using Bayes Rule
+//P(m0/r0)=(P(m0)*P(r0/m0)/P(r0))
+Pm0byr0=(Pm0*Pr0bym0)/Pr0;
+disp(Pm0byr0,'P(m0/r0):');
+
+//(c)P(m1/r1)
+//Using Bayes Rule
+//P(m1/r1)=(P(m1)*P(r1/m1)/P(r1))
+Pm1byr1=(Pm1*Pr1bym1)/Pr1;
+disp(Pm1byr1,'P(m1/r1):');
+
+//(d)Probabilty error
+//As Pe=(P(r1/m0)*P(m0))+(P(r0/m1)*P(m1))
+Pe=(Pr1bym0*Pm0)+(Pr0bym1*Pm1);
+disp(Pe,'Probability error:');
+
+//(e)Probabilty that is transmitted correctly
+//As Pc=(P(r0/m0)*P(m0))+(Pr1bym1*Pm1)
+
+Pc=(Pr0bym0*Pm0)+(Pr1bym1*Pm1);
+disp(Pc,'Probabilty that is transmitted correctly:');
+
+
diff --git a/2606/CH6/EX6.16/ex6_16.jpg b/2606/CH6/EX6.16/ex6_16.jpg Binary files differnew file mode 100755 index 000000000..ee3ccb903 --- /dev/null +++ b/2606/CH6/EX6.16/ex6_16.jpg diff --git a/2606/CH6/EX6.16/ex6_16.sce b/2606/CH6/EX6.16/ex6_16.sce new file mode 100755 index 000000000..7eec4f642 --- /dev/null +++ b/2606/CH6/EX6.16/ex6_16.sce @@ -0,0 +1,21 @@ +//Page Number: 6.21
+//Example 6.16
+clc;
+//Given
+p=0.4;
+Pp=p;
+q=0.3;
+Pn=q;
+a=1; //i start value
+b=6; //i end value
+//(a)Probabilty that all pulses are positive
+s=1;
+for i=a:b
+ s=s*Pp;
+ end
+disp(s,'Probabilty that all pulses are positive:');
+
+//(b)Pulses are positive ,positive, positive, zero,zero,negative
+Pz=1-(p+q);
+s1=(Pp^3)*(Pz^2)*Pn;
+disp(s1,'Probabilty that all pulses are positive ,positive, positive, zero,zero,negative:');
diff --git a/2606/CH6/EX6.17/ex6_17.jpg b/2606/CH6/EX6.17/ex6_17.jpg Binary files differnew file mode 100755 index 000000000..814744e65 --- /dev/null +++ b/2606/CH6/EX6.17/ex6_17.jpg diff --git a/2606/CH6/EX6.17/ex6_17.sce b/2606/CH6/EX6.17/ex6_17.sce new file mode 100755 index 000000000..ed65b6d0d --- /dev/null +++ b/2606/CH6/EX6.17/ex6_17.sce @@ -0,0 +1,25 @@ +//Page Number: 6.21
+//Example 6.17
+clc;
+//Given
+P1=0.6;
+P0=0.4;
+n=5; //Five digit sequence
+j=2; //two outcomes 0 and 1
+
+//(a)1,1,0,0,0
+xf=(factorial(n))/((factorial(j))*(factorial(n-j)));
+s=xf*(P1^j)*(P0^(n-j));
+disp(s,'Probability for 1,1,0,0,0:');
+
+//(b)atleast 3 1's
+//P(X>=3)=1-P(X<=2)
+//Here y=1-x
+x=0;
+for k=0:2
+ f=(factorial(n))/((factorial(k))*(factorial(n-k)));
+ x=x+{f*((P1^k)*(P0^(n-k)))};
+end
+y=1-x;
+disp(y,'Probability for atleast three 1 s:');
+
diff --git a/2606/CH6/EX6.20/ex6_20.jpg b/2606/CH6/EX6.20/ex6_20.jpg Binary files differnew file mode 100755 index 000000000..dcf20523b --- /dev/null +++ b/2606/CH6/EX6.20/ex6_20.jpg diff --git a/2606/CH6/EX6.20/ex6_20.sce b/2606/CH6/EX6.20/ex6_20.sce new file mode 100755 index 000000000..78132ef6c --- /dev/null +++ b/2606/CH6/EX6.20/ex6_20.sce @@ -0,0 +1,28 @@ +//Page Number: 6.23
+//Example 6.20
+clc;
+//Given
+pe=0.01; //Error probability
+
+//(a) Probabilty of more than one error in 10 recieved digits
+n=10;
+//As P(X>1)=1-P(X=0)-P(X=1)
+//Let x=P(X>1)
+//s=P(X=0)+P(X=1)
+s=0;
+for t=0:1
+ f=(factorial(n))/((factorial(t))*(factorial(n-t)));
+ s=s+{f*(pe^t)*((1-pe)^(n-t))};
+end
+x=1-s;
+disp(x,'Probabilty of more than one error in 10 recieved digits:');
+
+//(b)Using Poisson approximation
+//P(X=k)~[{(%exp)^(-n*p)}*{((n*p)^k)}]/k factorial
+s1=0;
+for k=0:1
+ j=factorial(k);
+ s1=s1+[{exp(-n*pe)}*{((n*pe)^k)}]/j;
+end
+x1=1-s1;
+disp(x1,'Using Poisson Approximation:');
diff --git a/2606/CH6/EX6.23/ex6_23.jpg b/2606/CH6/EX6.23/ex6_23.jpg Binary files differnew file mode 100755 index 000000000..a1f2eec03 --- /dev/null +++ b/2606/CH6/EX6.23/ex6_23.jpg diff --git a/2606/CH6/EX6.23/ex6_23.sce b/2606/CH6/EX6.23/ex6_23.sce new file mode 100755 index 000000000..13aec3daa --- /dev/null +++ b/2606/CH6/EX6.23/ex6_23.sce @@ -0,0 +1,17 @@ +//Page Number: 6.23
+//Example 6.23
+clc;
+//We find, k=1/(b-a)
+//(b) if a=1 and b=2,P(|x|<c) where c=1/2
+a=-1;
+b=2;
+c=1/2;
+
+k=1/(b-a);
+//P(|x|<c) = P(-c<=x<=c)
+//Let y
+x0=-c;x1=c;
+y=integrate('1','x',x0,x1);
+y1=k*y;
+disp(y1,'P(|x|<c):');
+
diff --git a/2606/CH6/EX6.41/ex6_41.jpg b/2606/CH6/EX6.41/ex6_41.jpg Binary files differnew file mode 100755 index 000000000..97f9b5046 --- /dev/null +++ b/2606/CH6/EX6.41/ex6_41.jpg diff --git a/2606/CH6/EX6.41/ex6_41.sce b/2606/CH6/EX6.41/ex6_41.sce new file mode 100755 index 000000000..e189c87cf --- /dev/null +++ b/2606/CH6/EX6.41/ex6_41.sce @@ -0,0 +1,28 @@ +//Page Number: 6.34
+//Example 6.41
+clc;
+//Given
+n=16; //binary digits
+p=0.01; //Probabilty error due to noise
+
+//(a) Average errors per block
+//E(X)=n*p
+EofX=n*p;
+disp(EofX,'Average errors per block:');
+
+//(b)Varience of errors of block
+//s=n*p*(1-p)
+s=n*p*(1-p);
+disp(s,'Varience of errors per block:');
+
+
+//(c) Probability that number of errors per block is bgeater or equal than 4
+i=4;
+//AsP(X>=4)=1=P(X<=3)
+P3=0;
+for k=0:3;
+ f=(factorial(n))/((factorial(k))*(factorial(n-k)));
+ P3=P3+(f*(p^k)*((1-p)^(n-k)));
+end
+P4=1-P3;
+disp(P4,'Probability that number of errors per block is bgeater or equal than 4:');
diff --git a/2606/CH6/EX6.7/ex6_7.jpg b/2606/CH6/EX6.7/ex6_7.jpg Binary files differnew file mode 100755 index 000000000..f94433268 --- /dev/null +++ b/2606/CH6/EX6.7/ex6_7.jpg diff --git a/2606/CH6/EX6.7/ex6_7.sce b/2606/CH6/EX6.7/ex6_7.sce new file mode 100755 index 000000000..3dd719819 --- /dev/null +++ b/2606/CH6/EX6.7/ex6_7.sce @@ -0,0 +1,13 @@ +//Page Number: 6.16
+//Example 6.7
+clc;
+//Given
+//Pdot=2*Pdash and Pdot+Pdash=1
+//Therfore, on solving using linear equations
+a=[1 -2;1 1];
+c=[0;1];
+b=inv(a)*c;
+Pdash=b(1,1);
+Pdot=b(2,1);
+disp(Pdot,'Pdot:');
+disp(Pdash,'Pdash:')
|