% Problem 8.10.2

rightObs        = [14, 30, 36, 68, 43, 43, 30, 14, 10, 6, 4, 1, 1, 0];
rightSum        = sum(rightObs);
rightN          = 0:13;

rightLambda     = sum(rightObs.*rightN)/rightSum;

rightExpect     = rightSum*poisspdf(0:13, rightLambda);
rightExpect(14) = rightSum*(1 - sum(poisspdf(0:12, rightLambda)));

rightTabell     = [rightN; rightObs; rightExpect]';
disp(rightTabell)