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:

    σaveAverage(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(maxvrepminvrep)/bn  /*w represents the width of each bin*/

  • 8:

    x an arbitrary real number

  • 9:

    leftxw/2F(y;x,θ)dy

  • 10:

    forj=1,,bndo

  • 11:

    Q(j)xw/2+(j1)wxw/2+jwF(y;x,θ)dy  /*P(1,j)=Q(j) for j=2,,bn1. P(1,1)=left+Q(1). P(1,bn)=Q(bn)+right.*/

  • 12:

    end for

  • 13:

    right1leftj=1bnQ(j)

  • 14:

    fori=1,,bndo

  • 15:

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

  • 16:

    for j=2,,bn1 do

  • 17:

      P(i,j)Q(|ij|+1)

  • 18:

    end for

  • 19:

    P(i,bn)j=bni+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:

      di0

  • 25:

      for j=1,,bn do

  • 26:

    didi+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:

    iyjP(i,j)/dj

  • 32:

      end for

  • 33:

    iii

  • 34:

    end for

  • 35:

    for i=1,,bn do

  • 36:

      if iminvorgminvrepw1ORmaxvorgminvrepw1i then

  • 37:

    i0

  • 38:

      end if

  • 39:

    end for

  • 40:

    end for