GATE DA 2025

65 questions · Previous year paper

The GATE 2025 Data Science and Artificial Intelligence paper: 65 questions for 100 marks in 180 minutes, with General Aptitude (15 marks) and the technical section (85 marks). Answers follow the official final answer key; every question has a short explanation.

Take it as a timed test: ₹49

Data Science and Artificial Intelligence

Question 31

NAT · 1 mark

There are three boxes containing white balls and black balls.

Box-1 contains 2 black and 1 white balls.
Box-2 contains 1 black and 2 white balls.
Box-3 contains 3 black and 3 white balls.

In a random experiment, one of these boxes is selected, where the probability of choosing Box-1 is \(\frac{1}{2}\), Box-2 is \(\frac{1}{6}\), and Box-3 is \(\frac{1}{3}\). A ball is drawn at random from the selected box. Given that the ball drawn is white, the probability that it is drawn from Box-2 is ________(Round off to two decimal places)

Explanation

Answer: 0.25

Let \(W\) be the event that the ball is white. The chance of white from each box is \(\frac{1}{3}\), \(\frac{2}{3}\) and \(\frac{3}{6} = \frac{1}{2}\). By the law of total probability,

\[P(W) = \frac{1}{2}\cdot\frac{1}{3} + \frac{1}{6}\cdot\frac{2}{3} + \frac{1}{3}\cdot\frac{1}{2} = \frac{3}{18} + \frac{2}{18} + \frac{3}{18} = \frac{4}{9}.\]

By Bayes' theorem,

\[P(\text{Box-2} \mid W) = \frac{\frac{1}{6}\cdot\frac{2}{3}}{\frac{4}{9}} = \frac{1/9}{4/9} = \frac{1}{4} = 0.25.\]

Box-2 has the highest share of white balls, but it is the least likely box to be chosen, which keeps its posterior low.

Answer: 0.25

Question 32

NAT · 1 mark

\(\lim\limits_{t \to +\infty} \sqrt{t^{2} + t} - t =\) ________
(Round off to one decimal place)

Explanation

Answer: 0.5

Substituting directly gives the indeterminate form \(\infty - \infty\), so multiply and divide by the conjugate, then divide the numerator and denominator by \(t > 0\):

\[\sqrt{t^{2} + t} - t = \frac{(t^{2} + t) - t^{2}}{\sqrt{t^{2} + t} + t} = \frac{t}{\sqrt{t^{2} + t} + t} = \frac{1}{\sqrt{1 + \frac{1}{t}} + 1}.\]

As \(t \to +\infty\), \(\frac{1}{t} \to 0\), so the limit is \(\frac{1}{1 + 1} = 0.5\). As a check, the expression is about 0.4988 at \(t = 100\).

Answer: 0.5

Question 33

NAT · 1 mark

On a relation named Loan of a bank:

Loan
loan_numberbranch_nameamount
L11Banjara Hills90000
L14Kondapur50000
L15SR Nagar40000
L22SR Nagar25000
L23Balanagar80000
L25Kondapur70000
L19SR Nagar65000

the following SQL query is executed.

SELECT L1.loan_number
FROM Loan L1
WHERE L1.amount > (SELECT MAX (L2.amount)
                   FROM Loan L2
                   WHERE L2.branch_name = 'SR Nagar');

The number of rows returned by the query is __________ (Answer in integer)

Explanation

Answer: 3

The inner query does not use L1, so it produces a single value: the largest SR Nagar amount, \(\max(40000, 25000, 65000) = 65000\).

The outer query keeps the loans whose amount is strictly greater than 65000: L11 (90000), L23 (80000) and L25 (70000). L19 is left out because 65000 is not greater than itself, and every other loan is smaller. So the query returns 3 rows.

Answer: 3

Question 34

NAT · 1 mark

Given data \(\{(-1, 1), (2, -5), (3, 5)\}\) of the form \((x, y)\), we fit a model \(y = wx\) using linear least-squares regression. The optimal value of \(w\) is __________
(Round off to three decimal places)

Explanation

Answer: 0.29

The model has no intercept, so least squares picks \(w\) to minimise \(L(w) = \sum_i (y_i - w x_i)^{2}\). Setting \(L'(w) = -2\sum_i x_i (y_i - w x_i) = 0\) gives

\[w = \frac{\sum_i x_i y_i}{\sum_i x_i^{2}}.\]

Here \(\sum x_i y_i = (-1)(1) + (2)(-5) + (3)(5) = 4\) and \(\sum x_i^{2} = 1 + 4 + 9 = 14\), so \(w = \frac{4}{14} = \frac{2}{7} \approx 0.286\).

Fitting a line with an intercept would give a different slope (about 0.308), but this model is forced through the origin.

Answer: 0.286

Question 35

NAT · 1 mark

The naive Bayes classifier is used to solve a two-class classification problem with class-labels \(y_1, y_2\). Suppose the prior probabilities are \(P(y_1) = \frac{1}{3}\) and \(P(y_2) = \frac{2}{3}\). Assuming a discrete feature space with

\[P(x|y_1) = \frac{3}{4} \quad \text{and} \quad P(x|y_2) = \frac{1}{4}\]

for a specific feature vector \(x\). The probability of misclassifying \(x\) is __________
(Round off to two decimal places)

Explanation

Answer: 0.39 to 0.41

Naive Bayes compares prior times likelihood for the two classes:

  • \(P(y_1)P(x|y_1) = \frac{1}{3} \cdot \frac{3}{4} = \frac{1}{4}\)
  • \(P(y_2)P(x|y_2) = \frac{2}{3} \cdot \frac{1}{4} = \frac{1}{6}\)

So \(P(x) = \frac{1}{4} + \frac{1}{6} = \frac{5}{12}\), giving posteriors \(P(y_1|x) = \frac{3}{5}\) and \(P(y_2|x) = \frac{2}{5}\). The classifier picks the larger posterior, \(y_1\), and it is wrong exactly when \(x\) really belongs to \(y_2\), which has probability \(P(y_2|x) = 0.40\). The larger prior of \(y_2\) is outweighed by the much higher likelihood under \(y_1\).

Answer: 0.40

Question 36

MCQ · 2 marks · −0.66

Let \(Y = Z^{2}\), \(Z = \frac{X - \mu}{\sigma}\), where \(X\) is a normal random variable with mean \(\mu\) and variance \(\sigma^{2}\). The variance of \(Y\) is

Options for Question 36

Explanation

Answer: (B)

Standardising a normal variable gives \(Z \sim N(0, 1)\), so \(E[Z^{2}] = \operatorname{Var}(Z) = 1\). The fourth moment of a standard normal is \(E[Z^{4}] = 3\): its moment generating function \(e^{t^{2}/2}\) has \(t^{4}\) coefficient \(\frac{1}{8}\), and \(4! \cdot \frac{1}{8} = 3\). Therefore

\[\operatorname{Var}(Y) = E[Z^{4}] - \left(E[Z^{2}]\right)^{2} = 3 - 1 = 2.\]

Equivalently, \(Y = Z^{2}\) is chi-squared with 1 degree of freedom, whose variance is twice the degrees of freedom. Option C is \(E[Z^{4}]\) alone, not the variance.

Answer: B

Question 37

MCQ · 2 marks · −0.66

Let \(A \in \mathbb{R}^{n \times n}\) be such that \(A^{3} = A\). Which one of the following statements is ALWAYS correct?

Options for Question 37

Explanation

Answer: (D)

The zero matrix and the identity both satisfy \(A^{3} = A\), and they rule out the first three options: \(A = 0\) is not invertible (A), \(A = I\) has determinant 1 (B), and \(A = 0\) has trace 0 (C).

For (D), multiplying by a matrix never increases rank, so \(\operatorname{rank}(A^{2}) \le \operatorname{rank}(A)\). Also \(A = A^{3} = A \cdot A^{2}\), so \(\operatorname{rank}(A) \le \operatorname{rank}(A^{2})\). The two ranks are therefore always equal.

Another view: \(A\) is diagonalisable with eigenvalues in \(\{-1, 0, 1\}\), and squaring keeps exactly the same eigenvalues non-zero.

Answer: D

Question 38

MCQ · 2 marks · −0.66

Let \(\{x_1, x_2, \ldots, x_n\}\) be a set of linearly independent vectors in \(\mathbb{R}^{n}\). Let the \((i, j)\)-th element of matrix \(A \in \mathbb{R}^{n \times n}\) be given by \(A_{ij} = x_i^{\top} x_j\), \(1 \le i, j \le n\). Which one of the following statements is correct?

Options for Question 38

Explanation

Answer: (A)

Put the vectors in the columns of \(X = [x_1\ x_2\ \cdots\ x_n]\). Then \(A_{ij} = x_i^{\top} x_j\) says \(A = X^{\top} X\), a Gram matrix.

For any non-zero \(z\), \(z^{\top} A z = (Xz)^{\top}(Xz) = \|Xz\|^{2}\). The columns of \(X\) are linearly independent, so \(Xz \ne 0\) and \(z^{\top} A z \gt 0\). Hence \(A\) is positive definite, which rules out (D).

A positive definite matrix has only positive eigenvalues, so \(\det A = (\det X)^{2} \gt 0\) and \(A\) is invertible. Being symmetric, its singular values are these same positive eigenvalues, so 0 is not one of them. Options B and C fail.

Answer: A

Question 39

MCQ · 2 marks · −0.66

Consider the cumulative distribution function (CDF) of a random variable \(X\):

\[F_X(x) = \begin{cases} 0 & x \le -1 \\ \frac{1}{4}(x+1)^{2} & -1 \le x \le 1 \\ 1 & x \ge 1 \end{cases}\]

The value of \(P(X^{2} \le 0.25)\) is

Options for Question 39

Explanation

Answer: (C)

\(X^{2} \le 0.25\) means \(-0.5 \le X \le 0.5\). The CDF has no jumps (it rises continuously from 0 at \(x = -1\) to 1 at \(x = 1\)), so

\[P(-0.5 \le X \le 0.5) = F_X(0.5) - F_X(-0.5) = \frac{(1.5)^{2} - (0.5)^{2}}{4} = \frac{2}{4} = 0.5.\]

Two slips lead to the distractors: \(F_X(0.5) = 0.5625\) alone forgets the lower limit (D), and reading the event as \(|X| \le 0.25\) gives \(F_X(0.25) - F_X(-0.25) = 0.25\) (B).

Answer: C

Question 40

MCQ · 2 marks · −0.66

A random variable \(X\) is said to be distributed as \(Bernoulli(\theta)\), denoted by \(X \sim Bernoulli(\theta)\), if

\[P(X = 1) = \theta, \quad P(X = 0) = 1 - \theta\]

for \(0 \lt \theta \lt 1\). Let \(Y = \sum_{i=1}^{300} X_i\), where \(X_i \sim Bernoulli(\theta)\), \(i = 1, 2, \ldots, 300\) be independent and identically distributed random variables with \(\theta = 0.25\). The value of \(P(60 \le Y \le 90)\), after approximation through Central Limit Theorem, is given by
(Recall that \(\phi(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{x} e^{-\frac{t^{2}}{2}}\, dt\))

Options for Question 40

Explanation

Answer: (A)

\(Y\) is a sum of 300 independent Bernoulli variables with \(\theta = 0.25\), so

  • \(E[Y] = 300 \times 0.25 = 75\);
  • \(\operatorname{Var}(Y) = 300 \times 0.25 \times 0.75 = 56.25\), a standard deviation of \(7.5\).

By the Central Limit Theorem, \(\frac{Y - 75}{7.5}\) is approximately standard normal. The limits standardise to \(\frac{60 - 75}{7.5} = -2\) and \(\frac{90 - 75}{7.5} = 2\), so

\[P(60 \le Y \le 90) \approx \phi(2) - \phi(-2).\]

Option D puts the raw values of \(Y\) into \(\phi\) without standardising.

Answer: A

Questions 31 to 40 of 65