Unsupervised Learning MCQs for NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

Unsupervised learning finds structure in data that has no target labels: groups of similar points (clustering) or a few directions that capture most of the variation (dimensionality reduction). It is topic 8 of the AI, Machine Learning & Data Analytics area, which carries 10% of the NSCT according to HEC's Areas of Competencies. Candidates averaged 50.8% accuracy in this area in 2026, per the HEC NSCT report and APP.

Expect calculations: a centroid update, a linkage distance or a variance ratio. The eigenvector maths behind PCA is in Mathematical Foundations.

K-means

K-means splits n points into k clusters, with k chosen in advance. It minimises the within-cluster sum of squares (WCSS, also called inertia): the total squared distance from each point to its cluster's centroid. Lloyd's algorithm repeats two steps until nothing changes:

  1. Assign each point to its nearest centroid.
  2. Update each centroid to the mean of its points.

Example: points (1,1), (2,1), (4,3), (5,4) with starting centroids (1,1) and (5,4). The first two points join (1,1) and the last two join (5,4), so the new centroids are (1.5, 1) and (4.5, 3.5), with WCSS = 0.25 + 0.25 + 0.5 + 0.5 = 1.5.

The result depends on the starting centroids, so k-means++ spreads them out and libraries run several restarts. To choose k, look for the elbow in WCSS against k, or use the silhouette s = (b - a)/max(a, b). Here a is the mean distance to the point's own cluster and b the mean distance to the nearest other cluster.

Exam angle: k-means draws straight boundaries between centroids, so it fails on rings or moon shapes, and unscaled features distort its distances.

Hierarchical clustering

Agglomerative (bottom-up) clustering starts with every point alone and repeatedly merges the closest pair of clusters. Divisive clustering works top-down. The merge history is drawn as a dendrogram, and cutting it at a chosen height gives the clusters, so k is not needed in advance.

Linkage Cluster distance Tendency
Single Minimum pairwise distance Chaining, long thin clusters
Complete Maximum pairwise distance Compact clusters
Average Mean pairwise distance In between
Ward Smallest increase in WCSS Compact, similar-sized clusters

Example: for A = {1, 2} and B = {6, 9}, the pairwise distances are 5, 8, 4 and 7. Single linkage gives 4, complete gives 8 and average gives 6.

Exam angle: naive agglomerative clustering needs an n x n distance matrix, so it does not scale to millions of points.

PCA

Principal component analysis centres the data (and usually standardises it), then finds the eigenvectors of the covariance matrix. Each eigenvector is a principal component, and its eigenvalue is the variance along it. The explained variance ratio of a component is its eigenvalue divided by the sum of all eigenvalues.

Example: covariance [[2, 1], [1, 2]] has eigenvalues 3 and 1, so PC1, along (1, 1)/sqrt 2, explains 3/4 = 75%. With eigenvalues 5, 3, 1, 0.6 and 0.4, the cumulative ratios are 50%, 80%, 90%, 96% and 100%, so 3 components keep 90%.

Exam angle: PCA ignores labels, so the highest-variance direction is not always the one that separates classes; linear discriminant analysis (LDA) is the supervised alternative.

Other methods you may see

DBSCAN grows clusters from core points, which have at least minPts neighbours within radius eps. It finds clusters of any shape and labels isolated points as noise. Association rules rank item sets by support, confidence and lift, where lift = confidence / support(consequent) and a value below 1 means negative association.

Common traps

Worked examples

1. Understanding. Which linkage is most likely to produce long, chain-like clusters? Answer: single linkage. Merging on the minimum distance lets two clusters join through one close pair of points, even if the rest are far apart.

2. Application. One-dimensional k-means runs on 2, 4, 10, 12 with starting centroids 2 and 4. Where does it converge? Answer: 3 and 11. First pass: {2} and {4, 10, 12}, giving centroids 2 and 8.67. Second pass: 4 is now nearer 2, giving {2, 4} with mean 3 and {10, 12} with mean 11. A third pass changes nothing.

3. Analysis. PCA gives eigenvalues 6, 2, 1 and 1. A team needs at least 80% of the variance. How many components should it keep? Answer: 2. The total is 10, and the cumulative ratios are 60%, 80%, 90% and 100%. Two components reach exactly 80%; keeping three wastes a dimension for only 10% more.

Practise

The quiz below has 100 Unsupervised Learning questions, filterable by tier and difficulty.

Practise: 100 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. What makes a learning task unsupervised?

    1. The model is trained without a loss function
    2. A human labels each prediction after it is made
    3. The data is labelled, but only half of it is used for training
    4. The training data has no target labels, so the algorithm looks for structure such as groups or directions of variation
    Show answer

    Answer: D. The training data has no target labels, so the algorithm looks for structure such as groups or directions of variation

    In unsupervised learning the data is only inputs X, with no target y. Algorithms such as k-means, hierarchical clustering and PCA discover clusters, hierarchies or compact representations from X alone. They still optimise an objective, such as within-cluster variance.

  2. Which of these is an unsupervised learning task?

    1. Predicting house prices from past sales with known prices
    2. Grouping customers by purchase behaviour when no segment labels exist
    3. Classifying e-mails as spam using a labelled inbox
    4. Forecasting tomorrow's temperature from labelled historical readings
    Show answer

    Answer: B. Grouping customers by purchase behaviour when no segment labels exist

    Customer segmentation without predefined labels is clustering, the classic unsupervised task. The other three learn from known target values (price, spam label, temperature), so they are supervised regression or classification.

  3. What objective does standard k-means minimise?

    1. The number of points in the largest cluster
    2. The distance between the two farthest points in each cluster
    3. The classification error against the true labels
    4. The within-cluster sum of squared distances from points to their cluster centroid (inertia)
    Show answer

    Answer: D. The within-cluster sum of squared distances from points to their cluster centroid (inertia)

    k-means minimises WCSS (also called inertia or SSE): the sum over clusters of squared Euclidean distances from each point to its centroid. Lloyd's algorithm never increases this value, but it can stop at a local minimum.

  4. In k-means, what does k represent?

    1. The number of clusters, fixed before the algorithm runs
    2. The number of nearest neighbours used to label a point
    3. The number of iterations before stopping
    4. The number of features kept after reduction
    Show answer

    Answer: A. The number of clusters, fixed before the algorithm runs

    k is the number of clusters and must be chosen in advance, for example with the elbow method or silhouette scores. k as a neighbour count belongs to k-nearest neighbours (k-NN), a supervised method often confused with k-means.

  5. Which pair of steps does Lloyd's k-means algorithm repeat until assignments stop changing?

    1. Merge the two closest clusters, then recompute the distance matrix
    2. Compute the covariance matrix, then take its eigenvectors
    3. Label each core point, then expand clusters through density-reachable points
    4. Assign each point to its nearest centroid, then move each centroid to the mean of its assigned points
    Show answer

    Answer: D. Assign each point to its nearest centroid, then move each centroid to the mean of its assigned points

    k-means alternates an assignment step and an update step. Merging closest clusters is agglomerative hierarchical clustering, eigenvectors of the covariance matrix is PCA, and core points with density-reachability is DBSCAN.

  6. Why is k-means++ initialisation used?

    1. It finds the globally optimal clustering in one pass
    2. It chooses the value of k automatically
    3. It spreads the initial centroids apart, which lowers the chance of a poor local minimum and usually speeds convergence
    4. It lets k-means handle categorical features directly
    Show answer

    Answer: C. It spreads the initial centroids apart, which lowers the chance of a poor local minimum and usually speeds convergence

    k-means++ (Arthur and Vassilvitskii, 2007) picks the first centroid at random, then picks each next centroid with probability proportional to its squared distance from the nearest centroid chosen so far. It gives better starts but still does not guarantee the global optimum or choose k.

  7. For which cluster shape does standard k-means usually perform poorly?

    1. Three well-separated round blobs of similar size
    2. Two interleaved crescent (moon-shaped) clusters
    3. Two compact clusters far apart
    4. Four spherical clusters with equal variance
    Show answer

    Answer: B. Two interleaved crescent (moon-shaped) clusters

    k-means assigns points to the nearest centroid, so its boundaries are straight lines (a Voronoi partition). That suits convex, roughly spherical clusters of similar size, but it splits non-convex shapes such as moons or rings. DBSCAN or spectral clustering handle those better.

  8. What diagram shows the order and distance at which hierarchical clustering merges clusters?

    1. A confusion matrix
    2. A scree plot
    3. A dendrogram
    4. A box plot
    Show answer

    Answer: C. A dendrogram

    A dendrogram is a tree whose leaves are data points and whose joins are drawn at the merge distance. Cutting it at a chosen height gives a flat clustering. A scree plot shows PCA eigenvalues.

  9. How do agglomerative and divisive hierarchical clustering differ?

    1. Agglomerative starts with every point as its own cluster and merges; divisive starts with one cluster and splits
    2. Agglomerative needs k in advance; divisive does not
    3. Agglomerative uses centroids; divisive uses medoids
    4. Agglomerative is supervised; divisive is unsupervised
    Show answer

    Answer: A. Agglomerative starts with every point as its own cluster and merges; divisive starts with one cluster and splits

    Agglomerative clustering is bottom-up: n singletons are merged step by step into one cluster. Divisive clustering is top-down: one cluster is split repeatedly. Neither needs k in advance, because you cut the dendrogram afterwards.

  10. Which linkage defines the distance between two clusters as the largest distance between any point in one and any point in the other?

    1. Complete linkage
    2. Single linkage
    3. Average linkage
    4. Centroid linkage
    Show answer

    Answer: A. Complete linkage

    Complete linkage uses the maximum pairwise distance, which tends to give compact clusters. Single linkage uses the minimum and is prone to chaining. Average linkage uses the mean of all pairwise distances, and centroid linkage uses the distance between cluster means.

FAQs

What is the difference between supervised and unsupervised learning?

Supervised learning trains on inputs paired with known targets and learns to predict them, as in regression and classification. Unsupervised learning has inputs only and looks for structure, such as clusters or low-dimensional directions. Clustering results are judged by internal measures such as silhouette, because there is no ground truth.

How do you choose k in k-means?

Plot WCSS against k and pick the elbow where the drop flattens, or choose the k with the highest average silhouette score. The gap statistic and domain needs, such as the number of customer segments a team can act on, are also common. Never pick the k with the lowest WCSS.

Is PCA a clustering algorithm?

No. PCA is dimensionality reduction: it replaces the original features with fewer uncorrelated components ordered by variance. It is often run before clustering, to remove noise or to plot data in two dimensions, but it never assigns points to groups.

When should I use DBSCAN instead of k-means?

Use DBSCAN when clusters have irregular shapes, when you do not know k, or when you want outliers labelled as noise. Stay with k-means for large datasets with roughly round clusters. DBSCAN struggles when cluster densities differ a lot, because one eps value must suit them all.

Next step

Continue with Model Evaluation & Validation MCQs, revisit Ensemble Learning, go back to the AI & ML MCQ hub, or try an NSCT mock test.