Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Assignment 3 Probability and Statistics I: a binary problem Deadline for delivery: Friday March 27th 2009, 3.30 Binary numbers consist of digits 0 and 1. Suppose we have an arbitrary binary number of 5 of these digits (the probabilities of 0 and 1 are equal). A sequence of identical digits is called a run. Example: 01110 consists of three runs and the length of the largest run is 3. Consider an arbitrary 5-digit binary number: X is the length of the largest run and Y is the number of runs. a. Determine the table of the joint distribution of X and Y. (First list all possible 5-digit binary number and their value of X and Y.) b. Determine the distribution of the length of the longest run, its expected value and its variance. c. Compute the correlation coefficient and give an interpretation of its value. d. Determine E(X | X +Y = 5) and var( X | X+Y = 5) Solutions: a. rij X Y 11111 5 1 11110 4 2 11101 3 3 11011 2 3 10111 3 3 01111 4 2 11100 3 2 11010 2 4 10110 2 4 01110 3 3 11001 2 3 10101 1 5 01101 2 4 10011 2 3 01011 2 4 00111 3 2 P(X=x en Y=y) : rij 00000 00001 00010 00100 01000 10000 00011 00101 01001 10001 00110 01010 10010 01100 10100 11000 x \ y 1 2 3 4 1 0 0 0 0 2 0 0 3 0 2 16 4 0 2 16 5 1 16 0 P(Y=y) 1 16 4 16 X 5 4 3 2 3 4 3 2 2 3 2 1 2 2 2 3 5 1 16 Y 1 2 3 3 3 2 2 4 4 3 3 5 4 3 4 2 P(X=x) xP(X=x) 2 x P( X x ) 1 16 1 16 1 16 0 7 16 14 16 28 16 0 0 5 16 15 16 45 16 0 0 0 2 16 8 16 32 16 0 0 0 1 16 5 16 25 16 3 16 3 16 6 16 4 16 4 16 1 16 1 43 16 E( X ) 131 16 E ( X 2) 2 b. See the computation in the table above. var( X ) E ( X 2) ( EX ) c. E(Y)=3 and var(Y)=1, analogue X 247 256 , so: E ( XY ) xyP( X x Y y) 5 1 161 .... 115 16 115 43 14 cov(X,Y)= E(XY) - E(X)E(Y)= 16 16 3 16 (X ,Y ) cov(X , Y ) X Y 14 16 14 0.8908 247 1 247 256 There is a quite strong negative linear relation between the number of runs and the largest run length (large run length coincide with just a few runs) d. If X+Y = 5, then X can only take on the values 2 0r 3: P(X=2|X+Y=5) = P( X 2 en X Y 5) P( X 2 en Y 3) 3 / 16 0.6 P( X Y 5) P( X Y 5) 3 / 16 2 / 16 And: P(X=3|X+Y=5) = 0.4 So E( X | X Y 5) xP( X x | X Y 5) 2 0.6 3 0.4 2.4 E( X 2 | X Y 5) x 2 P( X x | X Y 5) 4 0.6 9 0.4 2.4 var( X | X+Y = 5)= E(X2 | X +Y = 5) - E(X | X +Y = 5) 2 = 6 – 2.42 = 0.24 Marks: l a b c d points 2 2 3 3 Comment Up to EX: 1 pt , varX: 1 pt E(XY): 1 pt, : 1 pt, interpretation 1 pt Conditional probs 1 pt , E(X|X+Y=5) 1 pt, var(X|X+Y=5) 1 pt