☰

Statistics Interview Questions

Most Asked Statistics Interview Questions and Answers for Data Science 

Statistics is the part of a data science or data analyst interview where small wording mistakes cost the most. Interviewers listen for whether you can define a p value correctly, read a confidence interval without overclaiming, choose a sensible test and explain the result in plain words. This guide gives you 47 statistics interview questions and answers, with worked numeric examples for the ideas that come up most.

Every answer starts with a short, direct response you can say aloud, followed by a table, a worked example or code that was run before it was added, so the printed numbers are real. Formulas are written in words, so nothing depends on an image. Where a topic overlaps with machine learning or experimentation, the answer stays brief and points to the matching interview page.

The guide has six parts: 11 questions on descriptive statistics and sampling, 7 on probability and distributions, 13 on hypothesis testing and confidence intervals, 6 on correlation and regression, 7 on advanced and applied topics, and 3 on explaining statistics to non technical people. A test selection table near the end of the inference section helps you decide quickly which test fits a problem.

Key points

  • 47 questions in six parts, from descriptive statistics to regression and bias.
  • Worked numeric examples for the z score, Bayes theorem, binomial, Poisson, z test, t test, confidence interval and chi square.
  • A formula table and a test selection table in plain text.
  • Code samples were run, and the real output is shown.
  • Corrects common wrong answers about the p value, the z score and the t test.

In this guide

What this guide covers
Section Questions
Descriptive Statistics and Sampling (Freshers) Q1 to Q11
Probability and Distributions (Intermediate) Q12 to Q18
Hypothesis Testing and Confidence Intervals (Intermediate) Q19 to Q31
Correlation and Regression (Intermediate and Experienced) Q32 to Q37
Advanced and Applied Statistics (Experienced) Q38 to Q44
Explaining Statistics to Non Technical People (All Levels) Q45 to Q47

Descriptive Statistics and Sampling (Freshers)

Every statistics interview begins with how you describe data. These answers include short worked examples, so you can show the working and not only state the definition.

Q1. What is the difference between descriptive and inferential statistics?

Descriptive statistics summarise the data you have, using measures such as the mean, median, spread and charts. Inferential statistics use a sample to draw conclusions about a larger population, and report how uncertain those conclusions are, through confidence intervals and hypothesis tests. Describing 200 survey replies is descriptive. Estimating what all customers think from them is inferential.

Q2. What is the difference between a population and a sample, and a parameter and a statistic?

A population is every unit you want to study, and a sample is the subset you actually observe. A parameter is a fixed number that describes the population, such as the true mean. A statistic is a number calculated from a sample, such as the sample mean, which is used to estimate the parameter.

Population and sample terms
Term Describes Symbol usually used Example
Population mean (parameter) The whole population mu Average salary of all analysts in India
Sample mean (statistic) The sample x bar Average salary of 500 surveyed analysts
Population standard deviation The whole population sigma Spread of all salaries
Sample standard deviation The sample s Spread of the 500 salaries

 

Q3. What are the four levels of measurement?

Nominal data names categories with no order, such as city. Ordinal data has an order but unequal gaps, such as a rating of poor, fair or good. Interval data has equal gaps but no true zero, such as temperature in Celsius. Ratio data has equal gaps and a true zero, such as income or height. The level decides which statistics make sense.

Levels of measurement
Level Order Equal gaps True zero Example Sensible summary
Nominal No No No City, gender Mode, counts
Ordinal Yes No No Satisfaction rating Median, mode
Interval Yes Yes No Temperature in Celsius Mean, standard deviation
Ratio Yes Yes Yes Income, weight Mean, standard deviation, ratios

 

Q4. What are mean, median and mode, and when do you use each?

The mean is the sum of the values divided by their count, the median is the middle value when the data is sorted, and the mode is the most frequent value. Use the mean for symmetric data, the median for skewed data or data with outliers, and the mode for categories. In right skewed data the mean is larger than the median.

python
import numpy as np
from statistics import mode

data = [3, 4, 4, 5, 6, 7, 40]

print("mean:  ", round(np.mean(data), 2))
print("median:", np.median(data))
print("mode:  ", mode(data))
output
mean:   9.86
median: 5.0
mode:   4

 

The single value of 40 pulls the mean well above the median, which is why the median is a better description of a typical value here.

Q5. How do you calculate variance and standard deviation, and why does the sample version divide by n minus 1?

Variance is the average squared distance from the mean, and the standard deviation is its square root, which returns the spread to the original unit. For a sample, divide by n minus 1 and not n, because a sample mean sits closer to its own data than the true mean does, so dividing by n underestimates the spread.

python
import numpy as np

data = np.array([4, 8, 6, 5, 3, 7])

mean = data.mean()
squared = ((data - mean) ** 2)

print("mean:", mean, " sum of squared distances:", squared.sum())
print("sample variance (divide by n minus 1):", round(squared.sum() / (len(data) - 1), 2))
print("population variance (divide by n):    ", round(squared.sum() / len(data), 2))
print("sample standard deviation:", round(data.std(ddof=1), 2))
output
mean: 5.5  sum of squared distances: 17.5
sample variance (divide by n minus 1): 3.5
population variance (divide by n):     2.92
sample standard deviation: 1.87

 

Worked by hand: the mean is 5.5, the squared distances add up to 17.5, so the sample variance is 17.5 divided by 5, which is 3.5, and the standard deviation is about 1.87.

Q6. What are quartiles and the interquartile range, and how do they find outliers?

Quartiles split sorted data into four equal parts. The first quartile Q1 is the 25th percentile and the third quartile Q3 is the 75th percentile. The interquartile range is Q3 minus Q1. A common rule flags values below Q1 minus 1.5 times the range, or above Q3 plus 1.5 times the range, as outliers.

python
import numpy as np

data = np.array([12, 14, 15, 15, 16, 17, 18, 19, 95])

q1, q3 = np.percentile(data, [25, 75])
iqr = q3 - q1
low, high = q1 - 1.5 * iqr, q3 + 1.5 * iqr

print("Q1:", q1, "Q3:", q3, "IQR:", iqr)
print("fences:", low, high)
print("outliers:", data[(data < low) | (data > high)])
output
Q1: 15.0 Q3: 18.0 IQR: 3.0
fences: 10.5 22.5
outliers: [95]

 

Q7. What are skewness and kurtosis?

Skewness measures the lack of symmetry. A right skewed distribution has a long tail on the high side and the mean is above the median, as with income. Kurtosis measures how heavy the tails are compared with a normal distribution, which means how prone the data is to extreme values. Positive excess kurtosis means heavier tails.

python
import numpy as np
from scipy import stats

rng = np.random.default_rng(3)
symmetric = rng.normal(50, 10, 5000)
right_skewed = rng.exponential(10, 5000)

print("normal data skewness:      ", round(stats.skew(symmetric), 2))
print("right skewed data skewness:", round(stats.skew(right_skewed), 2))
print("normal data excess kurtosis:", round(stats.kurtosis(symmetric), 2))
output
normal data skewness:       -0.01
right skewed data skewness: 1.94
normal data excess kurtosis: -0.07

 

Q8. What is the normal distribution, and what is the 68 95 99.7 rule?

The normal distribution is a symmetric bell shaped distribution fully described by its mean and standard deviation. For normal data, about 68 percent of values lie within one standard deviation of the mean, about 95 percent within two and about 99.7 percent within three. The rule applies only to data that is approximately normal.

python
from scipy import stats

for k in (1, 2, 3):
    share = stats.norm.cdf(k) - stats.norm.cdf(-k)
    print(f"within {k} standard deviation(s): {share:.3f}")
output
within 1 standard deviation(s): 0.683
within 2 standard deviation(s): 0.954
within 3 standard deviation(s): 0.997

 

Q9. What is a z score? Show a worked example.

A z score is a value minus the mean, divided by the standard deviation. It tells you how many standard deviations a value is from the mean, so scores from different scales can be compared. It can be any positive or negative number. Values beyond about 3 in either direction are rare in normal data.

python
from scipy import stats

mean, sd = 70, 10
score = 85

z = (score - mean) / sd
print("z score:", z)
print("percentile:", round(stats.norm.cdf(z) * 100, 1))
output
z score: 1.5
percentile: 93.3

 

A score of 85 on a test with mean 70 and standard deviation 10 has a z score of 1.5, which puts it at about the 93rd percentile if scores are normally distributed.

Q10. What are the main sampling methods, and what is sampling bias?

Simple random sampling gives every unit an equal chance. Stratified sampling splits the population into groups and samples each group, which guarantees representation. Cluster sampling picks whole groups at random, and systematic sampling takes every kth unit. Sampling bias happens when the sample systematically differs from the population, for example surveying only online users.

Sampling methods
Method How it works Best when
Simple random Every unit has an equal chance You have a complete list of the population
Stratified Sample within each subgroup Subgroups differ and all must be represented
Cluster Randomly pick whole groups, then survey all within them The population is spread out and a list is costly to build
Systematic Take every kth unit from a list You need a quick sample from an ordered list

 

Q11. Which statistical formulas should you know for an interview?

Know these in words, and be able to say what each one tells you. The mean, sample variance, standard deviation, standard error, z score, confidence interval and correlation cover most first round questions. Interviewers ask for meaning more often than for memorised symbols.

Key statistics formulas in words
Measure Formula in words What it tells you
Mean Sum of values divided by the count The centre of the data
Sample variance Sum of squared distances from the mean, divided by n minus 1 How spread out the data is, in squared units
Standard deviation Square root of the variance Spread in the original unit
Standard error of the mean Standard deviation divided by the square root of n How precisely the sample mean estimates the population mean
Z score (Value minus mean) divided by standard deviation Distance from the mean in standard deviations
95 percent confidence interval for a mean Mean plus or minus critical value times standard error A plausible range for the true mean
Pearson correlation Covariance of x and y divided by the product of their standard deviations Strength and direction of a linear relationship, from minus 1 to 1

 

Probability and Distributions (Intermediate)

Probability questions test whether you can reason step by step. Write down what you know, name the rule you are using and then calculate.

Q12. What is the difference between independent and mutually exclusive events?

Two events are independent when one happening does not change the probability of the other, so the probability of both is the product of their probabilities. Two events are mutually exclusive when they cannot happen together. Mutually exclusive events with non zero probability are never independent, because if one happens the other is impossible.

Example: rolling a 6 on one die and a 6 on another are independent. Rolling a 6 and rolling a 3 on the same die are mutually exclusive.

Q13. What is conditional probability, and how does Bayes theorem use it?

Conditional probability is the probability of an event given that another event has happened. Bayes theorem reverses it: the probability of A given B equals the probability of B given A, times the probability of A, divided by the probability of B. It updates a prior belief with new evidence.

python
prevalence = 0.01        # 1 percent of people have the condition
sensitivity = 0.95       # test is positive for 95 percent of people with the condition
false_positive = 0.05    # test is positive for 5 percent of people without it

p_positive = prevalence * sensitivity + (1 - prevalence) * false_positive
p_condition_given_positive = prevalence * sensitivity / p_positive

print("probability of a positive test:", round(p_positive, 4))
print("probability of the condition given a positive test:", round(p_condition_given_positive, 3))
output
probability of a positive test: 0.059
probability of the condition given a positive test: 0.161

 

Even with a 95 percent sensitive test, only about 16 percent of people who test positive actually have the condition, because the condition is rare. This base rate effect is the point interviewers want you to notice.

Q14. What is the binomial distribution, and what conditions does it need?

The binomial distribution gives the probability of a number of successes in a fixed number of independent trials, where each trial has the same probability of success. The conditions are a fixed number of trials, two outcomes per trial, independent trials and a constant success probability. The probabilities of success and failure do not need to be equal.

python
from scipy.stats import binom

n, p = 10, 0.5

print("P(exactly 6 heads in 10 tosses):", round(binom.pmf(6, n, p), 4))
print("P(at least 8 heads in 10 tosses):", round(1 - binom.cdf(7, n, p), 4))
print("mean and variance:", n * p, n * p * (1 - p))
output
P(exactly 6 heads in 10 tosses): 0.2051
P(at least 8 heads in 10 tosses): 0.0547
mean and variance: 5.0 2.5

 

By hand, the chance of exactly 6 heads is the number of ways to choose 6 from 10, which is 210, times one half to the power 10, which gives 210 divided by 1024, about 0.205.

Q15. What is the Poisson distribution, and when do you use it?

The Poisson distribution gives the probability of a number of events in a fixed interval of time or space, when events happen independently at a constant average rate. Typical uses are calls per hour, defects per metre and website visits per minute. Its mean and variance are both equal to the rate.

python
from scipy.stats import poisson

rate = 3          # average of 3 support calls per hour

print("P(0 calls in an hour):", round(poisson.pmf(0, rate), 4))
print("P(exactly 5 calls):   ", round(poisson.pmf(5, rate), 4))
print("P(more than 5 calls): ", round(1 - poisson.cdf(5, rate), 4))
output
P(0 calls in an hour): 0.0498
P(exactly 5 calls):    0.1008
P(more than 5 calls):  0.0839

 

Q16. What is the difference between the law of large numbers and the central limit theorem?

The law of large numbers says the sample mean gets closer to the true mean as the sample grows. The central limit theorem says the distribution of sample means becomes approximately normal as the sample grows, with a spread of the standard deviation divided by the square root of n. One is about where the mean lands, the other about how it varies.

python
import numpy as np

rng = np.random.default_rng(11)
rolls = rng.integers(1, 7, 100_000)

for n in (10, 100, 10_000, 100_000):
    print(n, round(rolls[:n].mean(), 3))

print("true mean of a fair die:", 3.5)
output
10 2.8
100 3.65
10000 3.509
100000 3.504
true mean of a fair die: 3.5

 

Q17. What is expected value, and how do you calculate it?

Expected value is the long run average outcome of a random variable. Multiply each possible value by its probability and add the results. It guides decisions under uncertainty, for example whether a game or a promotion is worth running. The expected value does not have to be a value that can actually occur.

python
outcomes = [100, 20, 0]          # prize in rupees
probabilities = [0.05, 0.20, 0.75]

expected = sum(o * p for o, p in zip(outcomes, probabilities))
print("expected prize:", expected)
output
expected prize: 9.0

 

Q18. What are a PMF, a PDF and a CDF?

A probability mass function gives the probability of each exact value of a discrete variable. A probability density function describes a continuous variable, where the area under the curve between two points is the probability, and the probability of any single exact value is zero. A cumulative distribution function gives the probability that the variable is less than or equal to a value.

Hypothesis Testing and Confidence Intervals (Intermediate)

This is the part of the interview that decides most statistics rounds. Be precise with the language, because small wording mistakes about p values and intervals are what interviewers listen for.

Q19. What are the null and alternative hypotheses?

The null hypothesis states that there is no effect or no difference, and it is the claim you test against. The alternative hypothesis states that there is an effect or a difference. The test asks whether the data is unlikely enough under the null hypothesis to reject it. Failing to reject the null does not prove it true.

Example: to test whether a new course page raises sign ups, the null hypothesis says the sign up rate is unchanged, and the alternative says it is different.

Q20. What is a p value, and what is the significance level?

The p value is the probability of getting a result at least as extreme as the one observed if the null hypothesis is true. The significance level alpha is the cut off you choose in advance, commonly 0.05. If the p value is below alpha, you reject the null hypothesis. The p value is not the probability that the null hypothesis is true.

python
from scipy import stats

# Does a coin that landed heads 62 times in 100 tosses look fair?
result = stats.binomtest(62, n=100, p=0.5)
print("p value:", round(result.pvalue, 4))
output
p value: 0.021

 

A p value of about 0.02 means that if the coin were fair, a result at least this unbalanced would appear in roughly 2 percent of experiments.

Q21. What is the difference between a one tailed and a two tailed test?

A two tailed test checks for a difference in either direction, and a one tailed test checks one specified direction only. Use a one tailed test only when you chose the direction before seeing the data and a change the other way would not matter. For the same data, the one tailed p value is half the two tailed value.

python
from scipy import stats

z = 1.8
one_tail = 1 - stats.norm.cdf(z)
two_tail = 2 * one_tail

print("one tailed p:", round(one_tail, 4))
print("two tailed p:", round(two_tail, 4))
output
one tailed p: 0.0359
two tailed p: 0.0719

 

Q22. What are Type I error, Type II error and power?

A Type I error is rejecting a true null hypothesis, and its probability is alpha. A Type II error is failing to reject a false null hypothesis, and its probability is beta. Power is 1 minus beta, the chance of detecting a real effect. Power rises with a larger sample, a larger true effect and a higher alpha.

Type I and Type II errors
Decision Null hypothesis is true Null hypothesis is false
Reject the null hypothesis Type I error, probability alpha Correct, probability equals power
Fail to reject the null hypothesis Correct Type II error, probability beta

 

Q23. When do you use a z test and when a t test?

Use a z test when the population standard deviation is known. Use a t test when it is unknown and estimated from the sample, because the t distribution has heavier tails to allow for that extra uncertainty. The rule that t tests are for samples below 30 is only a rough guide, and with large samples the two give nearly the same answer.

python
import numpy as np
from scipy.stats import norm

# A course claims an average score of 70. A sample of 50 students has a mean of 73.
# Assume the population standard deviation is known to be 10.
mu, sample_mean, sigma, n = 70, 73, 10, 50

z = (sample_mean - mu) / (sigma / np.sqrt(n))
p = 2 * (1 - norm.cdf(abs(z)))

print("z statistic:", round(z, 2))
print("two tailed p value:", round(p, 4))
output
z statistic: 2.12
two tailed p value: 0.0339

 

Worked by hand: the standard error is 10 divided by the square root of 50, which is about 1.414. The z statistic is 3 divided by 1.414, about 2.12, and the two tailed p value is about 0.034. At alpha 0.05, reject the claim of 70.

Q24. What are the types of t test?

A one sample t test compares a sample mean with a known value. An independent two sample t test compares the means of two separate groups. A paired t test compares two measurements on the same units, such as scores before and after training. Choose by how the data was collected, not by how it looks.

python
import numpy as np
from scipy import stats

before = np.array([62, 70, 65, 58, 72, 68, 61, 66])
after = np.array([68, 75, 66, 63, 78, 70, 67, 71])

t, p = stats.ttest_rel(after, before)
print("paired t statistic:", round(t, 2))
print("two tailed p value:", round(p, 4))
print("mean improvement:", (after - before).mean())
output
paired t statistic: 6.6
two tailed p value: 0.0003
mean improvement: 4.5

 

Q25. What is a confidence interval? Show a worked example.

A 95 percent confidence interval is a range built so that 95 percent of intervals made this way over repeated samples would contain the true value. For a mean, it is the sample mean plus or minus a critical value times the standard error. It does not say there is a 95 percent chance that the true value is in this one interval.

python
import numpy as np
from scipy import stats

n, mean, sd = 36, 100, 12
se = sd / np.sqrt(n)
t_crit = stats.t.ppf(0.975, df=n - 1)
low, high = mean - t_crit * se, mean + t_crit * se

print("standard error:", se)
print("critical value:", round(t_crit, 3))
print("95 percent interval:", round(low, 1), "to", round(high, 1))
output
standard error: 2.0
critical value: 2.03
95 percent interval: 95.9 to 104.1

 

A sample of 36 with mean 100 and standard deviation 12 has a standard error of 2. The 95 percent interval is about 95.9 to 104.1. A larger sample would shrink the standard error and make the interval narrower.

Q26. How does a chi square test work?

The chi square test of independence compares the counts you observed in a table with the counts you would expect if the two categorical variables were unrelated. A large difference gives a large statistic and a small p value. It needs counts, not percentages, and expected counts that are not too small.

python
import numpy as np
from scipy.stats import chi2_contingency

#                 bought  did not buy
observed = np.array([[90, 210],     # saw the new page
                     [60, 240]])    # saw the old page

chi2, p, dof, expected = chi2_contingency(observed)
print("chi square:", round(chi2, 2), " degrees of freedom:", dof)
print("p value:", round(p, 4))
print("expected counts:")
print(expected)
output
chi square: 7.48  degrees of freedom: 1
p value: 0.0063
expected counts:
[[ 75. 225.]
 [ 75. 225.]]

 

Q27. What is ANOVA, and why not run many t tests instead?

ANOVA tests whether the means of three or more groups are all equal, by comparing the variation between groups with the variation within groups. Running many t tests raises the overall chance of a false positive. ANOVA gives one overall test, and a post hoc test such as Tukey then shows which groups differ.

python
import numpy as np
from scipy.stats import f_oneway

rng = np.random.default_rng(8)
a = rng.normal(70, 8, 30)
b = rng.normal(72, 8, 30)
c = rng.normal(78, 8, 30)

f, p = f_oneway(a, b, c)
print("F statistic:", round(f, 2))
print("p value:", f"{p:.1e}")
output
F statistic: 13.62
p value: 7.1e-06

 

Q28. What are non parametric tests, and when should you use them?

Non parametric tests make fewer assumptions about the shape of the data, so they suit small samples, skewed data, outliers and ordinal data. Common ones are Mann Whitney U in place of the independent t test, Wilcoxon signed rank in place of the paired t test, and Kruskal Wallis in place of ANOVA. They have less power when the standard assumptions hold.

Q29. What is the problem with testing many hypotheses, and how do you correct for it?

Each test carries a chance of a false positive, so running many tests makes it likely that at least one looks significant by luck. With 20 tests at alpha 0.05 that chance is about 64 percent. Control it with the Bonferroni correction, which divides alpha by the number of tests, or with false discovery rate methods such as Benjamini Hochberg.

python
alpha, tests = 0.05, 20

print("chance of at least one false positive:", round(1 - (1 - alpha) ** tests, 2))
print("Bonferroni threshold for each test:", alpha / tests)
output
chance of at least one false positive: 0.64
Bonferroni threshold for each test: 0.0025

 

Q30. What is effect size, and why is a significant result not always important?

Effect size measures how large a difference or relationship is, for example a difference in means divided by the standard deviation, known as Cohen d. With a very large sample even a tiny, useless difference can be statistically significant. Always report the effect size and a confidence interval next to the p value, and judge whether the size matters to the business.

python
import numpy as np
from scipy import stats

rng = np.random.default_rng(2)
a = rng.normal(100.0, 15, 200_000)
b = rng.normal(100.3, 15, 200_000)

t, p = stats.ttest_ind(b, a)
d = (b.mean() - a.mean()) / np.sqrt((a.var(ddof=1) + b.var(ddof=1)) / 2)

print("p value:", p)
print("Cohen d:", round(d, 3))
output
p value: 1.464887453014415e-18
Cohen d: 0.028

 

The p value is extremely small, yet the effect size is about 0.03, which is negligible. A statistically significant result is not automatically a meaningful one.

Q31. How do you choose the right statistical test?

Choose by the type of outcome, the number of groups and how the data was collected. Compare two means with a t test, three or more means with ANOVA, two categorical variables with a chi square test, and a relationship between two numbers with correlation or regression. Switch to a non parametric test when the assumptions fail.

Which statistical test to use
Question Data Typical test Non parametric option
One group mean against a known value Numeric One sample t test, or z test if sigma is known Wilcoxon signed rank
Two independent group means Numeric Independent two sample t test Mann Whitney U
Before and after on the same units Numeric Paired t test Wilcoxon signed rank
Three or more group means Numeric One way ANOVA Kruskal Wallis
Two categorical variables Counts Chi square test of independence Fisher exact test for small counts
Two proportions, such as conversion rates Binary outcome Two proportion z test Fisher exact test
Relationship between two numeric variables Numeric Pearson correlation or regression Spearman correlation

 

Correlation and Regression (Intermediate and Experienced)

Regression questions test whether you can interpret a model, not only fit one. Be ready to explain what each number in the output means in plain language.

Q32. What is the difference between Pearson and Spearman correlation?

Pearson correlation measures the strength of a linear relationship between two numeric variables and is sensitive to outliers. Spearman correlation works on ranks, so it measures whether one variable consistently rises or falls with the other, even if the relationship is curved, and it is more robust to outliers. Both range from minus 1 to 1.

python
import numpy as np
from scipy import stats

hours = np.array([1, 2, 3, 4, 5, 6, 7, 8])
score = np.array([35, 40, 48, 55, 62, 70, 72, 95])      # rises steadily, with a jump at the end

print("Pearson: ", round(stats.pearsonr(hours, score)[0], 3))
print("Spearman:", round(stats.spearmanr(hours, score)[0], 3))
output
Pearson:  0.976
Spearman: 1.0

 

Spearman is exactly 1 here because the scores always rise with the hours, even though the relationship is not a perfect straight line.

Q33. What is the difference between covariance and correlation?

Covariance shows whether two variables move in the same direction, but its size depends on the units, so it is hard to compare. Correlation is covariance divided by the product of the two standard deviations, which removes the units and fixes the range between minus 1 and 1. Use correlation to compare the strength of relationships.

Q34. How do you interpret a linear regression output?

The intercept is the predicted value when all features are zero. Each coefficient is the expected change in the outcome for a one unit increase in that feature, holding the others fixed. R squared is the share of variation the model explains, and the p value of a coefficient tests whether that coefficient is different from zero.

python
import numpy as np
from scipy import stats

rng = np.random.default_rng(4)
experience = rng.uniform(0, 10, 60)
salary = 3 + 0.8 * experience + rng.normal(0, 1.5, 60)     # lakhs per year

fit = stats.linregress(experience, salary)
print("slope:", round(fit.slope, 2))
print("intercept:", round(fit.intercept, 2))
print("R squared:", round(fit.rvalue ** 2, 2))
print("p value of the slope:", fit.pvalue)
output
slope: 0.66
intercept: 3.87
R squared: 0.64
p value of the slope: 1.9847494097134272e-14

 

Read the slope as: each extra year of experience is associated with about 0.66 lakh more salary, in this made up data. The word associated matters, since regression alone does not prove cause.

Q35. What is the difference between R squared and adjusted R squared?

R squared is the share of the outcome variation explained by the model, and it never falls when you add a feature, even a useless one. Adjusted R squared corrects for the number of features, and it falls if a new feature adds less than chance would. Use adjusted R squared to compare models with different numbers of features.

python
def adjusted_r2(r2, n, k):
    return 1 - (1 - r2) * (n - 1) / (n - k - 1)

print(round(adjusted_r2(0.80, n=50, k=3), 4))
print(round(adjusted_r2(0.81, n=50, k=15), 4))
output
0.787
0.7262

 

The second model has a higher R squared but a lower adjusted R squared, because 12 extra features added too little to be worth their cost.

Q36. How do you detect multicollinearity, and what does the variance inflation factor mean?

Multicollinearity means features are strongly correlated with each other, which makes coefficients unstable. The variance inflation factor for a feature is 1 divided by 1 minus R squared, where R squared comes from predicting that feature from the others. Values above about 5 to 10 are a warning sign. Remove or combine features, or use Ridge regression.

python
import numpy as np

rng = np.random.default_rng(0)
a = rng.normal(size=300)
b = a * 0.95 + rng.normal(scale=0.3, size=300)      # strongly related to a
c = rng.normal(size=300)                            # independent

def vif(target, others):
    X = np.column_stack([np.ones(len(target))] + others)
    beta, *_ = np.linalg.lstsq(X, target, rcond=None)
    resid = target - X @ beta
    r2 = 1 - resid.var() / target.var()
    return 1 / (1 - r2)

print("VIF of a:", round(vif(a, [b, c]), 1))
print("VIF of c:", round(vif(c, [a, b]), 1))
output
VIF of a: 12.2
VIF of c: 1.0

 

Q37. What does it mean when residuals show heteroscedasticity?

Heteroscedasticity means the spread of the residuals changes with the fitted value, often fanning out as values grow. The coefficients are still unbiased, but standard errors and p values become unreliable. Plot residuals against fitted values to spot it, then try transforming the outcome, using robust standard errors or fitting weighted regression.

Advanced and Applied Statistics (Experienced)

Experienced candidates are expected to spot where an analysis can mislead. These questions test judgement about bias, uncertainty and method choice.

Q38. What is Simpson paradox?

Simpson paradox is when a trend that appears in several groups reverses or disappears when the groups are combined. It happens when group sizes differ and a hidden variable affects both the group and the outcome. The fix is to analyse the data by the relevant groups and think about which view answers the question.

python
# A widely cited medical example: success counts out of patients, by stone size
small = {"A": (81, 87),  "B": (234, 270)}
large = {"A": (192, 263), "B": (55, 80)}

for name, data in (("small stones", small), ("large stones", large)):
    print(name, {k: round(s / n, 3) for k, (s, n) in data.items()})

overall = {k: (small[k][0] + large[k][0]) / (small[k][1] + large[k][1]) for k in "AB"}
print("overall", {k: round(v, 3) for k, v in overall.items()})
output
small stones {'A': 0.931, 'B': 0.867}
large stones {'A': 0.73, 'B': 0.688}
overall {'A': 0.78, 'B': 0.826}

 

Treatment A is better for both small and large stones, yet treatment B looks better overall, because A was given mostly to the harder, large stone cases.

Q39. What is bootstrapping, and when is it useful?

Bootstrapping estimates the uncertainty of a statistic by repeatedly resampling the data with replacement and recalculating the statistic each time. The spread of those results approximates its sampling distribution. It is useful when no simple formula exists, for example for a median, a ratio or a custom metric, and when the sample is small.

python
import numpy as np

rng = np.random.default_rng(6)
data = np.array([12, 15, 14, 10, 18, 25, 13, 16, 40, 14])

medians = [np.median(rng.choice(data, size=len(data), replace=True)) for _ in range(5000)]
low, high = np.percentile(medians, [2.5, 97.5])

print("sample median:", np.median(data))
print("95 percent bootstrap interval for the median:", low, "to", high)
output
sample median: 14.5
95 percent bootstrap interval for the median: 13.0 to 20.5

 

Q40. How do Bayesian and frequentist approaches differ?

A frequentist treats parameters as fixed and probability as the long run frequency of outcomes over repeated experiments, so it reports p values and confidence intervals. A Bayesian treats parameters as uncertain, starts from a prior belief, updates it with the data and reports a posterior distribution and credible intervals. Bayesian results are easier to read as direct probabilities, but need a prior.

python
from scipy.stats import beta

# Prior belief about a conversion rate: Beta(1, 1), meaning no strong opinion.
# Data: 60 conversions out of 500 visitors.
prior_a, prior_b = 1, 1
conversions, visitors = 60, 500

posterior = beta(prior_a + conversions, prior_b + visitors - conversions)
low, high = posterior.interval(0.95)

print("posterior mean:", round(posterior.mean(), 3))
print("95 percent credible interval:", round(low, 3), "to", round(high, 3))
output
posterior mean: 0.122
95 percent credible interval: 0.094 to 0.151

 

Q41. What is maximum likelihood estimation?

Maximum likelihood estimation chooses the parameter values that make the observed data most probable. You write the likelihood of the data as a function of the parameters and find the values that maximise it, usually through the log likelihood. For example, the sample mean is the maximum likelihood estimate of the mean of a normal distribution. Logistic regression is fitted this way.

Q42. What are the types of missing data, and why do they matter?

Data can be missing completely at random, missing at random given other observed variables, or missing not at random, where the reason depends on the missing value itself. Dropping rows is only safe in the first case. When high earners skip an income question, for example, the result is biased unless you model the missingness.

Q43. What are selection bias and survivorship bias?

Selection bias happens when the people or items in your data are not representative of the group you want to study, because of how they were chosen. Survivorship bias is a type of it, where you only see the cases that survived a process and miss the failures. Reviewing only successful companies to find what makes a company successful is a classic example.

Q44. How do you check whether data is normally distributed?

Look at a histogram and a Q Q plot, where points near a straight line suggest normality, and use a test such as Shapiro Wilk as a supporting check. With large samples these tests flag tiny departures that do not matter, so judge by the plot and by how sensitive your method is. Many methods tolerate mild non normality.

python
import numpy as np
from scipy import stats

rng = np.random.default_rng(9)
normal_data = rng.normal(50, 10, 200)
skewed_data = rng.exponential(10, 200)

print("normal data Shapiro Wilk p:", round(stats.shapiro(normal_data).pvalue, 3))
print("skewed data Shapiro Wilk p:", stats.shapiro(skewed_data).pvalue)
output
normal data Shapiro Wilk p: 0.851
skewed data Shapiro Wilk p: 6.723700429845165e-14

 

A small p value means the data departs from normality. The normal sample gives a large p value, and the skewed sample gives a very small one.

Explaining Statistics to Non Technical People (All Levels)

In real work you will explain results to managers and clients. Interviewers often test this with one question, to see whether you can be clear without losing accuracy.

Q45. How would you explain a p value to a manager?

Say that the p value tells you how surprising the result would be if nothing had really changed. A small value means the result would be very unusual by chance alone, so there is evidence of a real effect. Add that it does not tell you how big or how important the effect is.

What the interviewer is listening for: You avoid jargon, you stay accurate and you point out what the number does not tell you.

Q46. How would you explain a confidence interval to a client?

Say that the average from the survey is our best estimate, and the interval is a range that shows how precise it is. A narrow range means we can rely on the number more. If the range for a change includes zero, we cannot yet be sure there was any change.

What the interviewer is listening for: You describe precision in plain words and tie it to a decision.

Q47. How do you explain standard deviation to someone who has never studied statistics?

Describe it as the typical distance of values from the average. If two classes both average 70 marks, a small standard deviation means most students scored close to 70, and a large one means scores were widely spread. It tells you whether the average is a good summary of the group.

What the interviewer is listening for: You use a concrete example in place of the formula.

Common questions about statistics interviews

What statistics topics are asked most in data science interviews?

The most common topics are descriptive statistics, probability and Bayes theorem, the normal distribution, hypothesis testing with p values, confidence intervals, regression and correlation. Experienced candidates are also asked about A B testing, bias, Simpson paradox and how to explain results. Prepare each with one worked numeric example.

How much statistics do I need for a data analyst role?

Analysts need solid descriptive statistics, sampling, the normal distribution, confidence intervals, basic hypothesis tests and correlation. Regression and experiment design help for senior analyst roles. The emphasis is on interpreting results correctly and explaining them clearly, more than on proofs or derivations.

Do I need to memorise formulas for a statistics interview?

Know the main formulas and what each one means, such as the standard error, z score and confidence interval. Interviewers care more that you can explain the idea and use it on a small example than that you recite symbols. If you forget one, say so and reason from the definition.

What are the most common statistics mistakes in interviews?

Common mistakes include saying the p value is the probability that the null hypothesis is true, reading a confidence interval as a probability for one fixed interval, treating correlation as causation, and saying the t test is only for samples below 30. Practise stating these four points correctly.

How can I practise statistics for interviews?

Work each question here by hand first, then check it with the code. Take one public dataset and run a descriptive summary, a hypothesis test and a regression on it, writing a two line plain language conclusion for each. Then explain one result aloud as if to a manager.

A four week plan to prepare

Use this plan if you have about a month before your interview.

Four week study plan
Week Focus What to do
Week 1 Descriptive statistics, sampling and the normal distribution Work the first section by hand, then check each answer with the code.
Week 2 Probability, Bayes theorem and common distributions Solve five new Bayes and binomial problems of your own, and explain each aloud.
Week 3 Hypothesis testing and confidence intervals Run a t test, a chi square test and ANOVA on a public dataset and write a one paragraph conclusion for each.
Week 4 Regression, bias and communication Fit a regression, interpret every number, and rehearse the three plain language answers at the end.

 

Practise with a trainer

If you want to practise statistics with a trainer and apply it to real projects, you can book a free demo class for the Prwatech Data Science course. It covers statistics, Python, SQL and machine learning with hands on work.

Contact the learning team for current batch dates and fees.

Written by Mithun Ray, data engineering trainer at Prwatech. Reviewed by Avishekh Verma. Last updated October,2026.

Popular Tags:

Statistics Interview Questions and Answers