Exploratory Data Analysis (EDA) MCQs for the NSCT

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

Exploratory data analysis (EDA) is the step where you summarise and plot a dataset to understand its centre, spread, shape, relationships and problems before building any model. It is the fifth of the 17 topics in the AI / Machine Learning and Data Analytics area, which carries 10% of the NSCT according to HEC's Areas of Competencies.

Questions here are mostly small calculations (mean, median, standard deviation, z-score, correlation) and interpretation: what a skewed histogram or a correlation of 0.9 does and does not tell you. The probability and statistics in Mathematical Foundations are the groundwork.

Summary statistics

Summary statistics describe a variable with a few numbers. Take 4, 8, 15, 16, 23, 42:

Statistic What it measures Value here
Mean Centre, using every value 108 / 6 = 18
Median Middle of the sorted data (15 + 16) / 2 = 15.5
Mode Most frequent value None (all unique)
Range max - min 38
Standard deviation Typical distance from the mean 12.32 (population), 13.49 (sample)

Sample variance divides by n - 1 (Bessel's correction) and population variance by n. Libraries differ: pandas .std() uses n - 1 by default, while NumPy np.std() uses n.

The IQR (Q3 - Q1) gives the spread of the middle 50%. Quartile conventions differ between textbooks and software, so exam questions usually give Q1 and Q3 or use data where every method agrees.

Exam angle: the median and IQR are robust to outliers; the mean, standard deviation and range are not. Use the mode for nominal data.

Distributions

A distribution shows how often each value occurs. The key EDA plots:

Shapes to recognise:

Shape Typical clue Example
Symmetric (normal) mean ≈ median Heights
Right (positive) skew mean > median, long right tail Income, house prices
Left (negative) skew mean < median Scores on a very easy exam
Bimodal Two peaks A mix of two customer groups

For a normal distribution the empirical rule holds: about 68%, 95% and 99.7% of values lie within 1, 2 and 3 standard deviations. Kurtosis describes tail weight; the normal value is 3, or 0 as "excess kurtosis", and libraries report one or the other.

Exam angle: the mean-versus-median rule for skew is a rule of thumb that holds for typical skewed data, which is what exam questions assume.

Correlation

Pearson's r = covariance / (sd of x x sd of y). It lies between -1 and +1 and measures only linear association. For x = 2, 4, 6, 8 and y = 3, 7, 5, 9, r = 0.8.

Spearman's rho is Pearson's r computed on ranks, so it measures any monotonic trend and is more robust to outliers. A correlation heatmap shows all pairs at once and flags redundant features (multicollinearity).

Exam angle: r is unchanged when you rescale with a positive factor or add a constant, such as converting Celsius to Fahrenheit. A negative factor flips its sign.

Common traps

Worked examples

1. Understanding. A box plot of delivery times has its median line close to the bottom of the box and a long upper whisker. What shape is the distribution? Answer: right-skewed. Most values are bunched low, with a long tail of slow deliveries, so the mean will sit above the median.

2. Application. What are the mean and median of 2, 4, 6, 8, 30? Answer: the mean is 50 / 5 = 10 and the median is 6. The single value 30 pulls the mean well above the typical value.

3. Analysis. Across cities, the number of mobile shops correlates at r = 0.9 with the number of road accidents. Should the city close mobile shops? Answer: no. Population size drives both counts, so it is a confounder. Comparing rates per 100,000 people would remove most of the association.

Practise

The quiz below has 100 questions on this topic, filterable by tier and difficulty.

Practise: 100 questions

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

  1. Which measure of central tendency is least affected by a few extreme values?

    1. Median
    2. Mean
    3. Range
    4. Standard deviation
    Show answer

    Answer: A. Median

    The median depends only on the middle position of the sorted data, so making the largest value much larger does not move it. The mean uses every value and is pulled towards outliers. Range and standard deviation measure spread, not centre.

  2. For a nominal variable such as 'favourite programming language', which summary statistic is meaningful?

    1. Mean
    2. Median
    3. Standard deviation
    4. Mode
    Show answer

    Answer: D. Mode

    Nominal categories have no order and no numeric value, so only counting is meaningful. The mode, the most frequent category, is the only one of these that applies. The median needs order and the mean needs numbers.

  3. A standard box plot is built from which summary?

    1. Mean and standard deviation
    2. Mode and range
    3. Skewness and kurtosis
    4. Minimum, Q1, median, Q3 and maximum (with outliers marked)
    Show answer

    Answer: D. Minimum, Q1, median, Q3 and maximum (with outliers marked)

    A box plot draws the box from Q1 to Q3 with a line at the median, and whiskers out towards the minimum and maximum. In Tukey's version the whiskers stop at 1.5 x IQR and points beyond are plotted as outliers.

  4. Which plot is the standard first look at the distribution of a single continuous variable such as exam scores?

    1. Histogram
    2. Scatter plot
    3. Pie chart
    4. Line chart of row order
    Show answer

    Answer: A. Histogram

    A histogram groups values into bins and shows how many fall in each, revealing centre, spread, skew and multiple peaks. A scatter plot needs two variables, and a pie chart suits parts of a whole.

  5. In a typical right-skewed (positively skewed) distribution, how do the mean and median usually compare?

    1. Mean < median
    2. Mean > median
    3. Mean = median exactly
    4. The median is undefined
    Show answer

    Answer: B. Mean > median

    The long right tail pulls the mean towards the large values, while the median stays with the bulk of the data, so usually mean > median. This is a rule of thumb: unusual distributions can break it, but exams expect this pattern.

  6. What does the Pearson correlation coefficient r measure?

    1. Any relationship, linear or not, from 0 to 1
    2. The slope of the regression line in original units
    3. The strength and direction of the linear relationship between two variables, from -1 to +1
    4. How much one variable causes the other
    Show answer

    Answer: C. The strength and direction of the linear relationship between two variables, from -1 to +1

    Pearson's r is the covariance divided by the product of the standard deviations, so it is unit-free and lies between -1 and +1. It captures only linear association, and it says nothing about cause.

  7. Ice-cream sales and drowning incidents are positively correlated across months. What is the best explanation?

    1. A confounding variable, hot weather, drives both
    2. Eating ice cream causes drowning
    3. Drowning incidents increase ice-cream sales
    4. The correlation must be a calculation error
    Show answer

    Answer: A. A confounding variable, hot weather, drives both

    Hot weather raises both ice-cream sales and swimming, which raises drownings. The two variables move together because of a shared cause, so correlation alone does not show that either causes the other.

  8. When is Spearman's rank correlation preferred over Pearson's r?

    1. When the relationship is monotonic but not linear, or the data is ordinal
    2. When both variables are perfectly normal and linear
    3. When one variable is nominal with no order
    4. When you need to measure causation
    Show answer

    Answer: A. When the relationship is monotonic but not linear, or the data is ordinal

    Spearman's coefficient is Pearson's r computed on ranks, so it measures any monotonic trend and is less sensitive to outliers. It also works for ordinal data such as ratings. Nominal variables need other measures.

  9. Which plot best shows the relationship between two numeric variables, such as study hours and marks?

    1. Histogram
    2. Bar chart of category counts
    3. Pie chart
    4. Scatter plot
    Show answer

    Answer: D. Scatter plot

    A scatter plot places each observation at (x, y), so you can see direction, strength, curvature and outliers in the relationship. A histogram shows only one variable at a time.

  10. A distribution has heavier tails and a sharper peak than the normal distribution. Which statement is correct?

    1. It has positive excess kurtosis (leptokurtic)
    2. It has negative skewness
    3. It has excess kurtosis below zero (platykurtic)
    4. It has zero variance
    Show answer

    Answer: A. It has positive excess kurtosis (leptokurtic)

    Kurtosis describes tail weight. The normal distribution has kurtosis 3, or excess kurtosis 0; heavier tails give positive excess kurtosis. Note that some texts and libraries report raw kurtosis and others excess kurtosis.

FAQs

What are the main steps of EDA?

Check the shape and data types, count missing values and duplicates, summarise each variable (centre, spread, distribution), plot each variable alone, then plot pairs and the target to study relationships. Finish by noting outliers, skewed features, imbalance and redundant columns, because each of these shapes your pre-processing and model choice.

When should I use the median instead of the mean?

Use the median when the data is skewed or has outliers, as with salaries, prices or delivery times, because it reports a typical value. The mean is fine for roughly symmetric data and is needed when you care about totals, since mean x count = sum.

What is the difference between Pearson and Spearman correlation?

Pearson measures how well the points fit a straight line and uses the raw values. Spearman ranks each variable first and then applies Pearson to the ranks, so it captures any consistently increasing or decreasing pattern and is less affected by outliers. Use Spearman for ordinal data or curved but monotonic trends.

Which plots are most useful in EDA?

Histograms and box plots for one numeric variable, bar charts for categories, scatter plots for two numeric variables, and a correlation heatmap for many numeric features at once. Box plots split by class are a quick way to see which features separate the target.

Next step

Continue with Supervised Learning, the next topic in HEC's order. You can also return to the AI & ML MCQs hub or test yourself in an NSCT mock test.