have a question in the book "introduction to modern cryptography" "introduction to modern cryptography. 2ed" in page 254

"By obtaining sufficiently many estimates and letting $x_{i}$ be the majority value, $A{'}$can ensure that $x_{i}$ is equal to $gl(x, e^{i})$ with probability at least $1-\frac{1}{2n}$. 

Why is the probability $1-\frac{1}{2n}$?
By taking enough samples, it is possible to ensure that the majority value is the correct one with high probability. To prove this, you use Chernoff's bound. Now, the more samples that you take, the higher the probability that the majority value is the correct one (when plugging into Chernoff). So, this is a parameter that you can choose however you want. We choose $1-\frac{1}{2n}$ since this is what we need to finish the proof. There is nothing special at all about it; and you can also get much higher probability by sampling more (but it's not needed). I hope that this is clear now.