Probability and Statistics Interview Questions and Answers _ by Nathan Rosidi _ Nov, 2021 _ Towards Data Science
Probability and Statistics Interview Questions and Answers _ by Nathan Rosidi _ Nov, 2021 _ Towards Data Science
Upgrade
Following 601K Followers · Editors' Picks Features Deep Dives Grow Contribute About
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 1/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Everybody knows the journey to get a data science job nowadays is tougher
than ever. The immense growing popularity of data science means that we
have more competition to fight for that one job. Hence, it is crucial to
rightfully prepare the right things every time we get an interview.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 2/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
During a data science interview preparation, most people will shift their
attention more towards programming and SQL skills, or advanced concepts
like deep learning, computer vision, or natural language processing.
However, it’s fair to say that statistics and probability are also very
important concepts to master, especially when you’re looking into a Data
Analyst or Product Data Scientist role.
In this article, we are going to walk you through some important concepts
and tips that you can apply to ace your probability and statistics interview
questions.
When you’re working in a tech company and your company would like to
launch a new feature or product, they will assign you to conduct an A/B test
on two different products. But how do you know that one product is
superior to another? Well, once again, you need to have solid statistics
knowledge because we need hypothesis testing, the margin of error,
confidence interval, the sample size, statistical power, and so on to judge
the quality of our observations.
Also, the foundation of fancy deep learning architectures that we use for
our project also come from statistics. Just take a look at Variational
Autoencoders (VAE) or Bayesian Neural Networks (BNN) for example. Both
VAE and BAE use a probability distribution to approximate the neural
network’s parameters instead of using a deterministic value.
Now that we know how important statistics is in our daily life as a Data
Analyst or a Data Scientist, let’s take a look at various concepts in statistics
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 4/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
In this section, we’re going to delve into probability concepts that you
should know to ace your data science interview.
Probability Fundamentals
In this section, all of the fundamentals regarding probability concepts will
be covered. As you might know, probability is the key concept of statistics
and thus, it’s important that we understand the basic concept of probability.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 5/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Below are the common notations and operations that you might encounter
in the probability interview questions:
Union
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 6/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Let’s say we have two events: A and B. The union of A and B consists of all
of the outcomes from events A, B, or both.
Intersection
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 7/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
When we have two events: A and B, the intersection of A and B consists only
of the outcomes that exist in both A and B.
When there is a probability question: “what is the probability that the event A
and B both occur?”, we always need to use an intersection.
Mutually Exclusive
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 8/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
When we have two events: A and B, we can say that the two events are
mutually exclusive when any of the outcomes from event A doesn’t match
with any of the outcomes from event B.
Probability Properties
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 9/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Probability Range
The closer the probability to 1, the more likely it is that an event will occur.
Probability Complements
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 10/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Let’s say that we know the probability of raining tomorrow is 0.8, then the
probability that tomorrow will not rain would be 1–0.8 = 0.2.
If the two events are mutually exclusive, this means that P(A∩B) = 0. Thus,
the probability of union of two events in this case would be:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 11/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Example Question:
Since there are two different colors (26 cards each) and four different
shapes (13 cards each) in a deck of 52 cards, then after we pull one card out
of the deck, the probability of us pulling a card with the different color
would be:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 12/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Now, the probability of us pulling a card with different shape and color
would be:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 13/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Because let’s say we get a red heart in the first pull, then the condition
P(A∩B) will be fulfilled if we get a black spade or a black club in the second
pull, hence in total 26 cards out of 51.
Now that we have all of the information, we can plug these values into the
probability of union of two events formula:
Conditional Probability
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 14/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 15/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
As an example, let’s say you want to draw two cards from a deck of cards
and you hope to get a 5 heart in one of those draws.
At the first draw, your probability is 1/52, since there are 52 cards in a deck
of cards. Now after the first draw, you notice that you didn’t get a 5 heart. In
the second draw, your probability of getting a 5 heart is no longer 1/52, but
1/51. The outcome from your first draw affects your probability in the
second draw. This means that the two events are dependent events.
If two events are dependent events, then the probability of the occurrence
of event A given that event B has occurred is nothing different than the
conditional probability:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 16/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
As an example, you want to toss a coin twice and you hope to get a tail in
one of the tosses. In the first toss, your probability of getting a tail is ½. Now
after the first toss you notice that you didn’t get a tail. However, the
probability of you getting a tail in the second toss is still ½. The fact that you
didn’t get a tail in the first toss doesn’t have any influence at all on your
probability of getting a tail in the second toss.
If two events are independent events, then the probability of the occurrence
of event A given that event B has occurred can be defined as:
because
Example Question:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 17/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
“You have 2 dice. What is the probability of getting at least one 4?”
Since in one roll of a die we could get 6 possible outcomes, then the
probability of us getting a 4 in a single roll would be ⅙. Hence:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 18/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Now the question is, what is the probability of event A and event B both to
occur (P(A∩B))?
Next, with all of this information in hand, we can plug the values into the
probability equation of union of two events:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 19/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Permutations
In the first scenario, the 3 medals that will be awarded are Gold for the first
winner, Silver for the second position, and Bronze for the third position.
Since the medal that will be awarded is different depending on the athletes’
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 20/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
final positions, then in this scenario the order matters. As mentioned above,
when the orders do matter, then we’re dealing with permutations.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 21/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
where n is the total number of items and k is the total number of items to be
ordered.
Example Question:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 22/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
“There are three people and 1st, 2nd and 3rd place at a competition, how many
different combinations are there? “
Since there are three people and there are 3 places that need to be ordered
and these orders are important, then we need to use the general equation of
permutation.
Combinations
Let’s get back to the tennis competition example from earlier. But now
instead of awarding them with Gold, Silver, and Bronze medals, we will
award them with souvenirs. All of the three winners will receive the same
souvenirs.
In this scenario, the order won’t matter anymore since all of the three
winners receive the same souvenirs. This means that if the three winners
are athletes A, B, and C, we have the following condition:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 23/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Note that the condition above doesn’t work for permutations since, in
permutations, the order of the winners does matter.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 24/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
which is the famous Binomial coefficient that you will see in the Binomial
distribution in the next chapter.
Example Question:
Since we have 200 students, then we have a total number of items n = 200.
Next, one of the solutions to find out who’s cheating is by comparing a pair
of students’ exams one by one and their order doesn’t matter, i.e a pair of
student A’s and student B’s exams is the same as a pair of student B’s and
student A’s exams.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 25/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Since we want to compare the exam on a pair basis, then the total number
of items to be ordered k is 2. Hence we have:
Probability Distributions
Before tossing a fair coin, we know that we can only get 1 out of 2 possible
outcomes, whether it’s a head or a tail. Before rolling a fair die, we know
that we can only get 1 out of 6 possible outcomes. Now here comes the
questions:
All of the questions above can be answered with the help of probability
distributions.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 26/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
There are two important properties that we can derive from probability
distributions: the expected value and the variance.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 27/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
probability distribution.
In this section, we’re going to guide you through some of the most
commonly asked probability distributions during the interview and their
use cases.
The x-axis of PMF represents the possible outcomes of an event and the y-
axis represents the probability of each event occurring. There are several
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 28/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
discrete probability distributions that you should know for your data
science interview preparations. Let’s start with Bernoulli distribution.
Bernoulli Distribution
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 29/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
If we toss a fair coin, we know that the probability of getting a tail is 0.5.
Hence, the probability of getting a head is also 0.5, as you can see in the
graphic above.
Example Question:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 30/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
“Three ants are sitting at the three corners of an equilateral triangle. Each ant
randomly picks a direction and starts to move along the edge of the triangle.
What is the probability that none of the ants collide?”
Also, each ant can go in either direction and this doesn’t have any influence
on another ant, hence we can classify this case as independent events.
To answer the question, we need to use the probability theory that we have
discussed in the previous section.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 31/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 32/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 33/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Example Question 1:
“Given n samples from a uniform distribution [0, d], how to estimate d?”
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 34/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Example Question 2:
Jane Street asked a question about rolling a die in one of their data science
interviews:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 35/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 36/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Binomial Distribution
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 37/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
where n is the number of trials and k is the number of successes. Notice that
we have a binomial coefficient there that we have discussed in the
Combinations section.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 38/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Example Question:
This question can be answered with binomial distribution. In this case, the
number of trials n is 7 and the number of success k is 1 (one 5).
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 39/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Hypergeometric Distribution
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 40/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Let’s say we have a deck of cards and we want to draw 10 cards out of that
deck sequentially. The question is, how many times will you get a heart?
This use case is very similar to binomial distribution, but there is a major
difference between binomial and hypergeometric distributions.
Before the first draw, we have a 13/52 probability of getting a heart. Now
let’s say that we got a spade in the first draw, then the probability of us
getting a heart in the second draw is no longer 13/52, but 13/51 since we
have taken one card out from the deck. This means that each draw is not
independent with another since the amount of cards in the deck will be
decreased as we draw more cards.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 41/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Example Question:
After pulling one card randomly from a shuffled deck of cards, the
probability of the second card has a different color or shape (without any
replacement) can be defined mathematically as:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 42/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 43/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Geometric Distribution
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 44/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
You might notice that the PMF between geometric distribution and
binomial distribution are different. However, they have a very similar
concept. Let’s use a coin toss as an example.
Let’s say we want to get a tail in a coin toss. With binomial distribution, we
can estimate the number of tails that we will get from n coin tosses.
Meanwhile with geometric distribution, we can estimate the number of coin
tosses until we finally get our first tail.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 45/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 46/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Example Question:
“You’re at a casino with two dice, if you roll a 5 you win, and get paid $10.
What is your expected payout? If you play until you win (however long that
takes) then stop, what is your expected payout?”
Our objective is that we get a 5 from rolling two dice. This means that we
have 4 possibilities out of 36 different combinations: {4,1},{2,3},{3,2},
and {1,4}.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 47/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 48/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 49/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
If geometric distribution asks: “how many failures until the first success?”,
the negative binomial distribution asks: “how many failures until n number
of successes?”. Instead of the number of failures until the first success, the
negative binomial distribution extends this concept by measuring the
number of failures until we reach n number of successes.
where n is the number of successes that we’re looking for and p is the
probability of success.
Example Question:
question:
“Toss a coin till you get 2 heads. What’s the expected number of tosses to
achieve this goal?”
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 52/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Since the coin is a fair coin, then the probability of us getting a head in a
coin toss is ½ and our goal is to toss the coin until we get 2 heads (2
successes). With this information, we can plug the values into the equation
above.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 53/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
PDF can be defined as the area under the curve between interval A and B,
as you can see from the figure below.
The interval between A and B can be computed with integration, but most
programming language libraries or statistical software will do that for you.
Normal Distribution
The normal distribution is the most famous distribution out there and it has
a bell-curved shape as you can see in the figure above. There are two
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 54/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
This distribution is widely used for inferential statistics due to its important
properties, which is called the empirical rule.
The empirical rule is a rule that defines the normal distribution, which are:
Roughly 68% of the observations lie within one standard deviation from
the mean
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 55/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
The mean value can be any real number and non-negative and the standard
deviation should also be non-negative.
You will see more about the z-test and z-distribution in the statistics
chapter.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 56/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Student t-distribution
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 57/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
You will normally use this distribution if you want to test whether the
average of your sample data corresponds to the average population when
the standard deviation of the whole population is unknown.
You will see how to conduct this student t-test in the statistics chapter.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 58/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
You might ask, if they measure the center of our data, then what’s the
difference between them? It’s the method that they use to find the center of
our data.
To better understand the difference between them, let’s take a look at data
with different distributions as follows.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 59/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
If the data is normally distributed, then the values of mean, median, and
mode are all identical, as you can see in the middle image above. If the data
distribution is left-skewed, then the mean will be lower than the median.
Meanwhile, if the data distribution is right-skewed, then the mean will be
higher than the median.
The graph above shows us one important thing: mean is a highly sensitive
metric to measure the center of our data. If we have outliers in our data, the
mean value could be dragged way further in comparison with the median.
Thus, it’s very important to check whether outliers exist in our data before
using the mean to measure the center of our data.
Example Question 1:
Facebook asked about the concept of mean and median in one of their data
science interviews. Here was the question:.
“In Mexico, if you take the mean and the median age, which one will be higher
and why?”
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 60/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
To answer this question, we need to find out what is the shape of age
distribution in Mexico, whether it is normally distributed, right-skewed, or
left-skewed.
Although not directly related to the concept of mean, mode, and median,
Airbnb asked about the following question in of their data science
interviews:
Although this question doesn’t explicitly talk about measures of the center,
its concept would be very important to answer this question. Let’s say that
we have numerical data and a small portion of it contains missing values. If
we want to impute the missing values, we can fill them with the mean of the
data or the median of the data. But which one should we choose?
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 61/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
We first need to check the distribution of our data and see whether outliers
exist. If there are outliers, then choosing the mean to fill the missing values
would introduce bias in our data and that’s not something that we want to
achieve. If we have outliers in our data, using the median to fill the missing
values would be the better choice as the median is more robust to outliers.
Now if we have categorical data, then it would make sense if we impute the
data with the mode, which means that we fill the missing values simply
with the most frequent categories that appear in our data.
Range
Range is the simplest metrics to measure the spread of our data. Let’s say
we have data about the annual salary of employees in a company. Let’s say
that the lowest salary is $35,000 and the highest is $105,000. The range is
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 62/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
simply the subtraction between the highest and the lowest salary. Thus the
range, in this case, would be $70,000.
Variance
Variance measures the dispersion of our data around the mean. However,
variance is not used frequently in a real-world application due to the fact
that the values that we got from the variance were squared, i.e
This means that the variance and the mean value have different units, e.g if
the mean is in meter (m), then the variance would be in meter-square (m²).
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 63/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
This makes variance less intuitive in terms of defining how big the spread of
the data is from the mean.
Standard Deviation
Standard deviation comes to the rescue to solve the problem with variance,
as it also measures the dispersion of our data around the mean. The
difference is, the standard deviation is the square root of variance, i.e.
This small tweak makes the unit of observation between the mean and the
standard deviation become equal, which then makes it easier for us to
quantify how wide the spread of our data is around the mean.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 64/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
As an example, let’s say we know that the data is normally distributed and
the mean annual salary of employees is $60,000. From this, we can infer
that 68,2% of employees’ salaries lie in between 1 standard deviation from
$60,000, around 95% between 2 standard deviations from $60,000, and
99,7% between 3 standard deviations from $60,000 (see empirical rule in
the Normal Distribution section).
Quartiles
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 65/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Quartiles measure the spread of our data by dividing the distribution of our
data into 4 parts: the lower quartile (25% of our data), two interquartile
(25%-50% and 50%-75% of our data), and the upper quartile (75% of our
data). Commonly, the concept of quartiles can be easier to understand with
the boxplot visualization as follows:
The questions regarding the measure of spread are very common in a data
science interview, as examples, Travelport asked: “What is standard
deviation? Why do we need it?” and Microsoft asked: “What is the definition
of the variance?”. We have discussed the answers to both questions so far.
Example Question:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 66/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Microsoft asked about the concept that tests our knowledge about the
measure of spread in one of their data science interviews. Here was the
question:
Although the question doesn’t explicitly mention the measures of spread, its
concept is very important to answer this question. To detect an outlier, we
can see where a data point lies in the distribution. If we have data that is
normally distributed, then we can conclude that a data point is an outlier if
it lies beyond 3 standard deviations from the mean.
Inferential Statistics
Knowledge of inferential statistics is becoming very crucial in a data science
world. This is our powerful tool to derive insight into the problem that we
try to solve by observing some patterns in the data.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 67/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
There are several steps and terms that you need to know within the scope of
inferential statistics. Let’s start with hypothesis testing.
Hypothesis Testing
Null hypothesis: the IQ of men and female students are the same
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 68/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
However, it is important to note that the null hypothesis is always the status
quo in hypothesis testing, which means that the null hypothesis is always
the default true value. This means that we either reject the null hypothesis
or not. This is also the reason why we never say that we ‘accept’ the null
hypothesis.
Now the question is, how do we know whether or not we should reject the
null hypothesis? Let’s find out in the next section.
Significance Level
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 69/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
The lower the significance level, the more cautious you’re in rejecting the
null hypothesis, and vice versa.
Confidence Interval
We can say that the confidence interval complements the significance level
if we conduct a two-tailed hypothesis test. This means that if our
significance level is 5%, then the confidence interval would be 95%, as you
can see in the following figure.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 70/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Now if your significance level is 1%, then the confidence interval would be
99%, and if your significance level is 10%, then the confidence interval
would be 90%
The formula for computing the confidence interval itself can be written as:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 71/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
where x_bar is the sample mean, Z is the confidence level value, σ is the
standard deviation of the sample, and n is the number of samples.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 72/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Example Question 1:
Tesla asked about the concept of confidence interval in one of their data
science interviews. Here was the question:
“There are 100 products and 25 of them are bad. What is the confidence
interval?”
If there are 100 products and we know that 25 of them are bad, then we’re
dealing with binomial distribution in this case.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 73/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Plug this probability value into the mean and variance equation above, we
get:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 74/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
The standard error is the standard deviation divided by the square root of
the total number of experiments.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 75/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 76/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Example Question 2:
Google asked about the concept of margin of error and the sample size in
one of their data science interviews. Here was the question:
“For sample size n, the margin of error is 3. How many more samples do we
need to bring the margin of error down to 0.3?”
From the equation above, we know that margin of error has an inverse
relationship with sample size, i.e:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 77/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
If the margin of error is 3 for a sample size of n, then to bring the margin of
error down to 0.3, we need:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 78/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
which means that we need 100*n more samples to bring the margin of
error down to 0.3
p-Value
The lower the p-Value, the more surprising your observation is considering
that the null hypothesis is true.
Let’s say that the p-Value from your observation is 0.02 and your
significance level is 0.05. Since the p-Value is less than the significance
level, then we reject the null hypothesis in favor of the alternative
hypothesis. Meanwhile, if your p-Value is 0.02 but your significance level is
0.01, then we can’t reject the null hypothesis.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 79/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Example Question:
State Farm asked about the concept of p-Value in one of their data science
interviews. Here was the question:
You can answer what a p-Value is from the definition above. Now the
question is, would our interpretation of p-Value change if we had a much
bigger dataset?
Statistical Tests
Now we know that there are three common terminologies that we normally
find in hypothesis testing: significance level, confidence interval, and the
p-Value.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 80/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
But how do we conduct the statistical test to get this p-Value? This is where
things get a little bit tricky, since there are different statistical tests out there
depending on what you want to observe. Here are the common statistical
tests that you should know.
Conditions to fulfill:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 81/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
As you might already guess, the variables in this test should follow the
standard normal distribution or z-distribution. In order to obtain the p-
Value, we need to compute the Z value first.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 82/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
After we get the Z value, we can use the z-table or the more convenient
statistical libraries in Python or R to get the corresponding p-Value.
In real-life situations, the Z-test is not performed that often because the
standard deviation of the population is often unknown.
If we want to test if the mean of the sample data that we have corresponds
to the population mean. With t-test, we have the assumption that we don’t
know the population standard deviation, which is more realistic in real-life
scenarios.
Conditions to fulfill:
If sample size is very small (around 15), then the data should have a
normal distribution
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 83/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
If the sample size is considerably large (around 40), then the test is safe
to be conducted even when the data is skewed.
The intuition behind the t-test is similar with the Z-test, except that we
don’t know the population standard deviation. Hence, we’re using the
sample standard deviation.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 84/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Once we know the t-value and the DOF, we can use statistical software to
find the corresponding p-Value.
Paired t-Test
If we want to test the same sample with different treatment, and then check
whether this treatment yields a statistically different result within the same
sample.
The conditions to fulfill in general are the same as the one-sample t-test
above. The formula to compute the t-statistic is also the same. The only
difference is how we interpret the result from the t-test.
Before, the t-test measures the mean of our variable of interest. Meanwhile
in this paired t-test, we are more interested in the mean or standard
deviation difference of our variable of interest.
Two-Sample t-Test
If we want to test two different samples with different treatments, and then
check whether the treatments yield a statistically different result between
two samples.
Conditions to fulfill:
The result will be more reliable if the size of two samples are the same
where the index 1 and 2 denote your first and second samples, respectively.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 86/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Here the intuition of the t-statistic is the same as paired t-test, which means
that the t-statistic measures the mean and standard deviation difference of
our two different samples.
The conditions to fulfill in general are the same as the two-sample t-test
above, but instead of only two samples, in ANOVA there are more than two
samples.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 87/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Check out our post ‘Probability and Statistics Questions for Data Science
Interviews’ to find how you can use Python for solving Probability and
Statistics questions.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 88/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Conditions to fulfill:
The sample size is large enough such that there are at least 5 items in
each data category.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 89/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
After computing the Goodness of Fit, at the end we will get the p-Value,
same as the other tests mentioned above that gives us the insight whether
or not we should reject the null hypothesis.
If we want to test if two or more sample data are likely to be related or not.
The idea is similar to ANOVA.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 90/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
The conditions to fulfill are in general the same as the Goodness of Fit
above, except that instead of just one sample, in this test we should have
two or more samples.
where r and c are the two different categories that you observe, i.e from the
example above, r might be the genre of the movies and c might be the
snacks.
After computing the formula above, we will get the p-Value at the end
which we can use to decide whether we should reject the null hypothesis or
not.
Example Question:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 91/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
In one of their data science interviews, Amazon asked about a concept that
put our knowledge about different statistical measures into action. Here
was the question.
“In an A/B test, how can you check if assignment to the various buckets was
truly random?”
Since we have an A/B test here, then let’s say we have two variables called A
and B. If the assignment is truly random, then there should be no
statistically significant difference between two variables.
Now we know all of the things about inferential statistics! Let’s sum it up
and gather all of the necessary steps that we need to properly conduct
hypothesis testing:
First, set up the hypotheses: the null hypothesis and the alternative
hypothesis
Example Question:
“We have a product that is getting used differently by two different groups.
What is your hypothesis about why and how would you go about testing it?”
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 93/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
When we have a product that is getting used by two different groups, then
we need to first gather the data, and then we can analyze the result using
the two-sample t-test.
- null hypothesis: the average used rate between 2 groups are the same
- alternative hypothesis: the average used rate between the 2 groups are
different.
3. From the data, we can get the average and the standard deviation of each
group.
5. If the resulting t-test is below our significance level (< 0.05), then we can
reject our null hypothesis in favor of our alternative hypothesis, i.e the
average used rate between the 2 groups is different.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 94/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
6. If the resulting t-test is above our significance level (> 0.05), then we can
stick with our null hypothesis, i.e the average used rate between the 2
groups is more or less the same.
Statistical Power
As you already know, when you have a p-Value after conducting a statistical
test, you will have the power to decide whether or not to reject the null
hypothesis by comparing it with your significance level.
This means that you’re prone to making two types of error during
hypothesis testing, which in statistics are commonly referred to as Type I
error and Type II error.
Type I error means that you’re falsely rejecting the null hypothesis
Type II error means that you’re failing to reject the null hypothesis
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 95/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Statistical power is the probability that you’re correctly rejecting the null
hypothesis. This also means the probability of making less Type II error. The
higher the statistical power, the lower the probability of you making the
Type II error.
Power Analysis
Now you know there are two types of error that you might encounter when
conducting hypothesis testing. As mentioned before, one of the common
sources of the error is the data quality. This means that you probably don’t
have enough sample data to produce a p-Value that convincingly concludes
whether you should or should not reject the null hypothesis.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 96/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
The question that often arises in power analysis is: “What are the minimum
samples required to make sure that the p-Value that we get is convincing
enough for us to reject the null hypothesis?”
There are 4 parameters that normally take into account in power analysis
calculations: the effect size, the sample size, the significance level, and
the statistical power.
You already know the sample size, the significance level, and the statistical
power from the sections above. The effect size, however, is normally
calculated using statistical measures, for example Pearson’s correlation if
you want to measure the relationship between variables, or Cohen’s d if you
want to determine whether the difference between variables is significant.
In a power analysis, you need to define the value of effect size, significance
level, and statistical power in advance to find out the required sample size.
The default value for significance level is 0.05, the default value for Cohen’s
d to discover large effect size is 0.80, and the default value of statistical
power is also 0.8. However, you can fine tune those values depending on
your research and this requires a knowledge in the subject matters.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 97/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Bayes’ Theorem
In the last section, we were talking about inferential statistics that are
commonly used in frequentist perspective. In this section, we are going to
talk about a different perspective of inferential statistics, which utilize
Bayes’ theorem.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 98/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Beside that, the Bayes’ rule above also shows the fundamental concept of
this rule: prior, likelihood, marginal, and posterior, as you can see below:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 99/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
To elaborate more, here are the questions that posterior, likelihood, prior,
and marginal actually try to answer:
Example Question:
Facebook asked about the concept of Bayes’ theorem in one of their data
science interviews. Here was the question:
“You’re about to get on a plane to Seattle. You want to know if you should bring
an umbrella. You call 3 random friends of yours who live there and ask each
independently if it’s raining. Each of your friends has a 2/3 chance of telling
you the truth and a 1/3 chance of messing with you by lying. All 3 friends tell
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 100/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
you that “Yes” it is raining. What is the probability that it’s actually raining in
Seattle?”
- A: raining in Seattle
Now, since we don’t have any information about the probability of rain in
Seattle, let’s assume it to be 0.5, hence:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 101/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
In the question, it is stated that all of the three friends said “Yes, it will be
raining in Seattle”. We can express this as:
We can express the probability of our friend told us ‘Yes, it will be raining in
Seattle’ given that now is raining in Seattle as:
and the probability of our friend told us ‘No, it won’t be raining in Seattle’
given that now is not raining in Seattle as:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 102/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Now that we got the information we need, we could find out the probability
of raining in Seattle given that our three friends say ‘Yes’ with Bayes’
theorem as follows:
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 103/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
We can agree that learning statistics, either it is for the exam or the
interviews, is not easy. As you can see from the sections above, there are a
lot of topics that we need to cover in order to at least have a general
understanding of statistics and probability.
The tips below might be helpful for you to ace your probability and statistics
interview questions.
It is better to learn the concept because then you will be able to approach
each question correctly, i.e whether we consider the problem can be solved
with binomial distribution, geometric distribution, or negative binomial
distribution.
As an example, when you get a question that asks what is the probability of
getting 5 tails in 20 coin tosses, you should know that this question can be
answered with binomial distribution. It’s fine if you forget the equation of
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 104/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Whenever you put your thoughts on a piece of paper, then it will be easier
for you to solve the problems in a step-by-step manner and you will think
about the problem and how to solve it in a more concise way.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 105/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Set aside about one hour each day to try to solve probability and statistics
interview questions within a time period of your choice and don’t forget to
take a scheduled time off as well. The most important thing is the
consistency of learning.
After some time, it is guaranteed that you will get used to statistics
questions and you will be able to see that there are recurring patterns in
probability and statistics interview questions. You will be able to
understand which concept you should apply in each question, i.e whether
you should use ANOVA or Chi-Square, whether you should use geometric or
hypergeometric distribution, etc.
Here is the trick: you can paraphrase the question with your own words to
the interviewee and then ask them if your paraphrase corresponds to the
question being asked. This method serves you two purposes: to make sure
that you understand the question correctly and also to buy you a little bit of
time to think about the solution.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 106/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
Every Thursday, the Variable delivers the very best of Towards Data Science: from
hands-on tutorials and cutting-edge research to original features you don't want to
miss. Take a look.
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 107/108
12/1/21, 11:44 AM Probability and Statistics Interview Questions and Answers | by Nathan Rosidi | Nov, 2021 | Towards Data Science
https://towardsdatascience.com/probability-and-statistics-interview-questions-and-answers-e7cfa35aeb96 108/108