# Top 10 Probability Questions Asked in Interviews

Probability is defined as the likeliness of something to occur or happen. In this article, we will discuss top 10 probability questions that are asked in the interviews with their explanation in the most simplified way.

Probability questions are part of every interview process. You will get these questions in the aptitude round. If you are applying for the data science or machine learning portfolio, you will get the probability question in your technical rounds too. In this article, we will discuss the top 10 probability questions asked in interviews.

**Must Read:** 11 Best Statistics Book for Data Science

So, without any further delay, let’s see important probability questions.

**Ques – 1:** **Number of integers between 999 and 4000 that can be formed by the number using 0, 1, 2, 3, and 4 if the repetition of the digit is allowed.**

**Answer -1: **

Here we are trying to find the number of integers from 1000 to 4000 (both are included), then:

- 1st digit can be: 1, 2, 3
- 2nd digit can be: 0, 1, 2, 3, 4
- 3rd digit can be: 0, 1, 2, 3, 4
- 4th digit can be: 0, 1, 2, 3, 4

Hence the total number of integers that can be formed using 0, 1, 2, 3, and 4 are:

= 3 x 5 x 5 x 5 = 375

But wait, you missed the number 5000 in the above calculation

So, the Total Number of Integers = 375 + 1 = 376.

**Related:** Basics of Statistics for Data Science

**Ques – 2: How many ways can letter STATISTICS be rearranged so that no two T’s are adjacent to each other?**

**Answer- 2:**

Total number of alphabets in STATISTICS = 10

Total number of T’s in STATISTICS = 3

Now, if we remove all the T – terms from STATISTICS, then it will be written as **SAISICS**

SAISICS can be arranged in 7! Ways.

Now, to ensure that no two T’s are adjacent to each other, create one slot before and after every element in the SAISICS.

_S_A_I_S_I_C_S_

Out of these 8 blocks, some 3 can be T, and that blocks can be selected in ** ^{8}C_{3}** ways.

So, the total number of ways STATISTICS can be rearranged so that no two T’s are adjacent to each other will be

**7! x ^{8}C_{3} ** =

**282240.**

**Related:** Introduction to Probability

**Ques – 3:** **If A and B are two events, such that P(A) = 1/4, P(A|B) = 1/2, P(B|A) = 2/3. Find the value of P(B).**

**Answer – 3:**

Here, we will use the formula of Conditional Probability

**Ques 4: What will be the probability of getting a score of exactly twice when two fair dice are thrown independently three times?**

**Answer – 4:**

When two dice are thrown, the total possible number of outcomes are 36.

Outcomes that give the sum 9 are:

(3, 6), (4, 5), (5, 4), and (6,3).

Therefore,

the probability of getting a sum of 9 = 4/36 = 1/9.

Now, we will use Binomial Distribution to find the probability of getting a sum 9 twice when the dice is thrown thrice

**P (2, 3, 1/9) = ^{3}C_{2} x (1/9)^{2} x (1-1/9)^{(3-2)} = 3 x (1/81) x (8/9) = 24/729 = 8/243.**

*Related Read – Probability and Non Probability Sampling*

**Ques – 5:** **In how many ways is it possible to choose a white square and black square on a chessboard, so that square must not lie in the same row and column?**

**Answer – 5:**

On a chessboard, there are 32 white squares and 32 black squares.

So, black square blocks can be selected in 32 ways.

We can’t choose a white square in the same row or columns per the given condition.

If we choose 1 black square, then the white square in its row or column will be eliminated.

Therefore 8 white squares will be eliminated.

So, the number of possible white squares that can be chosen = 32 – 8 = 24.

Therefore, the total number of ways to select these squares is = 32 x 24 = 768.

**Ques – 6: Three ants are sitting at the corner of an Equilateral Triangle. Each ant randomly picks a direction and starts moving along the edge of the triangle. What is the probability that none of the ants will collide? What if it is n ants on all n corners of an equilateral polygon?**

**Answer -6: **

Let it think intuitively if all three ants move in the same direction, they will not collide.

So, all three ants can go either in the left or in the right direction.

Since all three are moving independently, so the probability of not colliding will be:

= (0.5)^{3} + (0.5)^{3} = 0.125 + 0.125 = 0.250

Now, let’s generalize the above result for n ants on all n corners of an equilateral polygon:

Probability non-ant collide = (0.5)^{n} + (0.5)^{n}.

**Ques – 7:** **A and B are tossing a coin. A will win if it gets the sequence HH. B will win if it gets the sequence TH. Both will continue to toss the coin until either of the sequence (HT or TH) shows. What is the probability of winning B? **

**Answer – 7:**

Let on the first toss of the coin, you get H, then there is no chance for B to win.

Since,**Case – 1: If the next toss shows H**

Then A wins.

**Case – 2: If the next toss is T**

Then, both A and B are in the same position and will toss the coin again.

Therefore, B will win if it gets T followed by H, which will happen with a probability of 0.5 * 0.5 = 0.25.

**Ques – 8:** **What is Probability Distribution?**

**Answer – 8:**

A probability distribution of a random variable is a list of all possible outcomes with the corresponding probability values.

**Note:** The value of the probability always lies between 0 to 1.

**Related:** Probability Distributions used in Data Science

**Ques – 9: What are the different types of Probability Distributions?**

**Answer – 9:**

There are different types of Probability Distribution, but in Data Science we mainly use 5 different types of Probability Distributions:

1. **Uniform Distribution**:

Probability distribution in which all the outcome have equal probability is known as Uniform Distribution.

Example: Perfect Random Generator

2. **Bernoulli Distribution**

A discrete probability distribution for a random experiment that has only two possible outcomes (Bernoulli trials) is known Bernoulli Distribution.

Example: India will win cricket world cup or not

3. **Binomial Distribution**

A discrete probability distribution that gives only two possible outcomes in n independent trails is known as Binomial Distribution.

Example: Yes/No survey

A discrete probability distribution that measures the probability of a random variable over a specific period of time is known as Poisson Distribution.

Example: Probability of Asteroid collision over a selected year of period.

A continuous probability distribution, which is symmetric about its mean value (i.e., data near the mean are more frequency in occurrence) is known as Normal Distribution.

Example: Number of books read by students in different months in a year.

**Ques – 10:** **Derive the mean and variance of the uniform distribution U (a, b).**

Let X be any random variable in the uniform distribution, so the probability density function will be:

Must Read: Mean Formula

Now, calculating the variance:

Hence the Mean and Variance of Uniform Distribution is:

**Must Read:** Variance Formula

**Practice Problems**

Here, is a list of 10 question for your practice.

**Bayesian Inference**: Given a dataset with a binary outcome and several predictor variables, how would you use Bayesian inference to estimate the parameters of a logistic regression model? What are the advantages of this approach over maximum likelihood estimation?**Monte Carlo Methods**: Explain how Monte Carlo methods are used in machine learning. Can you provide an example of a problem where a Monte Carlo simulation would be a more appropriate solution than traditional optimization methods?**Markov Chains**: How would you use Markov Chains in the context of a recommendation system? What assumptions are made when using Markov Chains, and how do they affect the model’s performance?**Stochastic Processes**: Can you explain the difference between Markov, Martingale, and Poisson processes? In what scenarios would each be most applicable in machine learning?**Probability Distributions**: How do you decide which distribution best fits a given dataset? Can you discuss the process of fitting a distribution to data and validating the fit?**Random Forests and Probability**: How does a random forest model estimate the probability of an event? How does it handle the uncertainty in the predictions?**Hidden Markov Models**: How would you use a Hidden Markov Model in the context of natural language processing or speech recognition? What are the challenges in training such models?**Expectation-Maximization**: Can you explain the Expectation-Maximization algorithm and how it’s used in Gaussian Mixture Models? What are the potential pitfalls of using this algorithm?**Probabilistic Graphical Models**: How would you use probabilistic graphical models in the context of anomaly detection in network traffic? What are the advantages and disadvantages of this approach?**Reinforcement Learning and Probability**: How does the concept of probability come into play in reinforcement learning, specifically in the context of the exploration vs exploitation trade-off?

**Related Reads**

## FAQs

**What is the probability of rolling a 6 on a fair die?**

The probability of rolling a 6 on a fair die is 1/6, because there is only one 6 on a die, and there are six possible outcomes.

**How do you calculate the probability of two independent events?**

The probability of two independent events is calculated by multiplying the probability of the first event by the probability of the second event.

**What is a conditional probability, and how is it calculated?**

Conditional probability is the probability of an event given that another event has occurred. It is calculated as the probability of both events happening divided by the probability of the event that has already occurred.

**How do you calculate the probability of mutually exclusive events?**

The probability of mutually exclusive events is calculated by adding the probabilities of each event. This is because mutually exclusive events cannot happen at the same time.

**What is the difference between theoretical and experimental probability?**

Theoretical probability is calculated based on the possible outcomes theoretically, while experimental probability is based on the number of times the event occurs over the total number of trials.

**How is probability used in real life?**

Probability is used in real life in many ways, such as predicting the weather, insurance calculations, and in games of chance like poker or lottery.

**What is the law of large numbers?**

The law of large numbers states that as the number of trials or observations increases, the actual ratio of outcomes will converge on the theoretical or expected ratio of outcomes.

**What is the probability of getting a head in a coin toss?**

The probability of getting a head in a coin toss is 1/2 because there are two possible outcomes - heads and tails - and one desired outcome - heads.

**What is Bayes' theorem, and how is it used in probability?**

Bayes' theorem is a fundamental concept in probability theory and statistics that describes how to update the probabilities of hypotheses when given evidence. It is used to revise existing predictions or theories given new or additional evidence.

**About the Author**

Vikram has a Postgraduate degree in Applied Mathematics, with a keen interest in Data Science and Machine Learning. He has experience of 2+ years in content creation in Mathematics, Statistics, Data Science, and Mac... Read Full Bio