MauryaHub PYQ Practice

Machine Learning Foundations · End Term · Jan 2026 · FN

Machine Learning Foundations · End Term · Jan 2026 FN

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

14 / 14 published solutions

Question 2 MCQ · 2.0 marks

Let
Source diagram or notation
. That is,
Source diagram or notation
is distributed uniformly over
Source diagram or notation
. Define
Source diagram or notation
. Which of the following is true regarding the random variable
Source diagram or notation
?
6406536934570.Source diagram or notation
6406536934571.Source diagram or notation
6406536934572.Source diagram or notation
6406536934573.Source diagram or notation

Published solution

**1. Understand the given random variable and transformation:** We are given that \(X \sim U[1, 3]\), meaning \(X\) is uniformly distributed on the interval \([1, 3]\) with probability density function \(f_X(x) = \frac{1}{3 - 1} = \frac{1}{2}\) for \(1 \le x \le 3\). We define the linear transformation: \[Y = 2X + 4\] **2. Determine the support and distribution of \(Y\):** A non-degenerate linear transformation \(Y = aX + b\) (with \(a > 0\)) of a continuous uniform random variable on \([u, v]\) is also uniformly distributed on the transformed interval \([au + b, av + b]\). Substituting \(u = 1, v = 3\) and \(a = 2, b = 4\): - Lower endpoint: \(y_{\min} = 2(1) + 4 = 6\) - Upper endpoint: \(y_{\max} = 2(3) + 4 = 10\) **3. Verify using the PDF transformation method:** Since \(x = \frac{y - 4}{2}\), the Jacobian is \(\left|\frac{dx}{dy}\right| = \frac{1}{2}\). Thus, for \(y \in [6, 10]\): \[f_Y(y) = f_X\left(\frac{y-4}{2}\right) \cdot \frac{1}{2} = \frac{1}{2} \cdot \frac{1}{2} = \frac{1}{4} = \frac{1}{10 - 6}\] This confirms that \(Y \sim U[6, 10]\). **Answer: A — U[6, 10].** A: **Correct:** Mapping the endpoints \(x = 1\) and \(x = 3\) through \(Y = 2X + 4\) gives \(Y \sim U[6, 10]\). B: **Incorrect:** A linear transformation of a uniform random variable remains uniformly distributed, not Normal. C: **Incorrect:** Transforming \([1, 3]\) by \(2X + 4\) shifts and scales the interval to \([6, 10]\); it does not stay on \([1, 3]\). D: **Incorrect:** Multiplying \(X \in [1, 3]\) by \(2\) gives \([2, 6]\), and adding \(4\) shifts it to \([6, 10]\), not \([5, 7]\).

Report a correction for Q2

Question 3 MCQ · 3.0 marks

Consider two functions
Source diagram or notation
and
Source diagram or notation
given by:
Source diagram or notation
Which of the following is true?
6406536934574.
Both
Source diagram or notation
and
Source diagram or notation
are convex
6406536934575.
Only
Source diagram or notation
is convex
6406536934576.
Only
Source diagram or notation
is convex
6406536934577.
Neither
Source diagram or notation
nor
Source diagram or notation
is convex

Published solution

**1. Recall the second-derivative test for convexity:** A twice-differentiable function \(h(x)\) on an open interval \((0, \infty)\) is convex if and only if its second derivative satisfies \(h''(x) \ge 0\) for all \(x \in (0, \infty)\). **2. Check the convexity of \(f(x) = x \ln x\) on \((0, \infty)\):** Using the product rule to differentiate \(f(x) = x \ln x\): \[f'(x) = 1 \cdot \ln x + x \cdot \frac{1}{x} = \ln x + 1\] Differentiating a second time: \[f''(x) = \frac{1}{x}\] Since \(x > 0\) on \((0, \infty)\), we have \(f''(x) = \frac{1}{x} > 0\) everywhere on \((0, \infty)\). Thus, \(f(x)\) is strictly convex. **3. Check the convexity of \(g(x) = x^2 - \ln x\) on \((0, \infty)\):** Differentiating \(g(x) = x^2 - \ln x\) twice: \[g'(x) = 2x - \frac{1}{x}\] \[g''(x) = 2 + \frac{1}{x^2}\] For all \(x > 0\), both \(2 > 0\) and \(\frac{1}{x^2} > 0\), so \(g''(x) > 0\) on \((0, \infty)\). (Equivalently, \(x^2\) is convex and \(-\ln x\) is convex on \((0, \infty)\), and the sum of two convex functions is convex.) Thus, both \(f\) and \(g\) are convex. **Answer: A — Both f and g are convex.** A: **Correct:** For all \(x > 0\), \(f''(x) = \frac{1}{x} > 0\) and \(g''(x) = 2 + \frac{1}{x^2} > 0\), so both functions are convex on \((0, \infty)\). B: **Incorrect:** Not only \(f\), but also \(g(x) = x^2 - \ln x\) is convex because \(g''(x) = 2 + 1/x^2 > 0\) for all \(x > 0\). C: **Incorrect:** Not only \(g\), but also \(f(x) = x \ln x\) is convex because \(f''(x) = 1/x > 0\) for all \(x > 0\). D: **Incorrect:** Both functions have strictly positive second derivatives on \((0, \infty)\) and are therefore convex.

Report a correction for Q3

Question 4 MSQ · 3.0 marks

Find all square matrices
Source diagram or notation
from the given options for which
Source diagram or notation
is given as:
Source diagram or notation
where
Source diagram or notation
.
6406536934578.Source diagram or notation
6406536934579.Source diagram or notation
6406536934580.Source diagram or notation
6406536934581.Source diagram or notation

Published solution

**1. Write out the general quadratic form \(x^T A x\) in \(\mathbb{R}^2\):** Let \(x = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}\) and \(A = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}\). Expanding \(x^T A x\) gives: \[x^T A x = \begin{bmatrix} x_1 & x_2 \end{bmatrix} \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = a_{11} x_1^2 + (a_{12} + a_{21}) x_1 x_2 + a_{22} x_2^2\] **2. Match coefficients with the given polynomial:** We are given: \[f(x) = x_1^2 - 4x_1 x_2 + 2x_2^2\] Comparing coefficients term by term, a matrix \(A\) represents \(f(x)\) if and only if: - \(a_{11} = 1\) - \(a_{22} = 2\) - \(a_{12} + a_{21} = -4\) **3. Check each option:** - Option A: \(\begin{bmatrix} 1 & -2 \\ -2 & 2 \end{bmatrix}\) has \(a_{11}=1, a_{22}=2\), and \(a_{12}+a_{21} = -2 + (-2) = -4\). (Valid!) - Option B: \(\begin{bmatrix} 1 & -4 \\ 0 & 2 \end{bmatrix}\) has \(a_{11}=1, a_{22}=2\), and \(a_{12}+a_{21} = -4 + 0 = -4\). (Valid!) - Option C: \(\begin{bmatrix} 1 & -4 \\ -4 & 2 \end{bmatrix}\) has \(a_{12}+a_{21} = -4 + (-4) = -8 \neq -4\). (Invalid.) - Option D: \(\begin{bmatrix} 2 & -2 \\ -2 & 1 \end{bmatrix}\) has \(a_{11}=2 \neq 1\) and \(a_{22}=1 \neq 2\). (Invalid.) **Answer: A, B — [[1, -2], [-2, 2]] and [[1, -4], [0, 2]].** A: **Correct:** Expanding \(x^T \begin{bmatrix} 1 & -2 \\ -2 & 2 \end{bmatrix} x\) gives \(x_1^2 + (-2 - 2)x_1 x_2 + 2x_2^2 = x_1^2 - 4x_1 x_2 + 2x_2^2\). B: **Correct:** Expanding \(x^T \begin{bmatrix} 1 & -4 \\ 0 & 2 \end{bmatrix} x\) gives \(x_1^2 + (-4 + 0)x_1 x_2 + 2x_2^2 = x_1^2 - 4x_1 x_2 + 2x_2^2\). C: **Incorrect:** The off-diagonal entries sum to \(-4 + (-4) = -8\), which produces \(x_1^2 - 8x_1 x_2 + 2x_2^2\). D: **Incorrect:** The diagonal entries are swapped, producing \(2x_1^2 - 4x_1 x_2 + x_2^2\) instead of \(x_1^2 - 4x_1 x_2 + 2x_2^2\).

Report a correction for Q4

Question 5 MSQ · 3.0 marks

Which of the following is/are Hermitian matrices?
6406536934582.Source diagram or notation
, where
Source diagram or notation
is a complex square matrix.
6406536934583.Source diagram or notation
, where
Source diagram or notation
is a complex square matrix.
6406536934584.Source diagram or notation
, where
Source diagram or notation
is a complex matrix, not necessarily square.
6406536934585.Source diagram or notation
, where
Source diagram or notation
is a complex square matrix.

Published solution

**1. Define a Hermitian matrix:** A square complex matrix \(M\) is called Hermitian (or self-adjoint) if it equals its own conjugate transpose: \[M^* = M\] Recall the properties of the conjugate transpose: \((X + Y)^* = X^* + Y^*\), \((XY)^* = Y^* X^*\), and \((X^*)^* = X\). Note also that \(M\) must be a square matrix for \(M^* = M\) to even be defined. **2. Check each candidate matrix:** - **Option A:** \(M = A^* + A\), where \(A\) is a complex square matrix. Taking the conjugate transpose: \[M^* = (A^* + A)^* = (A^*)^* + A^* = A + A^* = M\] Thus, \(A^* + A\) is always Hermitian. - **Option B:** \(M = A^* - A\), where \(A\) is a complex square matrix. Taking the conjugate transpose: \[M^* = (A^* - A)^* = A - A^* = -(A^* - A) = -M\] This is skew-Hermitian, not Hermitian (unless \(A = A^*\)). - **Option C:** \(M = A^* A\), where \(A\) is any complex \(m \times n\) matrix. First, \(A^*\) is \(n \times m\) and \(A\) is \(m \times n\), so \(A^* A\) is an \(n \times n\) square matrix. Taking its conjugate transpose: \[M^* = (A^* A)^* = A^* (A^*)^* = A^* A = M\] Thus, \(A^* A\) is always Hermitian! - **Option D:** \(A^* + A\) where \(A\) is a non-square \(m \times n\) matrix (\(m \neq n\)). Since \(A^*\) has size \(n \times m\) and \(A\) has size \(m \times n\), their sum \(A^* + A\) is not even defined. **Answer: A, C — A^* + A (for square A) and A^* A (for any m x n complex matrix A).** A: **Correct:** For any square matrix \(A\), \((A^* + A)^* = (A^*)^* + A^* = A + A^* = A^* + A\), so it is Hermitian. B: **Incorrect:** Since \((A^* - A)^* = A - A^* = -(A^* - A)\), this matrix is skew-Hermitian rather than Hermitian. C: **Correct:** For any \(m \times n\) matrix \(A\), \(A^* A\) is an \(n \times n\) square matrix satisfying \((A^* A)^* = A^* (A^*)^* = A^* A\). D: **Incorrect:** When \(m \neq n\), \(A^*\) is \(n \times m\) and \(A\) is \(m \times n\), so the matrix addition \(A^* + A\) is undefined.

Report a correction for Q5

Question 6 MSQ · 3.0 marks

Which of the following is/are true?
6406536934586.
A set
Source diagram or notation
is convex if and only if convex-hull
Source diagram or notation
.
6406536934587.
If
Source diagram or notation
is a non-empty convex set in
Source diagram or notation
with a finite number of elements, then
Source diagram or notation
has exactly one element.
6406536934588.
If
Source diagram or notation
is a convex function, then
Source diagram or notation
is differentiable.
6406536934589.
If
Source diagram or notation
is a function, then the epigraph of
Source diagram or notation
is a subset of
Source diagram or notation
.

Published solution

**1. Analyze each statement about convex sets and convex functions:** - **Statement A:** The convex hull of a set \(S\), denoted \(\text{conv}(S)\), is the smallest convex set containing \(S\). If \(S\) is already convex, it contains all convex combinations of its points, so \(\text{conv}(S) = S\). Conversely, if \(\text{conv}(S) = S\), then \(S\) equals a convex set and is therefore convex. Thus, Statement A is **true**. - **Statement B:** Suppose \(S \subseteq \mathbb{R}\) is a non-empty convex set with a finite number of elements. If \(S\) contained two distinct real numbers \(a < b\), then by convexity \(S\) would have to contain the entire continuous interval \([a, b]\), which has infinitely many points. Therefore, a finite non-empty convex subset of \(\mathbb{R}\) can only contain a single point (at most—and hence exactly—one element). Thus, Statement B is **true**. - **Statement C:** If \(f\) is a convex function, then \(-f\) is a *concave* function, not convex (unless \(f\) is affine). For example, \(f(x) = x^2\) is convex, while \(-f(x) = -x^2\) is strictly concave. Thus, Statement C is **false**. - **Statement D:** A function \(f\) is convex *if and only if* its epigraph \(\text{epi}(f) = \{(x, t) : t \ge f(x)\}\) is a convex set. For a non-convex function (like \(f(x) = -x^2\)), the epigraph is not convex. Thus, Statement D is **false**. **Answer: A, B — A set S is convex iff convex-hull(S) = S, and any finite non-empty convex set in R has exactly one element.** A: **Correct:** A set contains all convex combinations of its elements if and only if it equals its own convex hull. B: **Correct:** Any convex set containing two distinct points must contain the infinite line segment between them; hence a finite non-empty convex set in \(\mathbb{R}\) has exactly one element. C: **Incorrect:** Negating a convex function reverses Jensen's inequality, making \(-f\) concave rather than convex (unless \(f\) is linear/affine). D: **Incorrect:** The epigraph of \(f\) is a convex set if and only if \(f\) is a convex function, not for an arbitrary function.

Report a correction for Q6

Question 7 MSQ · 3.0 marks

Consider a constrained optimization problem in
Source diagram or notation
with a single inequality constraint as given below:
Source diagram or notation
Which of the following is/are feasible directions at the point
Source diagram or notation
?
6406536934590.Source diagram or notation
6406536934591.Source diagram or notation
6406536934592.Source diagram or notation
6406536934593.Source diagram or notation

Published solution

**1. Understand feasible directions at a boundary point:** We have a constrained region defined by \(g(x, y) = 3x^2 - 2xy + 3y^2 \le 1\), and a point \(p = \left(0, \frac{1}{\sqrt{3}}\right)\). First, check that \(p\) lies on the boundary \(g(x, y) = 1\): \[g\left(0, \frac{1}{\sqrt{3}}\right) = 3(0)^2 - 2(0)\left(\frac{1}{\sqrt{3}}\right) + 3\left(\frac{1}{\sqrt{3}}\right)^2 = 3\left(\frac{1}{3}\right) = 1\] For a smooth convex constraint \(g(x, y) \le 1\) active at \(p\), a non-zero vector \(d = (d_1, d_2)\) is a feasible direction (meaning \(p + \alpha d\) stays inside \(\{g \le 1\}\) for small \(\alpha > 0\)) if it points into the interior of the region, i.e.: \[\nabla g(p)^T d < 0\] **2. Compute the gradient \(\nabla g(p)\):** Taking the partial derivatives of \(g(x, y) = 3x^2 - 2xy + 3y^2\): \[\frac{\partial g}{\partial x} = 6x - 2y, \quad \frac{\partial g}{\partial y} = -2x + 6y\] Evaluating at \(p = \left(0, \frac{1}{\sqrt{3}}\right)\): \[\nabla g(p) = \left(-\frac{2}{\sqrt{3}},\; \frac{6}{\sqrt{3}}\right) = \frac{2}{\sqrt{3}}(-1, 3)\] **3. Test each direction \(d = (d_1, d_2)\) using \(\nabla g(p)^T d < 0 \iff -d_1 + 3d_2 < 0 \iff d_1 > 3d_2\):** - **Option A:** \(d = (1, 0) \implies -1(1) + 3(0) = -1 < 0\). (Feasible!) - **Option B:** \(d = (3, -1) \implies -1(3) + 3(-1) = -6 < 0\). (Feasible!) - **Option C:** \(d = (-1, 0) \implies -1(-1) + 3(0) = +1 > 0\). (Infeasible.) - **Option D:** \(d = (-5, 2) \implies -1(-5) + 3(2) = 5 + 6 = +11 > 0\). (Infeasible.) **Answer: A, B — (1, 0) and (3, -1).** A: **Correct:** At \(p = (0, 1/\sqrt{3})\), the directional derivative along \(d = (1, 0)\) is \(\nabla g(p)^T d = -2/\sqrt{3} < 0\), so moving in direction \((1, 0)\) decreases \(g\) and keeps the point feasible. B: **Correct:** Along \(d = (3, -1)\), \(\nabla g(p)^T d = \frac{2}{\sqrt{3}}(-3 - 3) = -\frac{12}{\sqrt{3}} < 0\), so \((3, -1)\) is a feasible direction. C: **Incorrect:** Along \(d = (-1, 0)\), \(\nabla g(p)^T d = +2/\sqrt{3} > 0\), which immediately increases \(g(x, y)\) above \(1\). D: **Incorrect:** Along \(d = (-5, 2)\), \(\nabla g(p)^T d = \frac{2}{\sqrt{3}}(5 + 6) = \frac{22}{\sqrt{3}} > 0\), moving outside the feasible region.

Report a correction for Q7

Question 8 NAT · 2.0 marks

The number of automobiles sold weekly at a certain dealership is a random variable with expected value
Source diagram or notation
. Using Markov's inequality, find the tightest upper bound to the probability that the next week's sales is at least
Source diagram or notation
. Enter your answer correct to one decimal place. Note that an upper bound of
Source diagram or notation
is valid but not tight.

Published solution

**1. State Markov's inequality:** For any non-negative random variable \(X \ge 0\) and any threshold \(a > 0\), Markov's inequality provides the upper bound: \[P(X \ge a) \le \frac{E[X]}{a}\] **2. Identify the given values:** - \(X\) is the number of automobiles sold weekly (so \(X \ge 0\)). - Expected value \(E[X] = 16\). - Threshold \(a = 20\). **3. Compute the upper bound:** Substituting \(E[X] = 16\) and \(a = 20\) into Markov's inequality: \[P(X \ge 20) \le \frac{16}{20} = \frac{4}{5} = 0.8\] **Answer: 0.8.**

Report a correction for Q8

Question 9 NAT · 2.0 marks

Consider a classifier
Source diagram or notation
for a binary classification problem as given below:
Source diagram or notation
The dataset has four data-points.
Source diagram or notation
are the features and
Source diagram or notation
is the true label:
Source diagram or notation
Find the loss of
Source diagram or notation
on this dataset and enter your answer correct to two decimal places. Recall that the loss is the average number of misclassified points.

Published solution

**1. Understand the classifier and loss function:** We are given a binary classifier \(h(x)\) for \(x = (x_1, x_2, x_3)^T\): \[h(x) = \begin{cases} 1, & \text{if } x_1 - 2x_2 + x_3 \ge 0 \\ -1, & \text{otherwise} \end{cases}\] The 0-1 loss for each sample is \(\ell(h(x_i), y_i) = 0\) if \(h(x_i) = y_i\) and \(1\) if \(h(x_i) \neq y_i\). The empirical risk (average loss) over \(N = 4\) samples is: \[R_{\text{emp}}(h) = \frac{1}{4} \sum_{i=1}^{4} \ell(h(x_i), y_i)\] **2. Evaluate \(h(x_i)\) on each of the four data points:** - **Point 1:** \(x^{(1)} = (1, 0, 1)^T, y_1 = 1\). Compute \(1 - 2(0) + 1 = 2 \ge 0 \implies h(x^{(1)}) = 1 = y_1\). Loss \(= 0\). - **Point 2:** \(x^{(2)} = (0, 1, 1)^T, y_2 = -1\). Compute \(0 - 2(1) + 1 = -1 < 0 \implies h(x^{(2)}) = -1 = y_2\). Loss \(= 0\). - **Point 3:** \(x^{(3)} = (1, 1, 1)^T, y_3 = 1\). Compute \(1 - 2(1) + 1 = 0 \ge 0 \implies h(x^{(3)}) = 1 = y_3\). Loss \(= 0\). - **Point 4:** \(x^{(4)} = (0, 1, 0)^T, y_4 = 1\). Compute \(0 - 2(1) + 0 = -2 < 0 \implies h(x^{(4)}) = -1 \neq y_4\). Loss \(= 1\). **3. Compute the average loss:** Out of \(4\) samples, exactly \(1\) sample is misclassified: \[R_{\text{emp}}(h) = \frac{0 + 0 + 0 + 1}{4} = \frac{1}{4} = 0.25\] **Answer: 0.25.**

Report a correction for Q9

Question 10 NAT · 3.0 marks

Consider a
Source diagram or notation
matrix
Source diagram or notation
with eigenvalues
Source diagram or notation
and
Source diagram or notation
. Find the sum of the eigenvalues of the matrix
Source diagram or notation
. Your answer should be an integer. **Note:** I is the identity matrix.

Published solution

**1. Recall how shifting a matrix by \(cI\) affects its eigenvalues:** If \(\lambda\) is an eigenvalue of a square matrix \(A\) with eigenvector \(v\) (so \(Av = \lambda v\)), then for the shifted matrix \(B = A - 3I\): \[(A - 3I)v = Av - 3Iv = \lambda v - 3v = (\lambda - 3)v\] Thus, each eigenvalue \(\lambda_i\) of \(A\) shifts to \(\lambda_i - 3\) for \(A - 3I\). **2. Compute the eigenvalues of \(B = A - 3I\):** We are given that the eigenvalues of \(A\) are \(\lambda_1 = 1\), \(\lambda_2 = 3\), and \(\lambda_3 = 7\). Subtracting \(3\) from each eigenvalue gives the eigenvalues of \(B\): - \(\mu_1 = 1 - 3 = -2\) - \(\mu_2 = 3 - 3 = 0\) - \(\mu_3 = 7 - 3 = 4\) **3. Sum the eigenvalues of \(B\):** \[\mu_1 + \mu_2 + \mu_3 = (-2) + 0 + 4 = 2\] **Answer: 2.**

Report a correction for Q10

Question 11 NAT · 3.0 marks

Let
Source diagram or notation
be an exponentially distributed random variable with mean
Source diagram or notation
. Find the value of
Source diagram or notation
for which
Source diagram or notation
. Enter your answer correct to two decimal places.

Published solution

**1. Determine the rate parameter \(\lambda\) of the Exponential distribution:** For an exponentially distributed random variable \(X \sim \text{Exponential}(\lambda)\), the mean is \(E[X] = \frac{1}{\lambda}\). We are given that the mean is \(\frac{1}{2}\), so: \[\frac{1}{\lambda} = \frac{1}{2} \implies \lambda = 2\] **2. Set up the tail probability equation:** For \(c > 0\), the survival probability is \(P(X > c) = e^{-\lambda c} = e^{-2c}\). We are given that \(P(X > c) = 0.25 = \frac{1}{4}\): \[e^{-2c} = \frac{1}{4} \implies e^{2c} = 4\] **3. Solve for \(c\):** Taking the natural logarithm on both sides: \[2c = \ln(4) = 2\ln(2) \implies c = \ln(2) \approx 0.6931\] Rounding to two decimal places gives \(0.69\). **Answer: 0.69.**

Report a correction for Q11

Question 12 NAT · 3.0 marks

The joint density function of
Source diagram or notation
and
Source diagram or notation
is given by:
Source diagram or notation
Compute
Source diagram or notation
. Enter your answer correct to two decimal places.

Published solution

**1. Understand the given joint density function:** We are given the joint PDF of \(X\) and \(Y\): \[f(x, y) = \begin{cases} 2e^{-x}e^{-2y}, & x > 0,\; y > 0 \\ 0, & \text{otherwise} \end{cases}\] Notice that \(f(x, y) = (e^{-x})(2e^{-2y})\), which means \(X \sim \text{Exponential}(1)\) and \(Y \sim \text{Exponential}(2)\) are independent random variables. **2. Set up the double integral for \(P(X < Y)\):** To find \(P(X < Y)\), we integrate \(x\) from \(0\) to \(y\), and \(y\) from \(0\) to \(\infty\): \[P(X < Y) = \int_{0}^{\infty} \left( \int_{0}^{y} e^{-x}\,dx \right) 2e^{-2y}\,dy\] **3. Evaluate the inner and outer integrals:** First, evaluate the inner integral with respect to \(x\): \[\int_{0}^{y} e^{-x}\,dx = \left[-e^{-x}\right]_{0}^{y} = 1 - e^{-y}\] Now substitute this into the outer integral: \[P(X < Y) = \int_{0}^{\infty} 2e^{-2y}(1 - e^{-y})\,dy = \int_{0}^{\infty} \left(2e^{-2y} - 2e^{-3y}\right) dy\] Since \(\int_0^\infty ke^{-ky}\,dy = 1\), we get: \[P(X < Y) = 1 - \frac{2}{3} = \frac{1}{3} \approx 0.3333\] Rounding to two decimal places gives \(0.33\). **Answer: 0.33.**

Report a correction for Q12

Question 13 NAT · 3.0 marks

The dataset
Source diagram or notation
is sampled from a distribution whose PDF is given below with parameter
Source diagram or notation
:
Source diagram or notation
Assume that each point in the dataset is sampled independently from this distribution. Find the maximum likelihood estimate for
Source diagram or notation
. Your answer should be an integer.

Published solution

**1. Write down the likelihood function for the dataset:** We are given the observed sample \(D = \{1, 2, 4, 5, 8\}\) of size \(n = 5\) drawn independently from the PDF: \[f(x; \theta) = \begin{cases} \dfrac{2x}{\theta^2}, & 0 < x \le \theta \\ 0, & \text{otherwise} \end{cases}\] For the likelihood \(L(\theta) = \prod_{i=1}^5 f(x_i; \theta)\) to be non-zero, every observed sample \(x_i\) must lie inside the support \((0, \theta]\). That requires \(\theta \ge \max(x_1, x_2, x_3, x_4, x_5) = 8\). **2. Analyze how \(L(\theta)\) behaves for \(\theta \ge 8\):** For \(\theta \ge 8\), the likelihood function is: \[L(\theta) = \prod_{i=1}^{5} \frac{2x_i}{\theta^2} = \frac{2^5 (1 \cdot 2 \cdot 4 \cdot 5 \cdot 8)}{\theta^{10}} = \frac{10240}{\theta^{10}}\] Because \(\theta^{10}\) is in the denominator and \(\theta > 0\), \(L(\theta)\) is a strictly decreasing function of \(\theta\) on the interval \([8, \infty)\). **3. Find the Maximum Likelihood Estimate (MLE):** To maximize \(L(\theta) = \frac{10240}{\theta^{10}}\) subject to \(\theta \ge 8\), we must choose the smallest permissible value of \(\theta\), which is: \[\hat{\theta}_{\text{MLE}} = \max_{i} x_i = 8\] **Answer: 8.**

Report a correction for Q13

Question 14 NAT · 3.0 marks

Aman is evaluating candidates for a Machine Learning role. The time
Source diagram or notation
(in hours) taken to complete a technical interview round follows the probability density function:
Source diagram or notation
Find the expected time taken to complete an interview. Your answer should be an integer.

Published solution

**1. Understand the given probability density function:** The interview duration \(X\) (in hours) has the PDF: \[f_X(x) = \begin{cases} \dfrac{1}{18}(6 - x), & 0 \le x \le 6 \\ 0, & \text{otherwise} \end{cases}\] We need to find the expected time \(E[X]\). **2. Set up the integral for the expected value \(E[X]\):** By the definition of mathematical expectation for a continuous random variable: \[E[X] = \int_{-\infty}^{\infty} x f_X(x)\,dx = \int_{0}^{6} x \cdot \frac{1}{18}(6 - x)\,dx = \frac{1}{18} \int_{0}^{6} (6x - x^2)\,dx\] **3. Evaluate the integral step by step:** Integrating term by term: \[E[X] = \frac{1}{18} \left[ 3x^2 - \frac{x^3}{3} \right]_{0}^{6}\] Substitute the upper limit \(x = 6\): \[E[X] = \frac{1}{18} \left( 3(36) - \frac{216}{3} \right) = \frac{1}{18} (108 - 72) = \frac{36}{18} = 2\] **Answer: 2.**

Report a correction for Q14

Question 15 NAT · 4.0 marks

Using the method of Lagrange multipliers solve the following constrained optimization problem:
Source diagram or notation
Find the minimum value of the objective function. You can assume that the problem does have a global minimum. Your answer should be an integer.

Published solution

**1. Set up the Lagrangian function:** We want to minimize \(f(x, y) = 8x^2 - 2y\) subject to the constraint \(g(x, y) = x^2 + y^2 - 1 = 0\). The Lagrangian is: \[\mathcal{L}(x, y, \lambda) = 8x^2 - 2y + \lambda(x^2 + y^2 - 1)\] **2. Find the stationary points:** Setting the partial derivatives with respect to \(x\), \(y\), and \(\lambda\) to zero: 1. \(\frac{\partial \mathcal{L}}{\partial x} = 16x + 2\lambda x = 2x(8 + \lambda) = 0 \implies x = 0\) or \(\lambda = -8\). 2. \(\frac{\partial \mathcal{L}}{\partial y} = -2 + 2\lambda y = 0 \implies \lambda y = 1\). 3. \(x^2 + y^2 = 1\). **3. Evaluate the candidate points:** - **Case 1 (\(x = 0\)):** From \(x^2 + y^2 = 1\), we get \(y^2 = 1 \implies y = 1\) or \(y = -1\). - At \((0, 1)\): \(f(0, 1) = 8(0)^2 - 2(1) = -2\). - At \((0, -1)\): \(f(0, -1) = 8(0)^2 - 2(-1) = +2\). - **Case 2 (\(\lambda = -8\)):** From \(\lambda y = 1\), we get \(y = -\frac{1}{8}\), and \(x^2 = 1 - \frac{1}{64} = \frac{63}{64}\). - Here, \(f(x, y) = 8\left(\frac{63}{64}\right) - 2\left(-\frac{1}{8}\right) = \frac{63}{8} + \frac{2}{8} = \frac{65}{8} = 8.125\). Comparing all candidate values (\(-2\), \(2\), and \(8.125\)), the global minimum value of \(8x^2 - 2y\) on the unit circle is \(-2\) (achieved at \(x = 0, y = 1\)). (Alternatively, since \(x^2 \ge 0\) and \(y \le 1\) on \(x^2 + y^2 = 1\), we immediately have \(8x^2 - 2y \ge 0 - 2(1) = -2\).) **Answer: -2.**

Report a correction for Q15