Answer: 0.5
We are given that a∈{0,1}n is a non-zero vector. This means that at least one component of a is equal to 1. Let k be the number of ones in a, where 1≤k≤n.
Let the indices where ai=1 be i1,i2,…,ik. The sum can be simplified as:
i=1∑naixi=j=1∑kxij
Since x is chosen uniformly at random from {0,1}n, each component xi is an independent Bernoulli random variable with:
P(xi=1)=P(xi=0)=21
The sum of these k independent random variables is odd if and only if an odd number of them are equal to 1. The probability of this event is given by:
P(j=1∑kxij is odd)=r is odd∑(rk)(21)r(21)k−r
=(21)kr is odd∑(rk)
Using the binomial identity for the sum of odd binomial coefficients for k≥1:
r is odd∑(rk)=2k−1
Substituting this back into the probability expression:
P(i=1∑naixi is odd)=(21)k⋅2k−1=2k2k−1=21=0.5