✓ Official Syllabus VerifiedStandards & Rigor ↗
§

Practice set — Part 1 (Q1–Q8)

Fifty applied mathematics problems for AI & Data Science spanning high-dimensional vectors and cosine similarity, neural layer matrix transformations, multivariable calculus and gradient descent optimization, conditional probability and Bayes' theorem, probability distributions and maximum likelihood estimation (MLE), ordinary least squares linear regression, logistic regression and cross-entropy loss, and covariance matrices and Principal Component Analysis (PCA).

1
In anomaly detection, anomaly prior P(A) = 0.02, detection sensitivity P(+|A) = 0.95, and false alarm rate \(P(+|\neg A) = 0.05\). By Bayes' theorem, what is the posterior probability \(P(A|+)\) that an alarm is a true anomaly?
Advanced

By Bayes' Rule: \(P(A|+) = \frac{P(+|A)P(A)}{P(+|A)P(A) + P(+|\neg A)P(\neg A)} = \frac{0.95 \times 0.02}{0.95(0.02) + 0.05(0.98)} = \frac{0.0190}{0.0680} = 0.279\).

Final Answer: \(0.279\)

2
The table summarizes measurements from a cohort study evaluation (MATHAI-723); using these entries, modeling exponential growth \(E(x) = a \cdot b^x\). Determine the next output \(E(3)\).
Advanced

Constant ratio per unit step is \(b = \frac{2}{1} = 2\), so \(E(3) = 4 \cdot 2 = 8\). Verification: confirm row, axis scale, and boundary values directly from the visual and check intermediate arithmetic. Final Answer: \(8\)

3
Given \(n = 12\) independent observations from a normal distribution with sum \(\sum_{i=1}^{12} x_i = 36\), what is the Maximum Likelihood Estimate (MLE) \(\hat{\mu}_{\text{MLE}}\)?
Intermediate

The log-likelihood \(\ln L(\mu) = -\frac{n}{2}\ln(2\pi\sigma^2) - \frac{1}{2\sigma^2}\sum (x_i - \mu)^2\). Setting \(\frac{\partial \ln L}{\partial \mu} = 0\) yields the sample mean \(\hat{\mu} = \frac{1}{n}\sum x_i = \frac{36}{12} = 3\).

Final Answer: \(\hat{\mu}_{\text{MLE}} = 3\)

4
Consider the scalar loss function \(L(w) = 6w^2 - 8w + 5\). Find the analytical gradient \(\nabla L(w)\) evaluated at \(w = 10\).
Intermediate

Analytical Gradient Calculation: Differentiating the quadratic scalar loss \(L(w) = 6w^2 - 8w + 5\) with respect to \(w\) gives \(L'(w) = 12w - 8\). Notice \(L''(w) = 12 > 0\), confirming strict convexity with global minimizer \(w^* = \frac{2}{3}\).

Evaluating at \(w = 10\) yields \(\nabla L(10) = 12(10) - 8 = 120 - 8 = 112\) (indicating \(L\) increases steeply to the right, so gradient descent steps in the negative direction toward \(w^* = \frac{2}{3}\)).

Final Answer: \(\nabla L(10) = 112\)

5
For a bivariate feature dataset, \(\text{Cov}(x, y) = 36\), \(\text{Var}(x) = 12\), \(\bar{x} = 5\), and \(\bar{y} = 35\). Compute the OLS regression slope \(\hat{\beta}_1\) and intercept \(\hat{\beta}_0\).
Advanced

The OLS slope is \(\hat{\beta}_1 = \frac{\text{Cov}(x, y)}{\text{Var}(x)} = \frac{36}{12} = 3\). The intercept is \(\hat{\beta}_0 = \bar{y} - \hat{\beta}_1\bar{x} = 35 - (3)(5) = 35 - 15 = 20\).

Final Answer: \(\hat{\beta}_1 = 3, \; \hat{\beta}_0 = 20\)

6
A spam classification model identifies \(TP = 120\) genuine spam emails and \(FP = 40\) legitimate emails falsely flagged as spam. What is the precision of this model?
Intermediate

Precision is the fraction of predicted positive instances that are truly positive: \(\text{Precision} = \frac{TP}{TP + FP} = \frac{120}{120 + 40} = \frac{120}{160} = 75.0\%\).

Final Answer: \(75.0\%\)

7
Consider a binary classification problem where the decision boundary is defined by the logistic function \(p(x) = \frac{1}{1 + e^{-(\beta_0 + \beta_1 x_1 + \beta_2 x_2)}}\), which represents the probability of a data point \(\mathbf{x} = (x_1, x_2)\) belonging to class 1. The estimated model parameters are \(\beta_0 = -3\), \(\beta_1 = 1\), and \(\beta_2 = -2\). We are interested in the geometric shape of the classification boundary. The classification boundary occurs where \(p(x) = 0.5\). Find the equation of this boundary in the \(x_1x_2\)-plane.
Advanced

The logistic regression model gives the probability of belonging to class 1 as \(p(x) = \frac{1}{1 + e^{-(\beta_0 + \beta_1 x_1 + \beta_2 x_2)}}\). The classification boundary is the set of points where \(p(x) = 0.5\).

Setting \(p(x) = 0.5\), we have:
\(0.5 = \frac{1}{1 + e^{-(\beta_0 + \beta_1 x_1 + \beta_2 x_2)}}\)

This implies:
\(1 + e^{-(\beta_0 + \beta_1 x_1 + \beta_2 x_2)} = 2\)

Therefore:
\(e^{-(\beta_0 + \beta_1 x_1 + \beta_2 x_2)} = 1\)

Taking the natural logarithm of both sides:
\(-(\beta_0 + \beta_1 x_1 + \beta_2 x_2) = \ln(1)\)

Since \(\ln(1) = 0\), we get:
\(\beta_0 + \beta_1 x_1 + \beta_2 x_2 = 0\)

This is the equation of the linear decision boundary.

Substitute the given parameter values: \(\beta_0 = -3\), \(\beta_1 = 1\), and \(\beta_2 = -2\).

\(-3 + x_1 + (-2) \cdot x_2 = 0\)

\(-3 + x_1 - 2x_2 = 0\)

We need to express this in the form \(x_2 = f(x_1)\).

\(2x_2 = x_1 - 3\)

\(x_2 = \frac{1}{2} x_1 - \frac{3}{2}\)

8
A 2D linear transformation \(T\) is defined by the matrix \(M = \begin{pmatrix} 3 & 1 \\ 1 & 3 \end{pmatrix}\). Consider a triangle with vertices \(A = (1, 0)\), \(B = (0, 1)\), and \(C = (1, 1)\). This triangle is transformed by \(T\) to a new triangle with vertices \(A'\), \(B'\), and \(C'\). The area of the transformed triangle \(A'B'C'\) is then passed through a ReLU activation function, \(f(x) = \max(0, x)\). What is the final output value?
Advanced

The area of the original triangle with vertices \(A = (1, 0)\), \(B = (0, 1)\), and \(C = (1, 1)\) can be calculated. We can use the determinant formula for the area of a triangle given its vertices \((x_1, y_1), (x_2, y_2), (x_3, y_3)\): Area = \(\frac{1}{2} |x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2)|\).
Plugging in the coordinates: Area = \(\frac{1}{2} |1(1 - 1) + 0(1 - 0) + 1(0 - 1)| = \frac{1}{2} |0 + 0 - 1| = \frac{1}{2}\).

A linear transformation represented by a matrix \(M\) scales the area of a 2D shape by the absolute value of the determinant of the matrix \(M\). The determinant of \(M = \begin{pmatrix} 3 & 1 \\ 1 & 3 \end{pmatrix}\) is \(\det(M) = (3 \times 3) - (1 \times 1) = 9 - 1 = 8\). The absolute value is \(|8| = 8\).
Therefore, the area of the transformed triangle \(A'B'C'\) is the original area multiplied by the determinant: Area(\(A'B'C'\)) = \(\frac{1}{2} \times 8 = 4\).
This area is then passed through a ReLU activation function \(f(x) = \max(0, x)\). Since the area is 4, which is positive, the ReLU function will return the value itself: \(f(4) = \max(0, 4) = 4\).
Thus, the final output value is 4.

Final Answer: \(4\)

AI-assisted, human-reviewed: Questions and walkthroughs are developed with AI assistance and reviewed by senior educators.Report an error here ↗