$\DeclareMathOperator{\sgn}{sign}$The perceptron (similarly, logistic regression) of the form $y=\sgn(w^T \cdot x+b)$ is famously known for its inability to solve the XOR problem, meaning it can get only to 75% accuracy.
I'm trying to understand what is its maximal accuracy on a generalized n bit XOR problem, which is the parity problem. The $n$ bit parity function returns, given a vector of $n$ bits, the parity of the number of 1 bits (0 if the number of 1 bits is even, 1 otherwise).
My initial hypothesis was that it should be $1/2+1/(2^n) $, meaning there we can correctly classify half of the points, plus one more.
However I was surprised to realize that the accuracy on the 3bit parity is 75% as well.
So for $n > 2$, empirically I'm getting $ 1/2 + 1/2^{(n-1)} $.
Is that true? What is the proof?