Update the bug in personal Bg and global factor calculation

Bug is in the function PAIRWISEweightEvent() when dependence = 1,2