Watch this Author's files
Sorry, my mistake: pj are effectively different. But kj and zj are not.
With j=2, sum(x.*(m-x)) yields two identical values. As observers can choose only between category 1 or category 2, n votes for cat 1 induce m-n votes for cat 2.
Parameter b=pj.*(1-pj) yields also 2 identical values with j=2.
I am wrong ?
I tried your code with only 2 categories (so j=2). For all various set of data tested, I always got identical values for k1 and k2, p1 and p2...
Is it theoretically normal or not ? when j=2, k1=k2 ?
Thank you for your answer.