Analysis of Error Correction by Majority Voting