First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Mathematics and Statistics Foundations
What is the derivative of f(x) = x^3 with respect to x?
- 3x^2 Correct answer.
- x^4/4
- 3x
- x^2
Explanation
The power rule states that the derivative of x^n is n·x^(n-1). Applying it with n = 3 gives 3x^2.
Question 2Mathematics and Statistics Foundations
A fair six-sided die is rolled once. What is the probability of rolling an even number?
- 2/3
- 1/2 Correct answer.
- 1/3
- 1/6
Explanation
The even outcomes are 2, 4, and 6, giving 3 favorable outcomes out of 6 equally likely outcomes. Thus the probability is 3/6 = 1/2.
Question 3Mathematics and Statistics Foundations
Which matrix operation requires the number of columns of the first matrix to equal the number of rows of the second?
- Transposition
- Matrix multiplication Correct answer.
- Element-wise addition
- Scalar multiplication
Explanation
Matrix multiplication is defined only when the inner dimensions match, i.e., columns of the left factor equal rows of the right factor. The resulting matrix has the outer dimensions.
Question 4Mathematics and Statistics Foundations
If a random variable X has expected value E[X] = 5, what is E[3X + 2]?
- 21
- 10
- 15
- 17 Correct answer.
Explanation
Expectation is linear, so E[3X + 2] = 3·E[X] + 2 = 3·5 + 2 = 17.
Question 5Mathematics and Statistics Foundations
What does the central limit theorem state about the sample mean of independent, identically distributed variables with finite variance?
- It converges in distribution to a normal distribution as sample size grows Correct answer.
- It always equals the population mean
- Its variance grows without bound as sample size grows
- It is exactly normal for any sample size
Explanation
The central limit theorem says the standardized sample mean approaches a standard normal distribution as the sample size increases, regardless of the underlying distribution's shape (given finite variance).
Question 6Mathematics and Statistics Foundations
What is the value of the integral of f(x) = 1 over the interval [0, 4]?
- 4 Correct answer.
- 8
- 2
- 0
Explanation
The definite integral of the constant 1 over [0, 4] equals the length of the interval, 4. Geometrically it is the area of a rectangle with height 1 and width 4.
Question 7Mathematics and Statistics Foundations
In a vector space, which property must every vector v satisfy with respect to the additive identity 0?
- v + 0 = v Correct answer.
- v · 0 = 0
- v + v = 0
- 0 - v = v
Explanation
The additive identity axiom requires that adding the zero vector to any vector leaves it unchanged, i.e., v + 0 = v. This is one of the vector space axioms.
Question 8Mathematics and Statistics Foundations
A function f is convex on an interval. What can be said about any local minimum of f in the interior of that interval?
- It must occur at a boundary point
- It is a local maximum
- It cannot exist
- It is a global minimum Correct answer.
Explanation
For a convex function, any local minimum in the interior is also a global minimum. Convexity guarantees the function lies below the chord between any two points, ruling out higher separate minima.
Question 9Mathematics and Statistics Foundations
A bag contains 3 red and 2 blue balls. Two balls are drawn without replacement. What is the probability both are red?
- 1/2
- 2/5
- 9/25
- 3/10 Correct answer.
Explanation
The probability the first is red is 3/5, and given that, the second is red with probability 2/4. Multiplying gives (3/5)(2/4) = 6/20 = 3/10.
Question 10Mathematics and Statistics Foundations
Consider the matrix A = [[2, 0], [0, 3]]. What are its eigenvalues?
- 0 and 6
- 1 and 1
- 2 and 2
- 2 and 3 Correct answer.
Explanation
For a diagonal matrix, the eigenvalues are exactly the diagonal entries. Here those entries are 2 and 3.
Question 11Mathematics and Statistics Foundations
A coin lands heads with probability p. It is flipped until the first head appears. What is the expected number of flips?
- 1/(1-p)
- p/(1-p)
- 1/p Correct answer.
- p
Explanation
The number of flips follows a geometric distribution with success probability p. Its expectation is the reciprocal of the success probability, 1/p.
Question 12Mathematics and Statistics Foundations
What is the gradient of f(x, y) = x^2 y at the point (1, 2)?
- (2, 1)
- (4, 2)
- (1, 4)
- (4, 1) Correct answer.
Explanation
The partial derivative with respect to x is 2xy, and with respect to y is x^2. Evaluating at (1, 2) gives (4, 1).
Question 13Mathematics and Statistics Foundations
If X and Y are independent random variables, which statement about their covariance is always true?
- Cov(X, Y) = 1
- Cov(X, Y) = Var(X)Var(Y)
- Cov(X, Y) = 0 Correct answer.
- Cov(X, Y) = E[X]E[Y]
Explanation
Independence implies E[XY] = E[X]E[Y], so Cov(X, Y) = E[XY] - E[X]E[Y] = 0. Thus independent variables are uncorrelated.
Question 14Mathematics and Statistics Foundations
A sequence a_n is defined by a_n = 1/n for n ≥ 1. What is the limit of a_n as n approaches infinity?
- It does not exist
- 1
- Infinity
- 0 Correct answer.
Explanation
As n grows without bound, 1/n approaches 0. For any epsilon > 0, choosing n > 1/epsilon makes |1/n| < epsilon.
Question 15Mathematics and Statistics Foundations
In hypothesis testing, what does the p-value represent?
- The probability of observing data at least as extreme as the observed, assuming the null is true Correct answer.
- The probability of a type II error
- The probability the null hypothesis is true
- The significance level chosen in advance
Explanation
The p-value is the probability, computed under the null hypothesis, of obtaining a test statistic at least as extreme as the one observed. It is not the probability that the null is true.
Question 16Mathematics and Statistics Foundations
What is the rank of the 3x3 matrix whose every entry equals 1?
- 3
- 1 Correct answer.
- 0
- 2
Explanation
All rows are identical, so they span a one-dimensional space. The rank is therefore 1.
Question 17Mathematics and Statistics Foundations
A random variable X is uniformly distributed on [0, 10]. What is its variance?
- 10
- 25/3 Correct answer.
- 100/3
- 5
Explanation
For a uniform distribution on [a, b], the variance is (b - a)^2 / 12. With a = 0 and b = 10, this is 100/12 = 25/3.
Question 18Mathematics and Statistics Foundations
What is the determinant of the 2x2 matrix [[a, b], [c, d]]?
- ac - bd
- a + d - b - c
- ab - cd
- ad - bc Correct answer.
Explanation
The determinant of a 2x2 matrix is the product of the main diagonal entries minus the product of the off-diagonal entries, ad - bc.
Question 19Mathematics and Statistics Foundations
A function f is differentiable at a point x0. Which statement must hold?
- f is twice differentiable at x0
- f is continuous at x0 Correct answer.
- f has a local maximum at x0
- f'(x0) = 0
Explanation
Differentiability implies continuity, so a differentiable function is necessarily continuous at that point. The converse fails, as with |x| at 0.
Question 20Mathematics and Statistics Foundations
In a linear regression model, what does the coefficient of determination R^2 measure?
- The average residual magnitude
- The number of predictors in the model
- The proportion of variance in the response explained by the model Correct answer.
- The slope of the fitted line
Explanation
R^2 is the fraction of the total variance in the response that is accounted for by the regression model, ranging from 0 to 1.
Question 21Mathematics and Statistics Foundations
Let A be an n x n matrix with all eigenvalues strictly less than 1 in absolute value. What happens to A^k as k approaches infinity?
- It oscillates without converging
- It converges to the identity matrix
- It diverges to infinity
- It converges to the zero matrix Correct answer.
Explanation
If the spectral radius is less than 1, the powers A^k converge to the zero matrix. This follows from the spectral radius formula and the Jordan form.
Question 22Mathematics and Statistics Foundations
A sequence of random variables X_n converges in probability to a constant c. Which statement is necessarily true?
- X_n converges to c almost surely
- Var(X_n) converges to 0
- X_n converges to c in distribution Correct answer.
- E[X_n] converges to c
Explanation
Convergence in probability implies convergence in distribution to the same constant. The reverse implication fails, and almost sure convergence is stronger than convergence in probability.
Question 23Mathematics and Statistics Foundations
Consider minimizing f(x) = x^2 subject to the constraint x ≥ 1. Where does the constrained minimum occur?
- x = 0
- x = 1 Correct answer.
- No minimum exists
- x = 2
Explanation
The unconstrained minimum of x^2 is at x = 0, which is infeasible. On the feasible set x ≥ 1, f is increasing, so the minimum is at the boundary x = 1.
Question 24Mathematics and Statistics Foundations
Let f be a twice continuously differentiable function on R with f''(x) > 0 everywhere and f'(x0) = 0 at some point x0. What is the nature of x0?
- A saddle point
- A strict global maximum
- An inflection point
- A strict global minimum Correct answer.
Explanation
Strict convexity from f'' > 0 everywhere means any critical point is a strict global minimizer. Since f'(x0) = 0, x0 is that unique global minimum.
Question 25Mathematics and Statistics Foundations
Let X and Y be independent standard normal variables. What is the distribution of X + Y?
- Standard normal
- Uniform on [-1, 1]
- Normal with mean 0 and variance 2 Correct answer.
- Chi-squared with 2 degrees of freedom
Explanation
The sum of independent normal variables is normal, with means and variances adding. Each has mean 0 and variance 1, so the sum is normal with mean 0 and variance 2.
Question 26Mathematics and Statistics Foundations
If A and B are independent events with P(A) = 0.3 and P(B) = 0.5, what is P(A ∩ B)?
- 0.3
- 0.5
- 0.8
- 0.15 Correct answer.
Explanation
For independent events, the probability of the intersection is the product of their probabilities: P(A ∩ B) = P(A) × P(B). Substituting the given values gives 0.3 × 0.5 = 0.15.
Question 27Mathematics and Statistics Foundations
Consider the matrix A = [[4, 1], [2, 3]]. What is the sum of its eigenvalues?
- 5
- 12
- 7 Correct answer.
- 10
Explanation
The sum of the eigenvalues of a matrix equals its trace, which is the sum of the diagonal entries. Here, the trace is 4 + 3 = 7, so the sum of the eigenvalues is 7.
Question 28Mathematics and Statistics Foundations
Let f(x) = 3x^2 + 2x + 1. What is the derivative f'(x)?
- 6x^2 + 2x
- 6x
- 6x + 2 Correct answer.
- 3x + 2
Explanation
The derivative of a polynomial is found by applying the power rule term by term. The derivative of 3x^2 is 6x, the derivative of 2x is 2, and the derivative of the constant 1 is 0, giving f'(x) = 6x + 2.
Question 29Mathematics and Statistics Foundations
A random variable X has the probability density function f(x) = 2x for 0 ≤ x ≤ 1, and f(x) = 0 otherwise. What is the expected value E[X]?
- 2/3 Correct answer.
- 1
- 1/3
- 1/2
Explanation
The expected value of a continuous random variable is the integral of x times its density over the support. Compute ∫_0^1 x·(2x) dx = ∫_0^1 2x^2 dx = [2x^3/3]_0^1 = 2/3.
Question 30Mathematics and Statistics Foundations
Let A be a 2×2 real matrix with eigenvalues 2 and 3. Which of the following is necessarily true about A?
- A has determinant 5.
- A is diagonalizable over the reals. Correct answer.
- A is singular.
- A is orthogonal.
Explanation
A 2×2 matrix with two distinct real eigenvalues has two linearly independent eigenvectors, and therefore is diagonalizable over the reals. The other properties do not follow: orthogonality requires A^T A = I, singularity requires a zero eigenvalue, and the determinant is the product of eigenvalues, not the sum.
Question 31Data Preparation and Feature Engineering
A dataset column records measured body temperature in degrees Celsius. A modeler converts the column to degrees Fahrenheit by applying F = 1.8*C + 32. Which effect does this transformation have on the column?
- It normalizes the column to zero mean and unit variance
- It converts the variable into a categorical feature
- It removes the effect of outliers from the distribution
- It changes the scale and offset but preserves the ordering of values Correct answer.
Explanation
Multiplying by a positive constant and adding a constant is an affine transformation, which rescales and shifts values while preserving their relative order. It does not standardize, discretize, or clip outliers.
Question 32Data Preparation and Feature Engineering
A feature has a heavily right-skewed distribution with a few very large values. Which transformation is most directly intended to reduce that skew?
- Rounding each value to the nearest integer
- Applying a logarithmic transform to the values Correct answer.
- Subtracting the median from each value
- One-hot encoding the value ranges
Explanation
A log transform compresses large values far more than small ones, pulling in the right tail and reducing positive skew. Centering, rounding, and encoding do not reshape the tail.
Question 33Data Preparation and Feature Engineering
A table has a column 'city' with values such as 'Paris', 'Tokyo', and 'Lima'. Which encoding produces one binary column per distinct city value?
- Ordinal encoding
- Binary hashing
- One-hot encoding Correct answer.
- Target encoding
Explanation
One-hot encoding creates a separate indicator column for each category, with a 1 in the column matching the row's category. Ordinal encoding uses a single integer column, and target encoding maps categories to a statistic of the label.
Question 34Data Preparation and Feature Engineering
In a dataset of customer records, 40% of rows have a missing value in the 'income' column. Which statement best describes the main risk of dropping all rows with missing income?
- The feature distributions will become exactly uniform
- The remaining data may be systematically different from the full population Correct answer.
- The remaining features will become perfectly correlated
- The target variable will be rescaled
Explanation
Dropping rows with missing values can introduce selection bias if missingness is related to the variable or the outcome. The resulting sample may no longer represent the original population.
Question 35Data Preparation and Feature Engineering
A numeric feature ranges from 10 to 1000, while another ranges from 0 to 1. A distance-based algorithm such as k-nearest neighbors is used. What is the main reason to scale the features first?
- Scaling guarantees that the model will not overfit
- Scaling removes the need to handle missing values
- Features with larger numeric ranges would otherwise dominate the distance computation Correct answer.
- Scaling converts the features into categorical variables
Explanation
Distance metrics sum squared differences across features, so a feature with a large range contributes disproportionately. Rescaling puts features on comparable footing before computing distances.
Question 36Data Preparation and Feature Engineering
A modeler wants to encode a categorical feature with categories 'low', 'medium', and 'high' that have a natural order. Which encoding best preserves that ordering?
- One-hot encoding with three indicator columns
- Hashing the category strings into 8 buckets
- Ordinal encoding with low=1, medium=2, high=3 Correct answer.
- Replacing each category with its string length
Explanation
Ordinal encoding assigns integers that reflect the natural order, allowing the model to use the ranking information. One-hot encoding discards order, and hashing or string length produces arbitrary values.
Question 37Data Preparation and Feature Engineering
A column contains the number of children per household, with values 0, 1, 2, 3, and 4. Which data type best describes this feature?
- Ordinal categorical
- Discrete numeric Correct answer.
- Nominal categorical
- Continuous numeric
Explanation
Counts take distinct whole-number values and are numeric, so they are discrete numeric features. They are not continuous, and they are not nominal or ordinal categories.
Question 38Data Preparation and Feature Engineering
A feature has values with mean 50 and standard deviation 10. A modeler applies z-score standardization. What are the mean and standard deviation of the transformed feature?
- Mean 50 and standard deviation 1
- Mean 0 and standard deviation 1 Correct answer.
- Mean 1 and standard deviation 0
- Mean 0 and standard deviation 10
Explanation
Z-score standardization subtracts the mean and divides by the standard deviation, producing a distribution with mean zero and unit standard deviation.
Question 39Data Preparation and Feature Engineering
A modeler fits a standardization transform using the mean and standard deviation of the entire dataset, then splits into train and test. Why is this a problem?
- Standardization cannot be applied to datasets above a certain size
- The transform will produce negative values in the training set
- Information from the test set leaks into the transform applied to the training data Correct answer.
- The test set will have a larger mean than the training set
Explanation
Computing statistics on the full dataset lets test-set information influence the transformation, which is a form of data leakage and inflates optimistic performance estimates. The statistics should be learned on the training set and applied to the test set.
Question 40Data Preparation and Feature Engineering
A categorical feature has 500 distinct values in a dataset of 2,000 rows. Which approach most directly avoids the high dimensionality of full one-hot encoding?
- Grouping rare categories into an 'other' bucket before encoding Correct answer.
- Replacing each category with a random integer
- Applying a log transform to the category labels
- Dropping the feature entirely
Explanation
Collapsing infrequent categories into a single bucket reduces the number of indicator columns while retaining the frequent categories. Dropping the feature or assigning arbitrary integers discards or distorts information.
Question 41Data Preparation and Feature Engineering
A dataset has a numeric feature with missing values. Which imputation strategy replaces missing entries with the most frequent observed value?
- Mode imputation Correct answer.
- Mean imputation
- Linear interpolation
- Median imputation
Explanation
Mode imputation fills missing entries with the most frequently occurring value, which is appropriate for categorical or discrete data. Mean and median imputation use averages or middle values, and interpolation uses neighboring points.
Question 42Data Preparation and Feature Engineering
A modeler creates a new feature equal to the ratio of 'debt' to 'income'. Which term best describes this type of feature construction?
- Derived feature creation Correct answer.
- Imputation
- Discretization
- One-hot encoding
Explanation
Combining existing columns arithmetically to form a new column is derived feature creation. It differs from encoding, imputation, and binning, which transform rather than combine variables.
Question 43Data Preparation and Feature Engineering
A continuous feature is binned into quartiles, and each bin is replaced by its bin index. Which effect does this have?
- It reduces resolution and can lose information within bins Correct answer.
- It converts the feature into a unique identifier
- It removes the need for any scaling of other features
- It guarantees a linear relationship with the target
Explanation
Discretization collapses ranges of values into a few bins, which discards variation within each bin. It can capture nonlinearity but does not guarantee linearity or replace scaling.
Question 44Data Preparation and Feature Engineering
A modeler wants to detect duplicate records that may differ slightly in spelling of names and formatting of addresses. Which technique is most appropriate?
- Fuzzy string matching on normalized fields Correct answer.
- Exact hash comparison of raw rows
- One-hot encoding the address column
- Dropping all rows with any text field
Explanation
Fuzzy matching compares strings by similarity so that near-duplicates with minor spelling or formatting differences can be identified. Exact hashing only catches identical rows, and encoding does not detect duplicates.
Question 45Data Preparation and Feature Engineering
A feature's values are compressed using the transform x' = log(1 + x) for non-negative x. Why is the '+1' included?
- To reverse the effect of standardization
- To ensure the output is always an integer
- To make the output distribution normal
- To keep the transform defined when x equals zero Correct answer.
Explanation
The logarithm of zero is undefined, so adding one shifts the input so that zero maps to zero. The transform reduces skew but does not guarantee normality or integer outputs.
Question 46Data Preparation and Feature Engineering
A dataset contains timestamps of customer transactions. Which derived feature is most useful for capturing weekly purchasing patterns?
- Day of week extracted from the timestamp Correct answer.
- Number of characters in the timestamp string
- The transaction amount divided by the timestamp
- Raw Unix timestamp in seconds
Explanation
Extracting the day of week exposes the cyclical weekly pattern directly to the model. The raw timestamp encodes absolute time, and string length or dividing by time yields meaningless values.
Question 47Data Preparation and Feature Engineering
A modeler trains on data from January to June and tests on July. A feature 'days since account opened' is computed relative to the date the dataset was assembled. What is the main concern?
- The feature violates the assumption of independent features
- The feature will have too many missing values
- The feature encodes information from after the test period, causing temporal leakage Correct answer.
- The feature will be perfectly correlated with the target
Explanation
Computing elapsed time relative to a later assembly date uses future information, so test-period rows carry knowledge unavailable at prediction time. Features should be computed using only information available at each prediction point.
Question 48Data Preparation and Feature Engineering
A categorical feature has categories that appear only in the test set and never in the training set. A one-hot encoder fit on training data is applied to the test set. What should the encoder do with unseen categories?
- Raise an error and halt prediction
- Assign them the index of the most frequent training category
- Silently drop those test rows
- Map them to an all-zero indicator vector or a dedicated unknown bucket Correct answer.
Explanation
An encoder fit on training data has no column for unseen categories, so they must be mapped to a defined fallback such as all zeros or an unknown bucket. Reusing a frequent category's index would misrepresent the record.
Question 49Data Preparation and Feature Engineering
A feature has a small number of extreme outliers. A modeler compares min-max scaling and robust scaling using the median and interquartile range. Which statement is accurate?
- Min-max scaling is less distorted because it uses the full range
- Robust scaling is less distorted by the outliers than min-max scaling Correct answer.
- Neither method can be applied to data containing outliers
- Both methods produce identical outputs regardless of outliers
Explanation
Min-max scaling depends on the minimum and maximum, which outliers shift dramatically. Robust scaling uses the median and interquartile range, which are resistant to extreme values.
Question 50Data Preparation and Feature Engineering
Two numeric features are highly collinear. A modeler replaces them with a single new feature that is their sum. Which term best describes this dimensionality reduction approach?
- Imputation
- Discretization
- One-hot encoding
- Feature aggregation Correct answer.
Explanation
Combining correlated features into a summary variable is a form of feature aggregation that reduces dimensionality. Imputation handles missing values, encoding handles categories, and discretization bins values.