GateAI
Probability and Statistics

GATE CSE 2020 · Q45

NAT2 marksEasy

Time

For n>2n > 2, let a∈{0,1}na \in \{0,1\}^n be a non-zero vector. Suppose that xx is chosen uniformly at random from {0,1}n\{0,1\}^n. Then, the probability that ∑i=1naixi\sum_{i=1}^n a_i x_i is an odd number is _________.

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 0.5

Probability and Statistics

Let S=∑i=1naixiS = \sum_{i=1}^n a_i x_i. The parity of SS is equivalent to computing S(mod2)S \pmod 2.

Since aa is a non-zero binary vector, it has at least one component ak=1a_k = 1.

We can split the sum as: S=akxk+∑iekaixi=xk+∑iekaixiS = a_k x_k + \sum_{i e k} a_i x_i = x_k + \sum_{i e k} a_i x_i

Since xx is chosen uniformly at random from {0,1}n\{0, 1\}^n, the components x1,x2,…,xnx_1, x_2, \dots, x_n are independent and identically distributed Bernoulli random variables with Pr⁡(xi=0)=Pr⁡(xi=1)=12\Pr(x_i = 0) = \Pr(x_i = 1) = \frac{1}{2}.

Conditioning on any choice of (xi)iek(x_i)_{i e k}, the sum ∑iekaixi\sum_{i e k} a_i x_i evaluates to some integer CC. Then:

S=xk+CS = x_k + C

Since xkx_k is independent of (xi)iek(x_i)_{i e k} and takes values 00 and 11 with equal probability 1/21/2: Pr⁡(S is odd∣(xi)iek)=Pr⁡(xk+C is odd)=12\Pr(S \text{ is odd} \mid (x_i)_{i e k}) = \Pr(x_k + C \text{ is odd}) = \frac{1}{2}

By the law of total probability, the overall probability is:

Pr⁡(∑i=1naixi is odd)=0.5\Pr\left(\sum_{i=1}^n a_i x_i \text{ is odd}\right) = 0.5

Thus, the answer is 0.5.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Probability and Statistics previous year question is Q45 of the GATE CSE 2020 paper. Find more GATE CSE PYQs on Probability and Statistics in Engineering Mathematics, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Probability and Statistics PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Probability and Statistics in GATE CSE

Probability and Statistics has 46 GATE CSE PYQs across 23 papers from 2011 to 2026. 15 of them are 2-mark NAT questions like this one, and it is the only one in GATE CSE 2020.

How GATE tests Probability and Statistics

More from GATE CSE 2020

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2020 · Q45 · NAT

For n > 2, let a ∈ {0,1}n be a non-zero vector. Suppose that x is chosen uniformly at random from {0,1}n. Then, the probability that Σi=1n ai xi is an odd number is …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.