1What is the probability of getting heads when flipping a single fair coin?
Probability
Easy
A.
B.
C.
D.
Correct Answer:
Explanation:
A fair coin has two equally likely outcomes, so .
Incorrect! Try again.
2What is the range of any valid probability value?
Probability
Easy
A.Between and
B.Between and
C.Any real number
D.Between and
Correct Answer: Between and
Explanation:
A probability always lies in the interval , where means impossible and means certain.
Incorrect! Try again.
3Two events are called independent when:
Probability
Easy
A.Their probabilities sum to
B.One event always prevents the other
C.The occurrence of one does not affect the other
D.They always happen together
Correct Answer: The occurrence of one does not affect the other
Explanation:
Independent events do not influence each other, so .
Incorrect! Try again.
4Which measure represents the average of a set of numbers?
Statistics
Easy
A.Range
B.Median
C.Mean
D.Mode
Correct Answer: Mean
Explanation:
The mean is the sum of all values divided by the number of values, giving the arithmetic average.
Incorrect! Try again.
5The median of a dataset is the value that:
Statistics
Easy
A.Lies in the middle when data is ordered
B.Occurs most frequently
C.Is the largest value
D.Equals the sum of all values
Correct Answer: Lies in the middle when data is ordered
Explanation:
The median is the central value of an ordered dataset, splitting it into two equal halves.
Incorrect! Try again.
6What does standard deviation measure in a dataset?
Statistics
Easy
A.The middle value of the data
B.The most common value
C.The total count of values
D.The spread of data around the mean
Correct Answer: The spread of data around the mean
Explanation:
Standard deviation quantifies how much the values deviate from the mean; a larger value means more spread.
Incorrect! Try again.
7In machine learning, a single row of features is often represented as a:
Linear algebra (applied focus)
Easy
A.Vector
B.Determinant
C.Matrix inverse
D.Scalar
Correct Answer: Vector
Explanation:
A feature set for one data point is stored as a vector, an ordered list of numbers.
Incorrect! Try again.
8A dataset with rows as samples and columns as features is best represented as a:
Linear algebra (applied focus)
Easy
A.Single number
B.Matrix
C.Boolean value
D.Scalar
Correct Answer: Matrix
Explanation:
A matrix is a 2D grid of numbers, ideal for storing multiple samples (rows) each with multiple features (columns).
Incorrect! Try again.
9What is the result of the dot product of two vectors?
Linear algebra (applied focus)
Easy
A.A scalar
B.A vector
C.A matrix
D.A determinant
Correct Answer: A scalar
Explanation:
The dot product multiplies corresponding elements and sums them, producing a single scalar value.
Incorrect! Try again.
10Which type of learning uses labeled data for training?
Supervised, unsupervised, and reinforcement learning: concepts and real-world use
Easy
A.Supervised learning
B.Unsupervised learning
C.Clustering
D.Reinforcement learning
Correct Answer: Supervised learning
Explanation:
Supervised learning trains on input-output pairs where the correct labels are known in advance.
Incorrect! Try again.
11Grouping customers into segments without predefined labels is an example of:
Supervised, unsupervised, and reinforcement learning: concepts and real-world use
Easy
A.Unsupervised learning
B.Reinforcement learning
C.Regression
D.Supervised learning
Correct Answer: Unsupervised learning
Explanation:
Unsupervised learning finds hidden patterns or clusters in unlabeled data, such as customer segmentation.
Incorrect! Try again.
12In reinforcement learning, an agent learns by:
Supervised, unsupervised, and reinforcement learning: concepts and real-world use
Easy
A.Grouping similar data points
B.Copying labeled examples
C.Receiving rewards and penalties
D.Reducing the number of features
Correct Answer: Receiving rewards and penalties
Explanation:
A reinforcement learning agent learns optimal actions through trial and error, guided by rewards and penalties from the environment.
Incorrect! Try again.
13Predicting house prices from features like size and location is an example of a:
Supervised, unsupervised, and reinforcement learning: concepts and real-world use
Easy
A.Regression task
B.Classification task
C.Clustering task
D.Reward task
Correct Answer: Regression task
Explanation:
Regression predicts a continuous numeric output, such as a house price, from input features.
Incorrect! Try again.
14What is the main goal of feature engineering?
Feature engineering and model evaluation (cross-validation, precision, recall)
Easy
A.To create useful input features for a model
B.To reward the model for correct answers
C.To label the training data
D.To increase the number of data samples
Correct Answer: To create useful input features for a model
Explanation:
Feature engineering transforms raw data into meaningful features that improve a model's performance.
Incorrect! Try again.
15Precision is defined as the ratio of:
Feature engineering and model evaluation (cross-validation, precision, recall)
Easy
A.True positives to all actual positives
B.True positives to all predicted positives
C.False positives to true negatives
D.Correct predictions to total predictions
Correct Answer: True positives to all predicted positives
Explanation:
Precision , measuring how many predicted positives are actually correct.
Incorrect! Try again.
16Recall measures the proportion of:
Feature engineering and model evaluation (cross-validation, precision, recall)
Easy
A.Predicted positives that are correct
B.Actual positives correctly identified
C.Negatives correctly rejected
D.Total correct predictions overall
Correct Answer: Actual positives correctly identified
Explanation:
Recall , measuring how many of the actual positives the model successfully found.
Incorrect! Try again.
17What is the purpose of cross-validation?
Feature engineering and model evaluation (cross-validation, precision, recall)
Easy
A.To reduce the number of features
B.To assess how well a model generalizes
C.To label the raw dataset
D.To increase the training set size
Correct Answer: To assess how well a model generalizes
Explanation:
Cross-validation splits data into folds and tests the model on unseen parts to estimate its generalization performance.
Incorrect! Try again.
18Bayes' theorem is used to compute which type of probability?
Bayes theorem, Bayesian networks, and probabilistic reasoning
Easy
A.Posterior (conditional) probability
B.Marginal probability only
C.Total probability only
D.Joint probability only
Correct Answer: Posterior (conditional) probability
Explanation:
Bayes' theorem updates a prior belief into a posterior probability given new evidence: .
Incorrect! Try again.
19In Bayes' theorem , the term is called the:
Bayes theorem, Bayesian networks, and probabilistic reasoning
Easy
A.Likelihood
B.Posterior
C.Prior
D.Evidence
Correct Answer: Prior
Explanation:
is the prior probability, representing our belief about before observing the evidence .
Incorrect! Try again.
20A Bayesian network is best described as a:
Bayes theorem, Bayesian networks, and probabilistic reasoning
Easy
A.Sequence of reward signals
B.Table of raw feature values
C.List of unlabeled data points
D.Graph showing probabilistic relationships between variables
Correct Answer: Graph showing probabilistic relationships between variables
Explanation:
A Bayesian network is a directed graph where nodes are variables and edges represent probabilistic dependencies between them.
Incorrect! Try again.
21A bag contains 3 red and 2 blue balls. Two balls are drawn without replacement. What is the probability that both are red?
Probability
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
. Sampling without replacement reduces both the count and total on the second draw.
Incorrect! Try again.
22If events and are independent with and , what is ?
Probability
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
For independent events, . Then .
Incorrect! Try again.
23A dataset has values . What is the mean?
Statistics
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Sum , and there are 8 values, so mean .
Incorrect! Try again.
24In a right-skewed distribution, which ordering of central tendency measures is typically correct?
Statistics
Medium
A.Mode > Median > Mean
B.Mean = Median = Mode
C.Median > Mean > Mode
D.Mean > Median > Mode
Correct Answer: Mean > Median > Mode
Explanation:
In a right (positively) skewed distribution, the long tail on the right pulls the mean toward higher values, so Mean > Median > Mode.
Incorrect! Try again.
25Given vectors and , what is the dot product ?
Linear algebra (applied focus)
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
.
Incorrect! Try again.
26In machine learning, why is matrix multiplication central to computing outputs of a fully connected neural network layer?
Linear algebra (applied focus)
Medium
A.It removes correlated features
B.It normalizes the data to zero mean
C.It sorts the input features
D.It applies the learned weights to every input feature simultaneously as a linear transformation before activation
Correct Answer: It applies the learned weights to every input feature simultaneously as a linear transformation before activation
Explanation:
A dense layer computes , a matrix-vector product that linearly combines all inputs with learned weights before a nonlinear activation is applied.
Incorrect! Try again.
27What does the identity matrix satisfy for any compatible matrix ?
Linear algebra (applied focus)
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
The identity matrix acts as the multiplicative identity: multiplying any matrix by leaves it unchanged, analogous to multiplying a number by 1.
Incorrect! Try again.
28A company wants to group customers into segments based on purchasing behavior without any predefined labels. Which learning paradigm fits best?
Supervised, unsupervised, and reinforcement learning: concepts and real-world use
Medium
A.Supervised learning
B.Unsupervised learning
C.Semi-supervised regression
D.Reinforcement learning
Correct Answer: Unsupervised learning
Explanation:
Grouping unlabeled data into segments is a clustering task, a classic use of unsupervised learning where the model finds structure without target labels.
Incorrect! Try again.
29Which scenario is the clearest example of reinforcement learning?
Supervised, unsupervised, and reinforcement learning: concepts and real-world use
Medium
A.An agent learns to play a game by receiving rewards and penalties for its moves over time
B.A regression model estimates temperature
C.An algorithm clusters news articles by topic
D.A model predicts house prices from labeled data
Correct Answer: An agent learns to play a game by receiving rewards and penalties for its moves over time
Explanation:
Reinforcement learning involves an agent taking actions in an environment and learning a policy that maximizes cumulative reward through trial and feedback.
Incorrect! Try again.
30Predicting whether an email is spam or not spam using a dataset of labeled emails is an example of which task?
Supervised, unsupervised, and reinforcement learning: concepts and real-world use
Medium
A.Reinforcement learning
B.Unsupervised clustering
C.Supervised classification
D.Dimensionality reduction
Correct Answer: Supervised classification
Explanation:
Labeled emails (spam/not spam) train a model to assign discrete class labels, which is supervised classification.
Incorrect! Try again.
31A classifier produces 40 true positives, 10 false positives, and 5 false negatives. What is its precision?
Feature engineering and model evaluation (cross-validation, precision, recall)
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Precision .
Incorrect! Try again.
32For the same classifier with 40 true positives, 10 false positives, and 5 false negatives, what is its recall?
Feature engineering and model evaluation (cross-validation, precision, recall)
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Recall .
Incorrect! Try again.
33What is the main advantage of -fold cross-validation over a single train/test split?
Feature engineering and model evaluation (cross-validation, precision, recall)
Medium
A.It provides a more reliable estimate of model performance by using every data point for both training and validation across folds
B.It always reduces training time
C.It guarantees higher accuracy
D.It eliminates the need for a test set
Correct Answer: It provides a more reliable estimate of model performance by using every data point for both training and validation across folds
Explanation:
By rotating which fold is held out, -fold cross-validation reduces the variance of the performance estimate and uses data more efficiently than a single split.
Incorrect! Try again.
34Which feature engineering technique is most appropriate for a categorical variable like 'color' with values {red, green, blue} for a linear model?
Feature engineering and model evaluation (cross-validation, precision, recall)
Medium
A.One-hot encoding
B.Log transformation
C.Min-max scaling
D.Standardization
Correct Answer: One-hot encoding
Explanation:
One-hot encoding converts nominal categories into binary indicator columns, avoiding false ordinal relationships that integer labels would imply.
Incorrect! Try again.
35When is the F1-score preferred over accuracy as an evaluation metric?
Feature engineering and model evaluation (cross-validation, precision, recall)
Medium
A.When only true negatives matter
B.When classes are imbalanced and both false positives and false negatives matter
C.When the dataset is perfectly balanced
D.When features are continuous
Correct Answer: When classes are imbalanced and both false positives and false negatives matter
Explanation:
The F1-score is the harmonic mean of precision and recall, making it more informative than accuracy when class distributions are skewed.
Incorrect! Try again.
36A disease affects 1% of a population. A test is 90% accurate for those with the disease and gives 10% false positives. If a person tests positive, what is the approximate probability they have the disease?
Bayes theorem
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
. Low base rates keep the posterior small despite a positive test.
Incorrect! Try again.
37In Bayes' theorem , what does represent?
Bayes theorem
Medium
A.The evidence
B.The prior probability of
C.The posterior probability of
D.The likelihood of
Correct Answer: The prior probability of
Explanation:
is the prior: our belief about before observing evidence . After incorporating , we obtain the posterior .
Incorrect! Try again.
38In a Bayesian network, what does a directed edge from node to node typically represent?
Bayesian networks
Medium
A.A correlation with no direction
B.That and are independent
C.A direct conditional dependency where 's probability depends on
D.That equals
Correct Answer: A direct conditional dependency where 's probability depends on
Explanation:
Edges in a Bayesian network encode conditional dependencies; a parent node directly influences the conditional probability distribution of its child node.
Incorrect! Try again.
39What key property allows a Bayesian network to factorize a joint probability distribution compactly?
Bayesian networks
Medium
A.Every node connects to every other node
B.Each variable is conditionally independent of its non-descendants given its parents
C.All variables are mutually independent
D.All variables share the same distribution
Correct Answer: Each variable is conditionally independent of its non-descendants given its parents
Explanation:
The local Markov property lets the joint distribution be written as a product of each node's conditional probability given only its parents, drastically reducing parameters.
Incorrect! Try again.
40A Naive Bayes classifier makes which key assumption about features?
Bayes theorem, Bayesian networks, and probabilistic reasoning
Medium
A.Features are conditionally independent given the class label
B.Features must be continuous
C.The prior is always uniform
D.Features are perfectly correlated
Correct Answer: Features are conditionally independent given the class label
Explanation:
Naive Bayes assumes conditional independence of features given the class, which simplifies computation of the likelihood as a product of per-feature probabilities.
Incorrect! Try again.
41A disease affects of a population. A test has sensitivity (true positive rate) and specificity (true negative rate). If a person tests positive, what is the approximate probability they actually have the disease?
Bayes theorem
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
Using Bayes: . The low base rate makes false positives dominate.
Incorrect! Try again.
42A fraud classifier detects of true fraud cases but also flags legitimate transactions as fraud. What are its precision and recall respectively?
Feature engineering and model evaluation (cross-validation, precision, recall)
Hard
A.Precision , Recall
B.Precision , Recall
C.Precision , Recall
D.Precision , Recall
Correct Answer: Precision , Recall
Explanation:
Recall . Precision .
Incorrect! Try again.
43In Principal Component Analysis, the principal components are derived from the eigenvectors of the covariance matrix. What does the eigenvalue associated with each eigenvector represent?
Linear algebra (applied focus)
Hard
A.The number of samples in the dataset
B.The variance captured along that component direction
C.The correlation between two original features
D.The mean of the projected data
Correct Answer: The variance captured along that component direction
Explanation:
Each eigenvalue quantifies the amount of variance in the data along the direction of its corresponding eigenvector. Larger eigenvalues indicate directions retaining more information.
Incorrect! Try again.
44In reinforcement learning, an agent with discount factor receives rewards of at , at , and at . What is the discounted return from ?
Supervised, unsupervised, and reinforcement learning: concepts and real-world use
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
. The discount factor reduces the weight of future rewards.
Incorrect! Try again.
45A model's predictions on a test set have a systematic offset from the true values across all samples. In the bias-variance framework, this consistent error most directly reflects which quantity?
Statistics
Hard
A.High irreducible noise
B.High bias
C.High variance
D.Low bias, high variance
Correct Answer: High bias
Explanation:
A consistent, systematic offset across predictions indicates the model is underfitting — a hallmark of high bias. High variance would instead show sensitivity to specific training samples.
Incorrect! Try again.
46Two events and satisfy , , and . Are and independent, and why?
Probability
Hard
A.Yes, because
B.No, because
C.Yes, because
D.No, because
Correct Answer: Yes, because
Explanation:
. Since the joint probability equals the product of marginals, the events are independent.
Incorrect! Try again.
47In a Bayesian network (a collider at ), which statement about conditional independence is correct?
Bayesian networks
Hard
A. and are independent whether or not is observed
B. and become independent only when conditioning on
C. and are independent, but become dependent when conditioning on
D. and are always dependent regardless of
Correct Answer: and are independent, but become dependent when conditioning on
Explanation:
At a collider, the parents are marginally independent, but observing the common effect (or its descendants) induces dependence between them — the 'explaining away' effect.
Incorrect! Try again.
48When performing -fold cross-validation, feature scaling parameters (e.g., mean and std) are computed on the entire dataset before splitting. Why is this problematic?
Feature engineering and model evaluation (cross-validation, precision, recall)
Hard
A.It always increases the model's bias
B.It causes data leakage, inflating validation performance estimates
C.It makes the folds unequal in size
D.It reduces the number of usable folds
Correct Answer: It causes data leakage, inflating validation performance estimates
Explanation:
Fitting scaling parameters on all data leaks information from validation folds into training. Preprocessing must be fit only on training folds within each iteration to get unbiased estimates.
Incorrect! Try again.
49For a highly right-skewed income distribution, which measure of central tendency best represents the 'typical' value, and which will be largest?
Statistics
Hard
A.Mean is best; mode is largest
B.Mode is best; median is largest
C.Median is best; mean is largest
D.Mean is best; median is largest
Correct Answer: Median is best; mean is largest
Explanation:
In right-skewed data, extreme high values pull the mean upward, so mean > median > mode. The median resists outliers and better reflects the typical value.
Incorrect! Try again.
50A square matrix used as a linear transformation has a determinant of . What does this imply about the transformation and solving ?
Linear algebra (applied focus)
Hard
A.The transformation is non-invertible; has no unique solution
B.The transformation preserves volume; has one solution
C.The matrix is orthogonal; always solvable
D.The eigenvalues are all positive; is unique
Correct Answer: The transformation is non-invertible; has no unique solution
Explanation:
A zero determinant means is singular (non-invertible), collapsing space into a lower dimension. Thus has either no solution or infinitely many, never a unique one.
Incorrect! Try again.
51A retailer wants to group customers by purchasing behavior without predefined labels, then use these groups to target marketing. Which learning paradigm fits the grouping task?
Supervised, unsupervised, and reinforcement learning: concepts and real-world use
Hard
With no predefined labels, discovering natural groupings from data patterns is a clustering task, a form of unsupervised learning. Classification would require labeled examples.
Incorrect! Try again.
52A biased coin lands heads with probability . You observe heads in tosses. Under a maximum likelihood estimate, what is , and what is a key limitation of this estimate?
Probability
Hard
A.; it correctly incorporates a Beta prior
B.; it overfits small samples, ignoring uncertainty
C.; it applies Laplace smoothing
D.; it assumes a fair coin prior
Correct Answer: ; it overfits small samples, ignoring uncertainty
Explanation:
MLE gives . With so few observations this is an overconfident estimate; Bayesian approaches with a prior would yield a more moderate estimate.
Incorrect! Try again.
53A classifier achieves with precision . What is its recall?
Feature engineering and model evaluation (cross-validation, precision, recall)
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
. Solving: .
Incorrect! Try again.
54In a Naive Bayes classifier, the 'naive' assumption is that features are conditionally independent given the class. What is the primary consequence when features are actually strongly correlated?
Bayes theorem
Hard
A.The classifier always predicts the majority class
B.Training time grows exponentially with correlation
C.Predicted class probabilities become poorly calibrated, though ranking may still work
D.The model cannot make any predictions at all
Correct Answer: Predicted class probabilities become poorly calibrated, though ranking may still work
Explanation:
Correlated features get 'double-counted', distorting the probability estimates (often pushing them toward extremes). Surprisingly, class rankings and thus classification decisions often remain reasonable.
Incorrect! Try again.
55A hypothesis test yields at significance level . Which interpretation is correct?
Statistics
Hard
A.Accept the null; the effect has a probability of being real
B.There is a chance the alternative hypothesis is false
C.The null hypothesis is true with probability
D.Reject the null; there is a chance of data this extreme if the null were true
Correct Answer: Reject the null; there is a chance of data this extreme if the null were true
Explanation:
The p-value is . Since , we reject . It is not the probability that either hypothesis is true.
Incorrect! Try again.
56In reinforcement learning, an agent that always chooses the action with the highest current estimated value faces which fundamental problem?
Supervised, unsupervised, and reinforcement learning: concepts and real-world use
Hard
Pure exploitation (greedy action selection) may lock onto locally optimal actions and never discover superior alternatives. This is the exploration-exploitation dilemma.
Incorrect! Try again.
57A Bayesian network has binary variables in a chain . How many independent parameters are needed to fully specify the joint distribution?
Bayesian networks
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
needs parameter. Each of the other four has one binary parent, needing parameters each: . Total , far fewer than the for a full joint table.
Incorrect! Try again.
58In gradient descent, the update rule is . If the learning rate is set far too large, what typically happens?
Linear algebra (applied focus)
Hard
A.The gradient becomes zero immediately
B.The model converges faster to the exact minimum
C.The loss diverges or oscillates instead of converging
D.The parameters remain unchanged across iterations
Correct Answer: The loss diverges or oscillates instead of converging
Explanation:
An overly large step size causes updates to overshoot the minimum repeatedly, so the loss can oscillate or grow without bound rather than descending toward the optimum.
Incorrect! Try again.
59For a severely imbalanced dataset ( negative class), a model predicting 'negative' for everything achieves accuracy. Which metric best exposes this model's true weakness?
Feature engineering and model evaluation (cross-validation, precision, recall)
Hard
A.Specificity
B.Recall on the positive class
C.Negative predictive value
D.Overall accuracy
Correct Answer: Recall on the positive class
Explanation:
The always-negative model detects zero positives, so its positive-class recall is . Accuracy is misleading under imbalance; recall on the minority class reveals the failure directly.
Incorrect! Try again.
60A random variable has and . What is the standard deviation of ?
Probability
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
. The standard deviation is .
Incorrect! Try again.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill.
The rest comes out of a student's own pocket: the domain, the storage,
and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it.
What it pays for →