Skip to content
Official PYQ · 2020

GATE CS 2020 Q45 — Probability: Random Variables and Distributions

Explain with AI
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\displaystyle{} \Sigma_{i=1}^n a_i x_i  is an odd number is______________
View worked solution

Answer: 0.5

We are given that a∈{0,1}na \in \{0,1\}^n is a non-zero vector. This means that at least one component of aa is equal to 11. Let kk be the number of ones in aa, where 1≤k≤n1 \le k \le n.

Let the indices where ai=1a_i = 1 be i1,i2,…,iki_1, i_2, \dots, i_k. The sum can be simplified as: ∑i=1naixi=∑j=1kxij\sum_{i=1}^n a_i x_i = \sum_{j=1}^k x_{i_j}

Since xx is chosen uniformly at random from {0,1}n\{0,1\}^n, each component xix_i is an independent Bernoulli random variable with: P(xi=1)=P(xi=0)=12P(x_i = 1) = P(x_i = 0) = \frac{1}{2}

The sum of these kk independent random variables is odd if and only if an odd number of them are equal to 11. The probability of this event is given by: P(∑j=1kxij is odd)=∑r is odd(kr)(12)r(12)k−rP\left(\sum_{j=1}^k x_{i_j} \text{ is odd}\right) = \sum_{r \text{ is odd}} \binom{k}{r} \left(\frac{1}{2}\right)^r \left(\frac{1}{2}\right)^{k-r} =(12)k∑r is odd(kr)= \left(\frac{1}{2}\right)^k \sum_{r \text{ is odd}} \binom{k}{r}

Using the binomial identity for the sum of odd binomial coefficients for k≥1k \ge 1: ∑r is odd(kr)=2k−1\sum_{r \text{ is odd}} \binom{k}{r} = 2^{k-1}

Substituting this back into the probability expression: P(∑i=1naixi is odd)=(12)k⋅2k−1=2k−12k=12=0.5P\left(\sum_{i=1}^n a_i x_i \text{ is odd}\right) = \left(\frac{1}{2}\right)^k \cdot 2^{k-1} = \frac{2^{k-1}}{2^k} = \frac{1}{2} = 0.5

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Probability: Random Variables and Distributions questions