AI Computer Institute
Expert-curated CS & AI curriculum aligned to CBSE standards. A bharath.ai initiative. About Us

Grade 10 AI & Computer Science Practice Questions — Set 6

20 questions from the Grade 10 bank, each with its answer and a full explanation. Set 6 of 11 · 221 questions in this grade.

Reading is revision; testing is practice. Take the same questions as a timed quiz →

Question 101 · Support Vector Machines: The Deep Dive · hard

An Indian fintech startup trains a hard-margin SVM to separate genuine UPI transactions (label +1) from fraudulent ones (label −1) using two engineered features: a transaction-velocity score and a geolocation-deviation score. After training, only two points turn out to be active support vectors — one per class — at x⁺ = (4, 4) for a genuine transaction and x⁻ = (1, 0) for a fraudulent one, and the optimal weight vector w is known to be parallel to (x⁺ − x⁻). Solving the margin constraints w·x⁺ + b = 1 and w·x⁻ + b = −1 for w and b, what is the width of the margin — the perpendicular distance between the two margin hyperplanes — of this classifier?

  1. 5 units, since the margin equals ‖x⁺ − x⁻‖ = √(3² + 4²) when exactly one support vector anchors each class.
  2. 2.5 units, since that is the perpendicular distance from a single support vector to the separating hyperplane, not the full margin.
  3. 0.4 units, since that is ‖w‖ itself, obtained by treating the direction vector (x⁺ − x⁻) as w without solving for the correct scale factor k.
  4. 10 units, obtained by doubling the distance between the two support vectors under the mistaken belief that margin = 2·‖x⁺ − x⁻‖.

Answer: A. 5 units, since the margin equals ‖x⁺ − x⁻‖ = √(3² + 4²) when exactly one support vector anchors each class.

ExplanationSince w is optimal and only these two points are active constraints, w must be parallel to the vector joining them: d = x⁺ − x⁻ = (4 − 1, 4 − 0) = (3, 4), with ‖d‖ = √(9 + 16) = 5. Writing w = k·d and substituting into the two margin constraints, then subtracting w·x⁻ + b = −1 from w·x⁺ + b = 1, gives w·d = 2, i.e. k‖d‖² = 2, so k = 2/25. This yields w = (6/25, 8/25) = (0.24, 0.32), and ‖w‖ = √(0.24² + 0.32²) = √0.16 = 0.4. Checking the bias: b = 1 − w·x⁺ = 1 − (0.96 + 1.28) = −1.24, and indeed w·x⁻ + b = 0.24 + (−1.24) = −1, so both original constraints hold exactly — the solution is consistent. The margin width is 2/‖w‖ = 2/0.4 = 5 units. This matches ‖x⁺ − x⁻‖ = 5, which makes geometric sense: with only one support vector per class, the maximum-margin hyperplane is exactly the perpendicular bisector of the segment joining them, so the full margin width equals the straight-line distance between the two support vectors — no extra factor of 2, and never just ‖w‖ or half that distance.

Question 102 · Cross-Validation and Model Selection · hard

A machine learning team is building a model to predict a district's monsoon rainfall (in mm) using 12 years of historical weather data. To choose the polynomial regression degree (1 through 5) that best fits the data without overfitting, they run 5-fold cross-validation for each degree and record the mean cross-validation MSE together with its standard error (SE), computed as the standard deviation of the 5 fold errors divided by the square root of 5: | Degree | Mean CV MSE | SE | |---|---|---| | 1 | 12.4 | 1.8 | | 2 | 8.1 | 1.2 | | 3 | 7.3 | 0.9 | | 4 | 7.0 | 0.8 | | 5 | 6.9 | 0.85 | Applying the one-standard-error rule — selecting the simplest model whose mean CV MSE is no more than one SE above the lowest mean CV MSE in the table — which polynomial degree should the team select?

  1. Degree 3, since 7.3 is the smallest-degree model whose mean CV MSE stays within one standard error (0.85) of the lowest mean CV MSE (6.9 at degree 5).
  2. Degree 5, because a mean CV MSE of 6.9 is the lowest value in the table and lowest cross-validation error always indicates the best model to deploy.
  3. Degree 4, since its mean CV MSE of 7.0 is the smallest value among the degrees still simpler than degree 5, so it is the correct one-SE choice.
  4. Degree 1, because the one-standard-error rule instructs choosing the simplest model available regardless of how its cross-validation error compares to the threshold.

Answer: A. Degree 3, since 7.3 is the smallest-degree model whose mean CV MSE stays within one standard error (0.85) of the lowest mean CV MSE (6.9 at degree 5).

ExplanationThe one-standard-error (1-SE) rule does not simply pick the model with the lowest cross-validation error — it picks the simplest model whose error is statistically indistinguishable from the best one, guarding against choosing a needlessly complex model based on noise in the CV estimate. Step 1: Find the minimum mean CV MSE across all degrees. That is degree 5, with mean CV MSE = 6.9. Step 2: Take the SE at that minimum, which is 0.85, and form the threshold: 6.9 + 0.85 = 7.75. Any model with mean CV MSE at or below 7.75 is treated as "as good as" the minimum, since the gap could be explained by fold-to-fold sampling variability. Step 3: Scan from the simplest model (degree 1) upward and stop at the first one meeting the threshold. - Degree 1: 12.4 > 7.75 — fails. - Degree 2: 8.1 > 7.75 — fails. - Degree 3: 7.3 <= 7.75 — passes. This is the simplest qualifying model, so it is selected. Degree 4 (7.0) and degree 5 (6.9) also fall under the threshold, but they are more complex than degree 3 and offer no error reduction beyond what could be explained by fold-to-fold sampling variability — the SE quantifies exactly that. Selecting degree 5 outright because it has the lowest raw error ignores this uncertainty and risks overfitting to quirks of the particular 5-fold split; selecting degree 4 skips over the simpler degree-3 model that already clears the bar; and selecting degree 1 regardless of the threshold misapplies the rule, since "simplest" is constrained by the threshold, not chosen unconditionally.

Question 103 · Dimensionality Reduction Methods Beyond PCA · hard

An ISRO ground-station team logs 2D telemetry snapshots (x = pressure deviation, y = vibration amplitude, in scaled units) for two engine states: Nominal (Class A) and Anomalous (Class B). Class A samples are (−1,−3), (1,−3), (0,3); Class B samples are (3,−3), (5,−3), (4,3). The team wants to compress these readings to a single number for a real-time onboard alert. Working out the statistics gives class means μ_A=(0,−1) and μ_B=(4,−1), a within-class scatter matrix S_W=[[4,0],[0,48]] (summed over both classes), and a total scatter matrix S_T=[[28,0],[0,48]] (about the pooled mean (2,−1) of all six points). Which statement correctly identifies the axis LDA chooses (Fisher direction w ∝ S_W⁻¹(μ_A−μ_B)) versus the axis PCA's first principal component chooses, and correctly explains why one succeeds at separating the classes while the other fails?

  1. Both PCA and LDA converge on the y-axis here, since the eigenvector of S_T with the largest eigenvalue (48) must, in general, coincide with the direction of maximum between-class mean separation.
  2. PCA's first principal component also points along the x-axis in this example, because maximizing total variance is equivalent to maximizing class-mean separation whenever two classes are offset along a single direction.
  3. LDA's optimal axis is the x-axis (w ∝ S_W⁻¹(μ_A−μ_B) = (−1, 0)), while PCA's first principal component is the y-axis; projecting onto x cleanly separates the classes (means 0 vs 4), but projecting onto PCA's y-axis fails completely since both class means equal −1 there.
  4. According to LDA, the optimal axis is the y-axis, since S_W⁻¹ assigns greater weight to the coordinate with larger within-class scatter (48 for y versus 4 for x), amplifying the noisier direction rather than suppressing it.

Answer: C. LDA's optimal axis is the x-axis (w ∝ S_W⁻¹(μ_A−μ_B) = (−1, 0)), while PCA's first principal component is the y-axis; projecting onto x cleanly separates the classes (means 0 vs 4), but projecting onto PCA's y-axis fails completely since both class means equal −1 there.

ExplanationBecause S_W = [[4,0],[0,48]] is already diagonal, its inverse is simply [[1/4,0],[0,1/48]] — reciprocals on the diagonal. Multiplying by μ_A−μ_B = (0−4, −1−(−1)) = (−4,0) gives w ∝ (1/4·(−4), 1/48·0) = (−1,0), so LDA's Fisher direction is the x-axis. Note what dividing by S_W actually does: the y-coordinate's within-class scatter (48) is large, so that term gets divided down to almost nothing, while the x-coordinate's small scatter (4) gets divided down far less — S_W⁻¹ suppresses noisy directions, it does not amplify them. PCA never looks at μ_A or μ_B at all — it only diagonalizes the total scatter S_T = [[28,0],[0,48]], whose eigenvalues are 28 along x and 48 along y. Since 48 > 28, PCA's first principal component is the y-axis, chosen purely because within-class scatter along y (48, identical in both classes) inflates total spread there — not because y helps distinguish the classes. (Consistency check: the between-class scatter S_B = S_T − S_W = [[24,0],[0,0]], confirming all of the class-separating signal lives along x and none along y.) The two axes are exact opposites in usefulness: along x, the class means are 4 units apart (0 vs 4) against a within-class scatter of only 4, giving clean separation; along y, the class means are numerically identical (−1 in both classes), so any variance along y is 100% within-class noise with zero discriminative value. This is exactly why label-blind PCA can be a poor choice ahead of a classifier, and why Fisher's LDA — which weights the class-mean gap by the inverse within-class scatter — is used as a supervised dimensionality-reduction method beyond PCA.

Question 104 · Time Complexity Analysis for Machine Learning · hard

A machine learning engineer at an Indian fintech startup builds a k-Nearest Neighbours (k-NN) fraud detector trained on n = 10,000 UPI transaction records, each described by d = 50 numerical features (amount, time-of-day, merchant category, and so on). To classify ONE new incoming transaction, the algorithm computes the Euclidean distance from the query point to all n training points, then finds the k = 5 nearest neighbours by streaming those n distances through a max-heap of size k, replacing the heap's current maximum whenever a smaller distance is found. Expressed in terms of n, d, and k, what is the tightest correct Big-O time complexity of classifying this single query?

  1. O(nd + n log k)
  2. O(n²d)
  3. O(nd log n)
  4. O(n²)

Answer: A. O(nd + n log k)

ExplanationBreak the query-time cost into its two distinct phases and analyse each separately. Phase 1 — distance computation. The Euclidean distance between the query vector and one training vector requires subtracting corresponding features, squaring each difference, and summing: for d = 50 features that is Θ(d) arithmetic operations. This must be repeated against every one of the n = 10,000 training points, giving a total cost of Θ(nd) for this phase alone — it cannot be avoided or reduced, since every feature of every training point must be touched at least once to know how far it is from the query. Phase 2 — finding the k nearest. Rather than sorting all n distances, the algorithm streams them through a bounded max-heap of size k: each of the n distances triggers either a comparison against the heap's current maximum (O(1) when it's larger) or a compare-and-replace-then-sift operation (O(log k) when it's smaller). Across n distances this costs O(n log k). Adding the two independent phases gives the tight bound O(nd + n log k), which is exactly the first option. Since d and log k are unrelated parameters (here d = 50 vs. log₂5 ≈ 2.3), neither term can be dropped in general — this sum is the honest, non-simplifiable answer. The other options each misplace one piece of this reasoning. O(n²d) is the cost of building a full pairwise distance matrix among all n training points (needed for algorithms like DBSCAN or hierarchical clustering), not for answering a single query, which only ever computes n distances, not n². O(nd log n) comes from fully sorting all n distances with an O(n log n) comparison sort instead of using the bounded heap — wasteful here since only the top k = 5 of n = 10,000 values are needed, and n log n grows strictly faster than n log k when k is held fixed and much smaller than n. O(n²) drops the dimensionality factor d entirely, which is impossible: computing even one distance between two 50-dimensional points inherently costs work proportional to d, so d cannot disappear from a correct complexity expression.

Question 105 · Logistic Regression: The Foundation of Classification · hard

A bank's fraud-detection team fits a logistic regression model to flag suspicious UPI transactions, using the log-odds equation ln(p/(1−p)) = β0 + β1·x1 + β2·x2, where x1 is the transaction amount in thousands of rupees and x2 is the payee's account age in years. The fitted coefficient on x1 is β1 = 0.4, holding x2 fixed. If two otherwise identical transactions differ only in that the second has an amount ₹5,000 higher than the first (so x1 increases by 5), by what factor do the model's predicted odds of fraud change for the second transaction relative to the first?

  1. The odds of fraud multiply by e^2 ≈ 7.39, because the log-odds rise by β1Δx = 0.4 × 5 = 2, and exponentiating an additive change in log-odds converts it into a multiplicative change in odds.
  2. Adding 2 directly to the odds is correct, since 0.4 × 5 = 2 and logistic regression coefficients act additively on the odds scale, just as ordinary linear-regression coefficients act additively on the outcome scale.
  3. The probability of fraud rises by 2, i.e., 200 percentage points, because multiplying the coefficient 0.4 by the 5-unit increase in amount gives the change in predicted probability directly.
  4. Only e^0.4 ≈ 1.49 applies here, because exponentiating a logistic-regression coefficient yields a fixed odds ratio for the whole model, regardless of how large the actual change in the predictor is.

Answer: A. The odds of fraud multiply by e^2 ≈ 7.39, because the log-odds rise by β1Δx = 0.4 × 5 = 2, and exponentiating an additive change in log-odds converts it into a multiplicative change in odds.

ExplanationLogistic regression models the log-odds (logit) as a linear function of the predictors: ln(p/(1−p)) = β0 + β1x1 + β2x2. This linear structure lives on the log-odds scale, not on the probability or odds scale directly, which is exactly what makes the coefficients easy to misread. Holding x2 fixed, increasing x1 by Δx = 5 changes the log-odds by β1·Δx = 0.4 × 5 = 2. Because log-odds are additive, exponentiating both sides shows that odds are multiplicative: odds_new = odds_old × e^(β1Δx) = odds_old × e^2. Since e^2 ≈ 7.39, the second transaction's predicted odds of fraud are about 7.39 times the first transaction's odds — not the odds plus 2 (odds don't add linearly the way log-odds do), not the probability plus 2 (impossible, since probabilities are capped at 1), and not a flat e^0.4 ≈ 1.49, which would only be correct for a 1-unit change and ignores that x1 actually moved by 5 units. This exponential amplification is why a modest-looking coefficient like 0.4 can correspond to a nearly 7.4-fold swing in relative risk once the predictor changes by several units — a routine trap when interpreting fitted models on real transaction data.

Question 106 · Information Theory: Entropy and Information Gain · hard

A CBSE Grade 12 batch of 10 students is used to build a decision tree that predicts the target attribute "Placement Offer" (Yes/No). Overall, 6 students got an offer (Yes) and 4 did not (No). The tree considers splitting on the binary feature "CGPA ≥ 8": this creates one subset of 6 students with CGPA ≥ 8 (5 Yes, 1 No) and another subset of 4 students with CGPA < 8 (1 Yes, 3 No). Working entirely in log base 2, what is the Information Gain of splitting the root node on "CGPA ≥ 8"?

  1. ≈0.646 bits, the value obtained by treating the CGPA ≥ 8 subset as a pure node (entropy 0) before computing the weighted average entropy after the split
  2. ≈0.256 bits, the value obtained by weighting each subset's entropy by its share of the 10 students (6/10 and 4/10) before subtracting the result from the parent entropy
  3. ≈0.240 bits, the value obtained by taking the unweighted arithmetic mean of the two subset entropies instead of weighting them by subset size
  4. ≈0.178 bits, the value obtained by computing every entropy term with natural logarithms instead of log base 2 and reporting the result directly as bits

Answer: B. ≈0.256 bits, the value obtained by weighting each subset's entropy by its share of the 10 students (6/10 and 4/10) before subtracting the result from the parent entropy

ExplanationStart with the parent entropy H(S), using H = −Σ pᵢ log₂(pᵢ). With 6 Yes and 4 No out of 10, p(Yes) = 0.6 and p(No) = 0.4: H(S) = −0.6·log₂(0.6) − 0.4·log₂(0.4) = 0.6(0.737) + 0.4(1.322) = 0.442 + 0.529 ≈ 0.971 bits. Next compute the entropy of each child subset produced by the split on "CGPA ≥ 8." CGPA ≥ 8 subset (n = 6, 5 Yes/1 No): p(Yes) = 5/6, p(No) = 1/6. H = −(5/6)log₂(5/6) − (1/6)log₂(1/6) = (5/6)(0.263) + (1/6)(2.585) = 0.219 + 0.431 ≈ 0.650 bits. This subset is heavily skewed toward Yes but is not pure — one "No" still remains, so its entropy is well above 0. CGPA < 8 subset (n = 4, 1 Yes/3 No): p(Yes) = 1/4, p(No) = 3/4. H = −(1/4)log₂(1/4) − (3/4)log₂(3/4) = (1/4)(2) + (3/4)(0.415) = 0.500 + 0.311 ≈ 0.811 bits. The weighted average entropy after the split must weight each branch by n_branch/n_total, since a branch covering more of the data should count more heavily: H_split = (6/10)(0.650) + (4/10)(0.811) = 0.390 + 0.325 ≈ 0.715 bits. Information Gain = H(S) − H_split = 0.971 − 0.715 ≈ 0.256 bits. The distractors correspond to real, specific errors students make with this formula. Reading the CGPA ≥ 8 subset's "5 Yes, 1 No" as effectively pure and rounding its entropy to 0 (instead of the true 0.650 bits) drops H_split to (6/10)(0) + (4/10)(0.811) ≈ 0.325, inflating the apparent gain to ≈0.646 bits — this is the mistake of eyeballing a skewed-but-impure subset as a leaf. Averaging the two branch entropies as (0.650 + 0.811)/2 ≈ 0.731 instead of weighting by subset size (6/10 and 4/10) gives H_split ≈ 0.731 and a gain of ≈0.240 bits — this ignores that the branches contain different numbers of students, which the entropy-weighting step of ID3 explicitly accounts for. Finally, computing every entropy term with ln instead of log₂ produces values in nats rather than bits (nats = bits × ln 2 ≈ bits × 0.693); carrying that unit mismatch through the whole calculation and calling the final number "bits" yields ≈0.178, silently understating the true information gain by a factor of ln 2.

Question 107 · Statistical Hypothesis Testing for Machine Learning · hard

A vendor claims its UPI fraud-detection model correctly classifies 80% of transactions (the claimed accuracy is p0 = 0.80). A bank's risk-analytics team audits the model on an independent holdout set of 400 transactions from the last quarter and finds it correctly classifies 306 of them. Using a one-proportion z-test at the alpha = 0.05 significance level to test H0: p = 0.80 against the one-sided alternative Ha: p < 0.80, what is the correct test statistic and conclusion?

  1. The test statistic works out to z ≈ -1.75, which is more extreme than the one-tailed critical value of -1.645 at alpha = 0.05 — so H0 is rejected, and there is significant evidence the model's true accuracy is below the claimed 80%.
  2. Although z ≈ -1.75, this does not clear the two-tailed critical value of -1.96 at alpha = 0.05, so H0 fails to be rejected — the 3.5-point drop is plausibly just sampling variability.
  3. Since the sample size n = 400 comfortably exceeds the usual CLT rule-of-thumb of 30, the large-sample condition alone confirms the vendor's 80% claim is false, regardless of which significance level is chosen.
  4. Computing the numerator as (p0 minus phat) instead of (phat minus p0) gives z ≈ +1.75, which exceeds +1.645 — so H0 is rejected in favour of Ha: p > 0.80, implying the model actually beats its claimed 80% accuracy.

Answer: A. The test statistic works out to z ≈ -1.75, which is more extreme than the one-tailed critical value of -1.645 at alpha = 0.05 — so H0 is rejected, and there is significant evidence the model's true accuracy is below the claimed 80%.

ExplanationWhen testing a claimed proportion, the standard error under the null hypothesis must be built from the claimed value p0 = 0.80, not from the sample proportion — this is what distinguishes a hypothesis test's standard error from a confidence interval's. Here SE = sqrt(p0(1-p0)/n) = sqrt(0.8 x 0.2 / 400) = sqrt(0.0004) = 0.02. The audit's sample proportion is phat = 306/400 = 0.765, so the test statistic is z = (phat - p0)/SE = (0.765 - 0.80)/0.02 = -1.75. Because the alternative hypothesis is one-sided (Ha: p < 0.80), the rejection region uses the one-tailed critical value at alpha = 0.05, which is -1.645 — not the two-tailed value of -1.96 that would apply if the alternative were two-sided. Since -1.75 lies further left (more extreme) than -1.645, the observed 3.5-percentage-point shortfall is unlikely to arise from sampling variability alone, so the null hypothesis is rejected: there is statistically significant evidence at the 5% level that the model's real-world accuracy on this holdout set falls short of the vendor's 80% claim. A large sample size (via the Central Limit Theorem) only justifies using the normal approximation for the sampling distribution of phat — it does not by itself prove or disprove the claim; that judgment comes strictly from comparing the computed z-statistic to the chosen critical value. Reversing the numerator's subtraction order flips the sign of z and would incorrectly point the conclusion toward the opposite, wrong-direction alternative.

Question 108 · Beyond Accuracy: Precision, Recall, F1, and AUC-ROC · hard

A UPI fraud-detection model is evaluated on 10,000 transactions, of which exactly 200 are genuinely fraudulent. The model flags 250 transactions as fraudulent, and of these, 150 are truly fraudulent while the remaining 100 are false alarms. Treating "fraudulent" as the positive class, what is the correctly computed F1 score for this model, and how is it derived?

  1. The harmonic mean of precision (60%) and recall (75%) gives F1 = 2×0.60×0.75/(0.60+0.75) ≈ 66.7%.
  2. Averaging precision (60%) and recall (75%) arithmetically gives F1 = (0.60+0.75)/2 = 67.5%.
  3. F1 equals the model's overall accuracy on all 10,000 transactions: (150+9700)/10000 = 98.5%.
  4. Since 150 of the 250 flagged transactions are genuine fraud, F1 equals the precision of the fraud class, 150/250 = 60%.

Answer: A. The harmonic mean of precision (60%) and recall (75%) gives F1 = 2×0.60×0.75/(0.60+0.75) ≈ 66.7%.

ExplanationPrecision measures how many of the flagged transactions are truly fraudulent: TP/(TP+FP) = 150/250 = 0.60, i.e. 60%. Recall measures how many of the actual fraud cases were caught: TP/(TP+FN) = 150/200 = 0.75, i.e. 75% (FN = 200 − 150 = 50 fraud cases missed entirely). F1 is defined as the harmonic mean of precision and recall, not the arithmetic mean, because the harmonic mean punishes a gap between the two far more severely: F1 = 2·P·R/(P+R) = 2×0.60×0.75/(0.60+0.75) = 0.90/1.35 = 2/3 ≈ 66.7%. Averaging precision and recall arithmetically, (0.60+0.75)/2 = 0.675, overstates how balanced the model actually is — the arithmetic mean is dragged upward by the larger of the two values, while the harmonic mean is always ≤ the arithmetic mean whenever precision and recall differ, which is exactly the imbalance F1 is built to expose. Reporting overall accuracy, (150+9700)/10000 = 98.5%, is dangerously misleading here precisely because fraud is rare (200 of 10,000 transactions): a model that flagged nothing at all would still score 98% accuracy while catching zero fraud, so accuracy cannot separate a genuinely useful detector from a useless one on this skewed dataset. Quoting only precision (60%) ignores the 50 fraud cases the model let through — recall is what captures that cost, and F1 exists specifically to prevent either number from being reported in isolation.

Question 109 · The Optimization Landscape: Local Minima, Saddle Points & Momentum · hard

A student training a small neural network models a slice of the loss surface as L(w₁, w₂) = w₁² + w₂² − 4w₁w₂, where w₁ and w₂ are two of the network's weights. After finding every point where the gradient vanishes and applying the Hessian (second-partial-derivative) test to classify it, which statement correctly identifies the nature of that critical point and explains why plain gradient descent struggles near it while momentum-based gradient descent escapes more effectively?

  1. The gradient vanishes only at (w1, w2) = (0, 0). The Hessian there is [[2, −4], [−4, 2]], whose determinant is (2)(2) − (−4)² = −12 < 0, so the origin is a saddle point with eigenvalues −2 and 6 of opposite sign rather than a minimum; since the gradient's magnitude shrinks toward zero as the optimizer nears the origin along the negative-curvature direction, vanilla gradient descent slows to a near-standstill there, while momentum's accumulated velocity from earlier, larger gradients carries the update through this flat region and past the saddle.
  2. Since both diagonal Hessian entries fxx = 2 and fyy = 2 are positive, the origin at (0, 0) must be a local minimum regardless of the off-diagonal term; gradient descent therefore converges quickly there on its own, and adding momentum is unnecessary because there is no saddle to escape.
  3. The determinant of the Hessian is −12, and because this value is negative the origin must be a local maximum where L reaches its largest possible value; momentum only causes harm here, since it makes gradient descent overshoot past the true minimum that lies elsewhere on the surface.
  4. There are infinitely many critical points, forming the entire line w1 = w2, because both partial derivatives reduce to the same equation; momentum is actively harmful along this line since it causes gradient descent to oscillate perpendicular to it without the algorithm ever converging.

Answer: A. The gradient vanishes only at (w1, w2) = (0, 0). The Hessian there is [[2, −4], [−4, 2]], whose determinant is (2)(2) − (−4)² = −12 < 0, so the origin is a saddle point with eigenvalues −2 and 6 of opposite sign rather than a minimum; since the gradient's magnitude shrinks toward zero as the optimizer nears the origin along the negative-curvature direction, vanilla gradient descent slows to a near-standstill there, while momentum's accumulated velocity from earlier, larger gradients carries the update through this flat region and past the saddle.

ExplanationSetting both partial derivatives to zero, ∂L/∂w1 = 2w1 − 4w2 = 0 and ∂L/∂w2 = 2w2 − 4w1 = 0, gives w1 = 2w2 and w2 = 2w1 simultaneously. Substituting one into the other forces w2 = 4w2, so w2 = 0 and hence w1 = 0 — the origin is the only critical point on this surface, not a whole line of them. The Hessian of second partials is H = [[2, −4], [−4, 2]]. The second-derivative discriminant is det(H) = (2)(2) − (−4)² = 4 − 16 = −12. A negative determinant means the two directional curvatures have opposite signs, which is precisely the definition of a saddle point — it does not, by itself, tell you the point is a maximum, and checking only the positive diagonal entries fxx and fyy while ignoring the −4 cross-term (the off-diagonal partials) misses the mixed curvature entirely. Solving det(H − λI) = 0 confirms this: (2 − λ)² − 16 = 0 gives λ = −2 and λ = 6, one negative and one positive eigenvalue. Along the eigenvector for λ = 6 (the direction w1 = −w2), the surface curves upward like the bottom of a bowl; along the eigenvector for λ = −2 (the direction w1 = w2), it curves downward like the top of a ridge. Near the origin, the gradient's component along that ridge direction is proportional to the distance from the origin, so it shrinks toward zero exactly where the optimizer needs to move away fastest — a vanilla gradient-descent step, being scaled directly by the current gradient, becomes tiny and progress stalls. Momentum keeps a running fraction of previous update vectors, so the velocity built up while approaching the saddle persists even as the instantaneous gradient shrinks, pushing the optimizer through this near-flat region and out along the descending ridge rather than stalling — this is exactly why momentum (and its variants like Nesterov acceleration or Adam) is valuable on the highly non-convex loss surfaces of real neural networks, which are dominated by saddle points rather than true local minima in high dimensions.

Question 110 · Kernel Methods: Transforming Feature Spaces · hard

An analyst studying UPI merchant transaction data represents each merchant with two normalized features, x = (x1, x2), and wants to separate fraud-prone accounts using a degree-2 polynomial kernel K(x, y) = (x · y)², which implicitly maps every 2-dimensional vector into a 3-dimensional feature space via φ(x) = (x1², √2·x1x2, x2²). For two merchants with feature vectors x = (2, 1) and y = (1, 3), what is K(x, y), and why does computing it this way — rather than explicitly building φ(x) and φ(y) first — matter for kernel methods in general?

  1. K(x, y) = 5: since the polynomial kernel measures dissimilarity like squared Euclidean distance, K(x, y) = (x1 − y1)² + (x2 − y2)² = 1 + 4 = 5, matching the separation between the two UPI transaction vectors in feature space.
  2. K(x, y) = 13: expanding (x1y1 + x2y2)² as x1²y1² + x2²y2² gives (4)(1) + (1)(9) = 13, and this scalar equals φ(x) · φ(y) computed from the mapping φ(x) = (x1², √2 x1x2, x2²).
  3. K(x, y) = 25: computing (x · y)² = 5² directly gives 25 in a single squaring on the original 2-dimensional vectors, without ever forming the 3-dimensional vectors φ(x) and φ(y); this matters because a degree-d polynomial kernel on n features implies a feature space of O(n^d) dimensions, which the kernel trick lets you skip entirely.
  4. K(x, y) = 25: this value is correct only after explicitly building the 3-dimensional vectors φ(x) and φ(y) and taking their dot product, since the kernel trick merely means skipping the storage of φ(x) and φ(y), not skipping their computation.

Answer: C. K(x, y) = 25: computing (x · y)² = 5² directly gives 25 in a single squaring on the original 2-dimensional vectors, without ever forming the 3-dimensional vectors φ(x) and φ(y); this matters because a degree-d polynomial kernel on n features implies a feature space of O(n^d) dimensions, which the kernel trick lets you skip entirely.

ExplanationThe dot product x · y = (2)(1) + (1)(3) = 2 + 3 = 5, so K(x, y) = 5² = 25 — obtained with one multiplication-add and one squaring on the original 2-dimensional vectors, never touching a 3-dimensional array. To confirm this really is an inner product in feature space, expand φ(x) = (x1², √2 x1x2, x2²) = (4, 2√2, 1) and φ(y) = (y1², √2 y1y2, y2²) = (1, 3√2, 9). Their dot product is (4)(1) + (2√2)(3√2) + (1)(9) = 4 + 12 + 9 = 25, exactly matching K(x, y). This is Mercer's theorem in miniature: (x·y)² qualifies as a valid kernel precisely because it equals φ(x)·φ(y) for an explicit feature map φ. The value 13 comes from dropping the cross term when expanding the square: (x1y1 + x2y2)² correctly expands to x1²y1² + 2x1x2y1y2 + x2²y2² = 4 + 12 + 9 = 25, not just the two square terms 4 + 9 = 13 — omitting 2x1x2y1y2 = 12 is the classic algebra slip when hand-expanding a polynomial kernel, and it is also exactly the middle component contributed by the √2 x1x2 term in φ. The value 5 confuses a similarity kernel with a distance metric. Squared Euclidean distance ||x − y||² is what RBF/Gaussian kernels build on to measure how far apart two points are; the polynomial kernel (x·y)^d instead measures how aligned x and y are after the feature mapping, so it is fundamentally a dot-product-based similarity, not a distance. The real payoff of the kernel trick is dimensional, not about storage. For n original features and a degree-d polynomial kernel, the explicit feature space has O(n^d) components, so explicitly computing φ(x) and φ(y) and then dotting them costs O(n^d) work; computing K(x, y) = (x·y)^d directly costs only O(n). The claim that the trick "only skips storage, not computation" has it backwards — the entire saving comes from never computing φ(x) and φ(y) in the first place, which is exactly what makes kernels with infinite-dimensional feature spaces, like the Gaussian/RBF kernel, usable at all.

Question 111 · Bayesian Inference: Updating Beliefs with Evidence · hard

An NPCI-style UPI fraud-detection engine assigns a prior probability P(Fraud) = 1% to any transaction, based on historical base rates. Two independent screening rules fire on a particular ₹45,000 transaction. Rule 1 (unusual transaction velocity) has true-positive rate P(Flag₁ | Fraud) = 0.90 and false-positive rate P(Flag₁ | Not Fraud) = 0.05. Rule 2 (new device fingerprint) fires independently of Rule 1 given the transaction's true fraud status, with P(Flag₂ | Fraud) = 0.80 and P(Flag₂ | Not Fraud) = 0.10. Treating the posterior obtained after Rule 1 as the new prior for updating on Rule 2, what is P(Fraud | Flag₁ and Flag₂)?

  1. ≈59.3% — after chaining both updates, treating each posterior as the next prior (posterior odds 16:11)
  2. ≈15.4% — the posterior after only the first flag, before the second piece of evidence is incorporated
  3. ≈7.5% — obtained by applying the second flag's likelihoods to the original 1% base rate instead of the updated 15.4% prior
  4. 72% — the product of the two "given fraud" likelihoods (0.90 × 0.80), mistaking the sensitivities for a posterior probability

Answer: A. ≈59.3% — after chaining both updates, treating each posterior as the next prior (posterior odds 16:11)

ExplanationWork in odds form, since Bayesian updating with conditionally independent evidence multiplies odds by successive likelihood ratios (Bayes factors) — this is the cleanest way to see "updating beliefs" as a chain. Prior odds: P(Fraud) = 1%, so prior odds = 1:99 (Fraud : Not Fraud). Update on Flag₁: the Bayes factor is LR₁ = P(Flag₁|Fraud) / P(Flag₁|Not Fraud) = 0.90 / 0.05 = 18. Posterior odds after Flag₁ = 18 × (1:99) = 18:99 = 2:11. As a probability, P(Fraud | Flag₁) = 2/(2+11) = 2/13 ≈ 15.4%. This is the correct intermediate belief, and it becomes the prior for the next update — it must carry forward the full weight of Flag₁'s evidence, not reset to 1%. Update on Flag₂, using 2:11 as the new prior odds: LR₂ = P(Flag₂|Fraud) / P(Flag₂|Not Fraud) = 0.80 / 0.10 = 8. Posterior odds after both flags = 8 × (2:11) = 16:11. Converting to a probability: P(Fraud | Flag₁ and Flag₂) = 16/(16+11) = 16/27 ≈ 0.5926, i.e., ≈59.3%. Check by the direct joint-likelihood route (valid because Flag₁ and Flag₂ are conditionally independent given the fraud status): numerator for Fraud = 0.01 × 0.90 × 0.80 = 0.0072; numerator for Not Fraud = 0.99 × 0.05 × 0.10 = 0.00495; total = 0.01215; posterior = 0.0072/0.01215 = 16/27 ≈ 59.3%. Both routes agree, confirming the answer. The 15.4% figure is only the belief after the first flag — stopping there ignores the device-fingerprint evidence entirely. The 7.5% figure comes from applying Rule 2's likelihoods to the original 1% base rate rather than to the 15.4% posterior that Rule 1 already established — this discards the first update instead of building on it, which defeats the entire point of sequential Bayesian updating. The 72% figure confuses the likelihoods P(Flag|Fraud) — how likely the evidence is if fraud is true — with the posterior P(Fraud|Flag) — how likely fraud is given the evidence; multiplying sensitivities together is not a valid probability calculation at all.

Question 112 · Taylor Series — Local Linearization for ML · hard

A machine learning engineer is training a fraud-detection model for UPI transactions. At the current parameter value θ = 2, the loss function L(θ) satisfies L(2) = 5, L'(2) = 3, and L''(2) = 4. She builds the second-order Taylor expansion of L(θ) around θ = 2 to get a local quadratic model of the loss, then finds the value of θ that minimizes that quadratic model — this is exactly one step of Newton's method. What value of θ does this method predict as the next parameter estimate?

  1. θ = 1.25, since minimizing the quadratic Taylor model gives θ = 2 − L′(2)/L″(2) = 2 − 3/4
  2. θ = 2.75, since minimizing the quadratic Taylor model gives θ = 2 + L′(2)/L″(2) = 2 + 3/4
  3. θ = 1.625, obtained by treating L″(2) itself (without the 1/2 factor) as the coefficient of (θ−2)² in the Taylor model
  4. θ = 0.75, the value of the correction term −L′(2)/L″(2) alone, without adding it back to the starting point θ = 2

Answer: A. θ = 1.25, since minimizing the quadratic Taylor model gives θ = 2 − L′(2)/L″(2) = 2 − 3/4

ExplanationThe second-order Taylor expansion of L(θ) about a = 2 is L(θ) ≈ L(a) + L′(a)(θ−a) + (1/2)L″(a)(θ−a)². Substituting L(2) = 5, L′(2) = 3, L″(2) = 4 gives the local quadratic model L(θ) ≈ 5 + 3(θ−2) + 2(θ−2)². Since the coefficient of (θ−2)² is 2 > 0 (because L″(2) = 4 > 0), this parabola opens upward and has a genuine minimum rather than a maximum, so minimizing it is well-posed. Differentiate with respect to θ and set the result to zero: d/dθ[5 + 3(θ−2) + 2(θ−2)²] = 3 + 4(θ−2) = 0, so θ − 2 = −3/4, giving θ = 2 − 3/4 = 1.25. Notice this is algebraically identical to the Newton's-method update rule θ_new = θ_old − L′(θ_old)/L″(θ_old) = 2 − 3/4 = 1.25 — Newton's method is nothing more than repeatedly building a second-order Taylor (quadratic) local model of the loss and jumping straight to that model's minimum, which is why it converges much faster than plain gradient descent near a well-behaved minimum. As a check, plugging θ = 1.25 back into the quadratic model gives a predicted loss of 5 + 3(−0.75) + 2(0.5625) = 3.875, lower than L(2) = 5, confirming the step moves toward a lower-loss region. The distractors correspond to real slip-ups: dropping the minus sign in the update rule (θ = 2.75), forgetting the factor of 1/2 that Taylor's theorem attaches to the second-derivative term (θ = 1.625), and reporting only the correction term instead of the updated parameter (θ = 0.75).

Question 113 · Numerical Methods and Python Implementation · hard

A Python implementation of the bisection method searches for the root of f(x) = x³ − x − 2 inside the interval [1, 2] (verified by f(1) = −2 and f(2) = 4, a sign change confirming a root lies between them). The code halves the interval on each pass and stops once the interval width falls below the tolerance ε = 0.0001: ```python a, b = 1, 2 eps = 0.0001 n = 0 while (b - a) >= eps: c = (a + b) / 2 if f(a) * f(c) < 0: b = c else: a = c n += 1 ``` What is the minimum value the loop counter n will hold when the loop finally terminates?

  1. 4 iterations
  2. 10 iterations
  3. 13 iterations
  4. 14 iterations

Answer: D. 14 iterations

ExplanationAfter n bisection passes, the interval width shrinks from (b − a) = 1 to exactly 1/2ⁿ, since every pass keeps exactly one half of the current interval regardless of which half contains the sign change. The while-loop keeps executing as long as the width is still ≥ 0.0001, i.e. as long as 1/2ⁿ ≥ 0.0001, which means it stops only once 2ⁿ exceeds 10000. Solving n > log₂(10000) = ln(10000)/ln(2) ≈ 9.2103/0.6931 ≈ 13.288 shows the smallest whole number of completed passes satisfying this is 14. A direct check confirms it: after 13 passes the width is 1/2¹³ = 1/8192 ≈ 0.0001221, which is still ≥ 0.0001, so the loop body runs one more time; after 14 passes the width is 1/2¹⁴ = 1/16384 ≈ 0.0000610, which finally drops below 0.0001 and the loop exits with n = 14. Reading off the four digits after the decimal point in ε and using that directly as the iteration count mistakes bisection's geometric halving (factor of 2 per step) for a decimal factor-of-10 reduction per step, which is not how the method works. Taking the natural logarithm of 10000 alone without dividing by ln(2) — giving ln(10000) ≈ 9.21, rounded up to 10 — forgets that each loop pass corresponds to one halving of the interval, not one factor-of-e reduction, so the base of the logarithm must match the base of the shrinking process. Rounding log₂(10000) ≈ 13.288 down to 13 instead of up describes a count at which the width, 1/8192 ≈ 0.000122, is still above the tolerance, meaning the loop condition is still true and one more pass is still required before termination.

Question 114 · Fourier Transforms and Signal Processing · hard

In a CBSE Class 12 physics lab, a student uses a function generator to produce an ideal square-wave voltage signal that switches between −5 V and +5 V: it jumps from −5 V to +5 V exactly at t = 0, holds at +5 V until t = T/2, then drops back to −5 V for the rest of the period T (fundamental angular frequency ω₀ = 2π/T). Using the Fourier series expansion of this square wave, what is the amplitude of its third harmonic — the coefficient of the sin(3ω₀t) term?

  1. 20/π V (≈6.37 V), because every harmonic in a square wave's spectrum carries the same amplitude as the fundamental, 4A/π.
  2. 5/3 V (≈1.67 V), because the harmonic amplitudes simply fall off as A/n without any extra scaling constant beyond the fundamental's own amplitude A.
  3. 20/(3π) V (≈2.12 V), since the coefficient of the nth odd harmonic is 4A/(nπ), giving 4(5)/(3π) for n = 3.
  4. 0 V, because an ideal square wave's energy is concentrated entirely in its fundamental frequency component, with every higher harmonic vanishing.

Answer: C. 20/(3π) V (≈2.12 V), since the coefficient of the nth odd harmonic is 4A/(nπ), giving 4(5)/(3π) for n = 3.

ExplanationBecause v(t) jumps from −A to +A right at t = 0, it is an odd function of t, so its Fourier series contains only sine terms: v(t) = Σ bₙ sin(nω₀t), with no cosine (aₙ) terms at all. The sine coefficients are bₙ = (2/T)∫_{-T/2}^{T/2} v(t) sin(nω₀t) dt. Since v(t) is odd and sin(nω₀t) is odd, their product is even, so this reduces to bₙ = (4/T)∫₀^{T/2} A sin(nω₀t) dt. Evaluating the integral: ∫₀^{T/2} sin(nω₀t) dt = [1 − cos(nω₀·T/2)]/(nω₀) = [1 − cos(nπ)]/(nω₀), using ω₀T/2 = π. Since cos(nπ) = (−1)ⁿ, this bracket equals 2 when n is odd and 0 when n is even — square waves contain only odd harmonics. For odd n, this gives bₙ = (4A/T)·[2/(nω₀)] = 8A/(nω₀T) = 8A/(2nπ) = 4A/(nπ), since ω₀T = 2π. With A = 5 V and n = 3, b₃ = 4(5)/(3π) = 20/(3π) ≈ 2.12 V. Note the two things happening together: the constant 4/π scales every harmonic relative to the peak voltage A, and the factor 1/n further shrinks each successive odd harmonic — dropping either piece (as in the A/π-only or A/n-only distractors) misrepresents the actual spectrum, and the harmonic is very much nonzero since 3 is odd.

Question 115 · Game Theory and Strategic AI · hard

A bank's AI fraud-detection system must decide, for each incoming UPI transaction, whether to Audit (trigger step-up OTP verification) or Not Audit. Simultaneously, and without observing the bank's choice, a rational fraudster AI decides whether to Commit Fraud or Behave Honestly. Data analysis gives this payoff matrix, written as (bank's payoff in ₹, fraudster's payoff in ₹) per transaction: | | Fraudster: Fraud | Fraudster: Honest | |---|---|---| | Bank: Audit | (8, −4) | (−2, 0) | | Bank: No Audit | (−10, 9) | (0, 0) | Checking best responses shows neither player has a dominant strategy, so the Nash equilibrium must be in mixed strategies. Using the indifference principle — where each player's equilibrium mixing probability is set to make the OTHER player exactly indifferent between their two pure actions — what probability q should the bank's AI audit transactions with, at the mixed-strategy Nash equilibrium?

  1. q = 9/13 ≈ 69.2% — found by weighting the fraudster's two payoffs by the bank's audit probability q, setting 9 − 13q = 0 from q(−4) + (1−q)(9) = q(0) + (1−q)(0), and solving.
  2. q = 1/10 = 10% — this is actually the fraudster's equilibrium fraud probability p, obtained from the bank's own indifference condition, not the bank's equilibrium audit probability.
  3. q = 9/10 = 90% — the complement of the fraudster's fraud probability, mistakenly treated as if it were the bank's audit probability.
  4. q = 4/13 ≈ 30.8% — the complement of the correct audit probability, arising from a sign error while solving the fraudster's indifference equation.

Answer: A. q = 9/13 ≈ 69.2% — found by weighting the fraudster's two payoffs by the bank's audit probability q, setting 9 − 13q = 0 from q(−4) + (1−q)(9) = q(0) + (1−q)(0), and solving.

ExplanationIn a 2×2 game with no dominant strategies, a player's equilibrium mixing probability is pinned down by making the OTHER player indifferent — not by that player's own payoffs. To find the bank's audit probability q, weight the fraudster's two payoffs by q and (1−q): the expected payoff from Fraud is q(−4) + (1−q)(9) = 9 − 13q, and the expected payoff from Honest is q(0) + (1−q)(0) = 0. If these weren't equal, the fraudster would always pick the strictly better pure action and mixing could not be an equilibrium, so set 9 − 13q = 0, giving q = 9/13 ≈ 69.2%. Checking: at q = 9/13, the fraudster's expected payoff from Fraud is 9 − 13(9/13) = 0, exactly matching Honest, confirming genuine indifference. Auditing less often than 9/13 of the time would make Fraud strictly profitable for the fraudster, breaking the equilibrium; auditing more often wastes the ₹2 audit cost against a fraudster who would already strictly prefer Honesty. (Running the symmetric calculation on the bank's own payoffs — 8p + (−2)(1−p) = −10p + 0(1−p), i.e., 10p − 2 = −10p — instead gives p = 1/10, the fraudster's equilibrium fraud probability, which answers a different question about the fraudster's strategy, not the bank's.)

Question 116 · Monte Carlo Methods — Probability as a Computational Tool · hard

In a CBSE Class 12 Computer Science lab, a student estimates π using the classic Monte Carlo "quarter-circle" method: generate N independent random points (Xᵢ, Yᵢ) uniformly inside the unit square [0,1]×[0,1]. Define Zᵢ = 1 if Xᵢ² + Yᵢ² ≤ 1, and Zᵢ = 0 otherwise, so Zᵢ is 1 exactly when the point falls inside the quarter circle of radius 1. Let Z̄ = (1/N)Σᵢ Zᵢ be the sample mean, and take π̂ = 4Z̄ as the estimator of π. Since each Zᵢ is an independent Bernoulli trial with success probability p = π/4 (the ratio of the quarter circle's area to the unit square's area), what is Var(π̂) as a function of N?

  1. π(4 − π)/N — obtained by rescaling Var(Z̄) by 4² = 16, since π̂ = 4Z̄ and Var(cX) = c²·Var(X)
  2. π(4 − π)/(16N) — obtained by treating π̂ as equal to Z̄ itself, with no rescaling applied for the factor of 4
  3. π(4 − π)/(4N) — obtained by rescaling Var(Z̄) by 4 instead of 4² = 16, as though Var(cX) = c·Var(X)
  4. 4π/N — obtained by approximating Var(Zᵢ) ≈ p, dropping the (1 − p) factor, while still rescaling correctly by 16

Answer: A. π(4 − π)/N — obtained by rescaling Var(Z̄) by 4² = 16, since π̂ = 4Z̄ and Var(cX) = c²·Var(X)

ExplanationEach trial Zᵢ is Bernoulli with success probability p = π/4, so Var(Zᵢ) = p(1 − p) = (π/4)(1 − π/4) = (π/4)·(4 − π)/4 = π(4 − π)/16. Averaging N independent copies divides the variance by N: Var(Z̄) = Var(Zᵢ)/N = π(4 − π)/(16N). The estimator is not Z̄ itself but π̂ = 4Z̄, and for any constant c, Var(cX) = c²·Var(X) — variance scales with the square of the constant, not the constant itself. So Var(π̂) = Var(4Z̄) = 4²·Var(Z̄) = 16 · π(4 − π)/(16N) = π(4 − π)/N ≈ 2.697/N. This is the standard asymptotic variance of the quarter-circle Monte Carlo estimator, and it shows the characteristic √N convergence of Monte Carlo methods: to halve the standard error of the π estimate, N must be quadrupled, regardless of how large N already is. The distractors each correspond to a specific, traceable slip in this derivation rather than a random wrong number. Skipping the rescaling step entirely — treating π̂ as if it equalled Z̄ rather than 4Z̄ — leaves just Var(Z̄) = π(4 − π)/(16N), never applying the factor-of-16 correction at all. Applying the rescaling linearly instead of quadratically — multiplying by 4 instead of 4² = 16, as if Var(cX) = c·Var(X) — gives 4 · π(4 − π)/(16N) = π(4 − π)/(4N). And approximating Var(Zᵢ) ≈ p by dropping the (1 − p) factor (reasonable-looking when p is small, but p = π/4 ≈ 0.785 here is far from small) while still correctly rescaling by 16 gives 16 · (π/4)/N = 4π/N. Each of these lands on a plausible-looking formula precisely because it corresponds to omitting exactly one real piece of the calculation — not to an arbitrary arithmetic error.

Question 117 · Gaussian Mixture Models and Soft Clustering · hard

AICI's quiz-analytics team fits a two-component Gaussian Mixture Model to the time (in minutes) Class 10 students take to finish an adaptive AI quiz. Cluster 1 ("fast solvers") has mean μ₁ = 10 and Cluster 2 ("careful solvers") has mean μ₂ = 14; both clusters share the same standard deviation σ = 2. The fitted mixing weights are π₁ = 0.7 and π₂ = 0.3. One student finishes in x = 11 minutes. Using e⁻¹ ≈ 0.368, what is γ₁(x) — the responsibility (posterior probability) that this student belongs to Cluster 1 — under this GMM?

  1. γ₁ ≈ 0.70, because in a two-component GMM the responsibility of the closer cluster equals its mixing weight π₁ directly, once you've identified which component the point is nearer to
  2. γ₁ ≈ 0.73, obtained by comparing only the two Gaussian likelihoods and normalizing them, without multiplying by the mixing weights π₁ and π₂
  3. γ₁ ≈ 0.86, since weighting each Gaussian density by its mixing coefficient (0.7 and 0.3) before normalizing shows Cluster 1 is favoured both by its proximity to μ₁ and by its larger prior weight
  4. γ₁ ≈ 0.14, since x = 11 minutes is nearer to μ₂ = 14 than to μ₁ = 10 in squared distance, so most of the responsibility should go to Cluster 2

Answer: C. γ₁ ≈ 0.86, since weighting each Gaussian density by its mixing coefficient (0.7 and 0.3) before normalizing shows Cluster 1 is favoured both by its proximity to μ₁ and by its larger prior weight

ExplanationFor a Gaussian Mixture Model, the responsibility of a component is a Bayes'-rule posterior: γ_k(x) = π_k·N(x∣μ_k,σ_k²) / Σⱼ πⱼ·N(x∣μⱼ,σⱼ²), where the mixing weight πₖ acts as the prior and the component density acts as the likelihood. Because both components share σ = 2, the normalizing factor 1/(σ√(2π)) inside N(x∣μ,σ²) is identical for both terms and cancels out of the ratio, leaving only the exponential parts to compare. Squared distances from x = 11: (11−10)² = 1 for Cluster 1, and (11−14)² = 9 for Cluster 2 — x is actually nine times closer in squared distance to μ₁ than to μ₂, not the other way around. Exponents: for Cluster 1, −(1)/(2·2²) = −0.125; for Cluster 2, −(9)/(2·2²) = −1.125. Factoring e^(−0.125) out of numerator and denominator: γ₁(x) = π₁ / (π₁ + π₂·e^(−(1.125−0.125))) = 0.7 / (0.7 + 0.3·e⁻¹) Substituting e⁻¹ ≈ 0.368: 0.3 × 0.368 = 0.1104, so the denominator is 0.7 + 0.1104 = 0.8104, giving γ₁(x) = 0.7 / 0.8104 ≈ 0.86. This is higher than the bare mixing weight (0.70) because the likelihood term also favours Cluster 1, and it's higher than 0.73 — the value you'd get by comparing the two Gaussian densities with equal 0.5/0.5 weights and ignoring the actual priors — because π₁ = 0.7 compounds with that same likelihood advantage. The complementary responsibility goes to Cluster 2: γ₂(x) ≈ 0.14, not the reverse, since the point sits closer to μ₁.

Question 118 · Automatic Differentiation and Computational Graphs · hard

Consider a computational graph for f(x, y) = x·(x·y) + sin(x·y), built from three operations: ``` u = x * y v = x * u w = sin(u) f = v + w ``` Notice that the node u has *two* outgoing edges — it feeds into both v and w — so any change in u reaches f through two separate paths, and x itself has two separate routes into the graph: directly into v, and indirectly through u. Applying reverse-mode automatic differentiation (backpropagation) with seed ∂f/∂f = 1, and evaluating at x = 1, y = 2, what is the correctly computed value of ∂f/∂x?

  1. ∂f/∂x ≈ 3.168, obtained by summing the two gradient contributions that reach the shared node u (from v and from w), each properly multiplied by its local derivative, before propagating the total to x.
  2. ∂f/∂x = 2.000, obtained by tracing gradient only along the direct path f → v → x and disregarding the second path that reaches x through the shared node u.
  3. ∂f/∂x ≈ 1.168, obtained by multiplying the two gradients that arrive at the shared node u instead of summing them, then propagating that product on to x.
  4. ∂f/∂x ≈ 2.584, obtained by correctly summing the two gradients arriving at the shared node u but then adding that sum directly into x's gradient without multiplying by the local derivative ∂u/∂x.

Answer: A. ∂f/∂x ≈ 3.168, obtained by summing the two gradient contributions that reach the shared node u (from v and from w), each properly multiplied by its local derivative, before propagating the total to x.

ExplanationReverse-mode AD does a forward pass to record values, then a backward pass where every node that fans out to multiple children must have its incoming gradients **summed**, each first multiplied by the correct local derivative. Forward pass at x = 1, y = 2: u = x·y = 2, v = x·u = 2, w = sin(u) = sin(2) ≈ 0.909, f = v + w ≈ 2.909. Backward pass, seeding ∂f/∂f = 1: Since f = v + w: ∂f/∂v = 1 and ∂f/∂w = 1. Node v = x·u has two parents, x and u, so it sends gradient to both: ∂v/∂x = u = 2 and ∂v/∂u = x = 1. This gives x a direct contribution of 1·2 = 2, and gives u a contribution of 1·1 = 1 from this path. Node w = sin(u) sends gradient to u via ∂w/∂u = cos(u) = cos(2) ≈ −0.4161, contributing 1·(−0.4161) = −0.4161 to u. Because u fans out to both v and w, its total upstream gradient is the **sum** of everything that arrived: ∂f/∂u = 1 + (−0.4161) = 0.5839. Node u = x·y then passes this total on to x through ∂u/∂x = y = 2, contributing 0.5839 × 2 ≈ 1.1677 to x. Adding the direct-path contribution and the indirect-path contribution gives the full gradient: ∂f/∂x = 2 + 1.1677 ≈ 3.168. This matches direct symbolic differentiation as a check: f = x²y + sin(xy), so ∂f/∂x = 2xy + y·cos(xy) = 2(1)(2) + 2·cos(2) = 4 − 0.8323 = 3.1677 ≈ 3.168. The distractors correspond to real bugs students write when hand-coding backprop: dropping a path entirely at a fan-out node, multiplying instead of accumulating (summing) gradients at a shared node, and forgetting to multiply an accumulated upstream gradient by the local derivative before passing it further back.

Question 119 · Bias, Fairness, and Responsible AI · hard

An AI shortlisting tool for a national merit scholarship program is tested separately on 500 Urban-district applicants and 500 Rural-district applicants, using each applicant's actual merit-criteria record as ground truth. The confusion matrices are: **Urban district — 200 applicants actually meet the merit criteria, 300 do not** | | Predicted: Shortlist | Predicted: Reject | |---|---|---| | Actually meets criteria | 180 (TP) | 20 (FN) | | Actually does not meet criteria | 60 (FP) | 240 (TN) | **Rural district — 100 applicants actually meet the merit criteria, 400 do not** | | Predicted: Shortlist | Predicted: Reject | |---|---|---| | Actually meets criteria | 50 (TP) | 50 (FN) | | Actually does not meet criteria | 30 (FP) | 370 (TN) | Based on these numbers, which statement about the model's fairness is quantitatively accurate?

  1. Despite identical overall accuracy of 84% in both groups — (180+240)/500 for Urban and (50+370)/500 for Rural — the true positive rate is 90% for Urban applicants (180/200) versus only 50% for Rural applicants (50/100), so a genuinely qualified Rural student is far less likely to be correctly shortlisted, violating the equal-opportunity criterion even though an accuracy-only check would call the model unbiased.
  2. The identical 84% accuracy in both groups proves the model satisfies equalized odds, since two groups having equal overall accuracy mathematically guarantees that their true positive rates and false positive rates are also equal, regardless of how the correct and incorrect predictions are distributed within each group.
  3. The model is fair overall because its false positive rate is low for both groups — 20% for Urban (60/300) and 7.5% for Rural (30/400) — and a low false positive rate in both groups is by itself sufficient to guarantee equalized odds, no matter how the true positive rates compare between the two groups.
  4. Since Rural applicants have a lower actual qualification rate (100 out of 500) than Urban applicants (200 out of 500), the observed gap in who gets correctly shortlisted simply reflects a real difference in merit between the districts, so it cannot indicate bias in the model itself and requires no further scrutiny.

Answer: A. Despite identical overall accuracy of 84% in both groups — (180+240)/500 for Urban and (50+370)/500 for Rural — the true positive rate is 90% for Urban applicants (180/200) versus only 50% for Rural applicants (50/100), so a genuinely qualified Rural student is far less likely to be correctly shortlisted, violating the equal-opportunity criterion even though an accuracy-only check would call the model unbiased.

ExplanationWork each confusion matrix directly. Urban: accuracy = (TP+TN)/total = (180+240)/500 = 420/500 = 84%; true positive rate (recall among genuinely qualified applicants) = TP/(TP+FN) = 180/200 = 90%; false positive rate = FP/(FP+TN) = 60/300 = 20%. Rural: accuracy = (50+370)/500 = 420/500 = 84%; true positive rate = TP/(TP+FN) = 50/100 = 50%; false positive rate = FP/(FP+TN) = 30/400 = 7.5%. The two groups land on exactly the same overall accuracy, 84%, which is precisely what makes this case instructive: a single aggregate accuracy number hides a large disparity underneath. Equal opportunity is the fairness criterion that asks a narrower, more targeted question than overall accuracy: among people who are actually qualified, does the model shortlist them at the same rate regardless of group? Here it does not — 90% of genuinely qualified Urban applicants are correctly shortlisted, but only 50% of genuinely qualified Rural applicants are, a 40-percentage-point gap in who gets recognized for merit they actually have. That is the statement with correct, internally consistent numbers. Equal accuracy does not imply equal TPR or FPR, because accuracy is a weighted blend of correct decisions on both the positive and negative class, and very different TP/FN/FP/TN splits can average out to the same overall score — exactly what happens here, so the claim that matching accuracy guarantees equalized odds inverts the actual definition of equalized odds (which requires TPR and FPR to match directly, not accuracy). Reporting only the false positive rate and calling that sufficient for equalized odds ignores half of the definition; equalized odds requires both TPR and FPR to match across groups, and the 40-point TPR gap (90% vs 50%) here is the more consequential harm, since it directly determines which qualified students lose out on the scholarship. Finally, a lower base rate of qualification in one group is not, by itself, evidence that the model's differential ability to recognize qualified candidates is justified. The base rate (100 vs 200 truly qualified) and the model's conditional accuracy at finding those qualified candidates are separate questions; a fairness audit specifically isolates the second one — given that someone is qualified, does the model find them equally often? — and dismissing that gap as "just reflecting merit" conflates the two and forecloses exactly the scrutiny a responsible AI audit is meant to apply.

Question 120 · Normalizing Flows: Invertible Transformations for Generative Modeling · hard

A normalizing flow models the positive-valued distribution of UPI transaction amounts by passing a standard normal latent variable Z ~ N(0, 1) through the invertible transform X = exp(Z). Using the change-of-variables formula p_X(x) = p_Z(f⁻¹(x)) · |d/dx f⁻¹(x)|, which of the following correctly derives the resulting density p_X(x) for x > 0?

  1. Apply the inverse-function Jacobian |dz/dx| = 1/x, giving p_X(x) = [1 / (x√(2π))] · exp(−(ln x)² / 2) for x > 0.
  2. Substitute z = ln x into the standard normal density without any correction factor, giving p_X(x) = [1/√(2π)] · exp(−(ln x)² / 2) for x > 0.
  3. Scale by the forward derivative dx/dz = exp(z) evaluated at x, giving p_X(x) = [x/√(2π)] · exp(−(ln x)² / 2) for x > 0.
  4. Keep the Gaussian's exponent in terms of x itself rather than ln x, giving p_X(x) = [1 / (x√(2π))] · exp(−x² / 2) for x > 0.

Answer: A. Apply the inverse-function Jacobian |dz/dx| = 1/x, giving p_X(x) = [1 / (x√(2π))] · exp(−(ln x)² / 2) for x > 0.

ExplanationThe transform X = exp(Z) is strictly increasing everywhere, so it is invertible with inverse Z = ln X, and the change-of-variables formula for a scalar transform reads p_X(x) = p_Z(f⁻¹(x)) · |d/dx f⁻¹(x)|. Here d/dx[ln x] = 1/x, and the base density is p_Z(z) = (1/√(2π))·exp(−z²/2). Substituting z = ln x and multiplying by the Jacobian factor 1/x gives p_X(x) = [1/(x√(2π))]·exp(−(ln x)²/2) for x > 0 — precisely the log-normal density with parameters μ = 0 and σ = 1, the standard model for strictly positive, right-skewed quantities such as UPI transaction amounts. The Jacobian term is essential: dropping it, as in the second option, would make the density fail to integrate to 1 over x > 0, since areas under the curve in z-space and x-space are related by exactly this stretching factor. Using the forward derivative dx/dz = exp(z) = x in place of its reciprocal, as in the third option, inverts the direction of the required correction — normalizing flows must divide by |det ∂f/∂z|, not multiply by it, when converting a latent density into a data density. And keeping the Gaussian's exponent in terms of x rather than substituting the latent value z = ln x, as in the fourth option, evaluates the base density at entirely the wrong point.
← Set 5Set 7 →