Skip to main content
. 2020 May 14;20(10):2785. doi: 10.3390/s20102785
Algorithm 2 Estimation Algorithm.

Input:Y, Yσ, ϵ, minvorg, maxvorg, minvrep, maxvrep, minσrep, maxσrep, bn

Output:‡

  • 1:

    σave←Average(Yσ)  /* Consider σave is the standard deviation of each participant*/

  • 2:

    if standard deviation is considered as private information then

  • 3:

    bv and bσ are calculated by Equations (12) and (13), and set θ={σave,bv,bσ}.

  • 4:

    else

  • 5:

    bv is calculated by Equation (10), and set θ={σave,bv}.

  • 6:

    end if

  • 7:

    w←(maxvrep−minvrep)/bn  /*w represents the width of each bin*/

  • 8:

    x← an arbitrary real number

  • 9:

    left←∫−∞x−w/2F(y;x,θ)dy

  • 10:

    forj=1,…,bndo

  • 11:

    Q(j)←∫x−w/2+(j−1)∗wx−w/2+j∗wF(y;x,θ)dy  /*P(1,j)=Q(j) for j=2,…,bn−1. P(1,1)=left+Q(1). P(1,bn)=Q(bn)+right.*/

  • 12:

    end for

  • 13:

    right←1−left−∑j=1bnQ(j)

  • 14:

    fori=1,…,bndo

  • 15:

     P(i,1)←left+Q(1)−∑j=1i−1Q(j)  /*Note that ∑j=10Q(j)=0*/

  • 16:

     for j=2,…,bn−1 do

  • 17:

      P(i,j)←Q(|i−j|+1)

  • 18:

     end for

  • 19:

    P(i,bn)←∑j=bn−i+1bnQ(j)+right

  • 20:

    end for

  • 21:

    Set †i for each i based on Y.

  • 22:

    for Repeat sufficient times do

  • 23:

     for i=1,…,bn do

  • 24:

      di←0

  • 25:

      for j=1,…,bn do

  • 26:

    di←di+P(k,j)∗‡k  /*Calcuation of the denominator of Equation (5)*/

  • 27:

      end for

  • 28:

     end for

  • 29:

     for i=1,…,bn do

  • 30:

      for j=1,…,bn do

  • 31:

    ‡i′←yj∗P(i,j)/dj

  • 32:

      end for

  • 33:

    ‡i←‡i∗‡i′

  • 34:

     end for

  • 35:

     for i=1,…,bn do

  • 36:

      if i≤⌈minvorg−minvrepw⌉−1OR⌈maxvorg−minvrepw⌉−1≤i then

  • 37:

    ‡i←0

  • 38:

      end if

  • 39:

     end for

  • 40:

    end for