GATE 2026
65 questions
MCQ 33 · MSQ 14 · NAT 181-mark 30 · 2-mark 35
Questions 51–55 of 65
Consider a table Employee(EmpID, TeamID), where the column EmpID (ID of an employee) is the primary key. The column TeamID denotes the team ID of the team of which the employee is a member. TeamID is a NOT NULL column.
We want to display the size of the team (denoted as TeamSize) in which each employee is a member by using SQL. As an example, the desired output for the given Employee table is also shown in tabular form.
Which of the following is/are correct?
We want to display the size of the team (denoted as TeamSize) in which each employee is a member by using SQL. As an example, the desired output for the given Employee table is also shown in tabular form.
Which of the following is/are correct?
One or more options are correct.
Answer: (A)
The team size is found by grouping on . Each employee row is then joined back to the size of its own team using .
(A) is correct. The subquery , , gives one row per team with its size, and keeps the column. Joining with on gives each employee the size of their own team. For the sample table it gives 3, 3, 3, 2, 2, 1.
(B) is wrong. It joins and on as well. Since is the primary key, each employee matches only their own row, so every is 1.
(C) is wrong. It groups by , which is unique, so every count is 1.
(D) is wrong. Its subquery returns only , with no column, so the condition cannot be used. It is invalid SQL.
Answer: (A)
(A) is correct. The subquery , , gives one row per team with its size, and keeps the column. Joining with on gives each employee the size of their own team. For the sample table it gives 3, 3, 3, 2, 2, 1.
(B) is wrong. It joins and on as well. Since is the primary key, each employee matches only their own row, so every is 1.
(C) is wrong. It groups by , which is unique, so every count is 1.
(D) is wrong. Its subquery returns only , with no column, so the condition cannot be used. It is invalid SQL.
Answer: (A)
Let be a matrix, where and is the identity matrix of order .
Which of the following options is/are correct?
Which of the following options is/are correct?
One or more options are correct.
Answer: (A), (D)
is known as the centering matrix.
Check : is symmetric. is an outer product of a vector with itself, so it is always symmetric too. So their difference is symmetric. True.
Check : expand the square to get . We have , so . This gives (and not ). False. M is idempotent, , and not .
Check Trace(M): and (each diagonal entry of is ). So , and not . False.
M is a projection matrix: is symmetric and idempotent (, shown above). This matches the definition of an (orthogonal) projection matrix. Here it projects onto the mean-centered subspace. True.
Answer: Mᵀ=M; and M is a projection matrix.
Check : is symmetric. is an outer product of a vector with itself, so it is always symmetric too. So their difference is symmetric. True.
Check : expand the square to get . We have , so . This gives (and not ). False. M is idempotent, , and not .
Check Trace(M): and (each diagonal entry of is ). So , and not . False.
M is a projection matrix: is symmetric and idempotent (, shown above). This matches the definition of an (orthogonal) projection matrix. Here it projects onto the mean-centered subspace. True.
Answer: Mᵀ=M; and M is a projection matrix.
Let be independent random variables. Each of the random variables follows distribution. Define .
Which of the following statements is/are correct?
Which of the following statements is/are correct?
One or more options are correct.
Answer: (A), (B), (C)
Given: , and .
: this is the standard definition of a Chi-square distribution. It is the sum of squares of independent standard normal variables. True.
: this is a known sampling-distribution result (Cochran's theorem) for the sum of squared deviations. One degree of freedom is lost because the mean is estimated. True.
: the sum of two independent squared standard normals is . The case is a well-known special case, and it is exactly the Exponential distribution with mean (rate ). True.
?: we have , so scaling gives . Then . It has only degree of freedom, from one squared standard normal, not . False.
Answer: The first three statements are TRUE. The last one (2 degrees of freedom) is FALSE.
: this is the standard definition of a Chi-square distribution. It is the sum of squares of independent standard normal variables. True.
: this is a known sampling-distribution result (Cochran's theorem) for the sum of squared deviations. One degree of freedom is lost because the mean is estimated. True.
: the sum of two independent squared standard normals is . The case is a well-known special case, and it is exactly the Exponential distribution with mean (rate ). True.
?: we have , so scaling gives . Then . It has only degree of freedom, from one squared standard normal, not . False.
Answer: The first three statements are TRUE. The last one (2 degrees of freedom) is FALSE.
Let be a discrete valued random variable with cumulative distribution function .
Which of the following statements is/are correct?
Which of the following statements is/are correct?
One or more options are correct.
Answer: (B), (C)
Take the CDF of a discrete random variable, . Check each statement:
- " is always positive": false — when (or it equals exactly below the smallest possible value). So it is not always strictly positive.
- " is non-decreasing": true — every CDF has this property.
- " has jump discontinuities": true for discrete random variables — the probability mass sits at separate points. So jumps up at each possible value of and does not rise smoothly.
- " is left-continuous": false — with the standard convention , a CDF is always right-continuous, not left-continuous.
Answer: F(x) is non-decreasing; and F(x) has jump discontinuities.
- " is always positive": false — when (or it equals exactly below the smallest possible value). So it is not always strictly positive.
- " is non-decreasing": true — every CDF has this property.
- " has jump discontinuities": true for discrete random variables — the probability mass sits at separate points. So jumps up at each possible value of and does not rise smoothly.
- " is left-continuous": false — with the standard convention , a CDF is always right-continuous, not left-continuous.
Answer: F(x) is non-decreasing; and F(x) has jump discontinuities.
Consider that Linear Ridge Regression is being used to learn a prediction function , where and Mean Absolute Error (MAE) is used to measure the prediction error. A weight of is associated with the regularizer.
At an intermediate step of the training process, assume that the parameter . In the next step, for the input , the predicted value of is noted. Let the relation between and the true value of be .
The value of the overall regularized loss function for this instance is ________. (Rounded off to two decimal places)
At an intermediate step of the training process, assume that the parameter . In the next step, for the input , the predicted value of is noted. Let the relation between and the true value of be .
The value of the overall regularized loss function for this instance is ________. (Rounded off to two decimal places)
Answer: 6.9 to 7.1
Predicted value:
True value:
MAE for this one instance:
Regularizer term (Ridge takes the squared norm of the weights and multiplies it by the given weight ):
Total regularized loss:
Answer: 7.00
True value:
MAE for this one instance:
Regularizer term (Ridge takes the squared norm of the weights and multiplies it by the given weight ):
Total regularized loss:
Answer: 7.00