Skip to content
RED SAGSkills

Probability interview questions and answers

Probability questions are short puzzles that test clear thinking: counting outcomes, conditional probability and expected value.

Below are 30 Probability questions with the correct answer and a short explanation, grouped from fresher to experienced level. Try each one before you open the answer.

What Probability interviews usually check

  • ✓Basic rules, independence and counting
  • ✓Conditional probability and Bayes’ theorem
  • ✓Expected value and variance
  • ✓Common distributions
  • ✓Reasoning about real-world odds

Probability interview questions for freshers easy

1. Random whole number in a range

Which expression returns a random integer from min to max, including both ends?

  1. A.Math.round(Math.random() * (max - min)) + min
  2. B.Math.floor(Math.random() * (max - min)) + min
  3. C.Math.ceil(Math.random() * max) + min
  4. D.Math.floor(Math.random() * (max - min + 1)) + min
Show answer

Answer: D. Math.floor(Math.random() * (max - min + 1)) + min

Math.random() is in [0, 1), so multiplying by (max - min + 1) and flooring gives every integer 0 to max - min with equal chance. Using Math.round makes the two end values half as likely as the others. Leaving out the + 1 means max can never be returned.

2. Average roll of a die

What is the expected value of one roll of a fair six-sided die?

  1. A.3
  2. B.3.5
  3. C.6
  4. D.21
Show answer

Answer: B. 3.5

Each face has probability 1/6, so the expected value is (1 + 2 + 3 + 4 + 5 + 6) / 6 = 21 / 6 = 3.5. An expected value does not need to be a possible result. Over many rolls, the average gets close to 3.5.

3. Softmax of equal scores

You apply softmax to four logits that are all equal to 2.0: [2, 2, 2, 2]. What probability does each position get?

  1. A.0.25
  2. B.0.5
  3. C.2.0
  4. D.0.125
Show answer

Answer: A. 0.25

Softmax depends only on the differences between logits, so equal logits give equal probabilities. With four positions that sum to 1, each gets 1/4 = 0.25, no matter what the shared value is.

4. What softmax outputs look like

An LLM turns its final logits into a distribution over the vocabulary with softmax. Which statement about the softmax output is always true?

  1. A.The largest value is always exactly 1
  2. B.Values can be negative when logits are negative
  3. C.All values are positive and they sum to 1
  4. D.Values are integers that rank the tokens
Show answer

Answer: C. All values are positive and they sum to 1

Softmax exponentiates each logit (making it positive) and divides by the sum, so every output is between 0 and 1 and they add to 1. That is what lets us read the outputs as token probabilities and sample from them.

5. Positive test for a rare disease

A disease affects 1% of people. A test catches 90% of real cases and gives a false positive for 5% of healthy people. Someone tests positive. Roughly how likely is it that they have the disease?

  1. A.About 90%
  2. B.About 15%
  3. C.About 50%
  4. D.About 5%
Show answer

Answer: B. About 15%

Out of 10,000 people, 100 are sick and 90 of them test positive, while 9,900 are healthy and 495 of them test positive. Only 90 of the 585 positives are real, which is about 15%. When a condition is rare, false positives from the large healthy group swamp the true positives.

6. Expected profit of a dice game

A game costs $2 to play. You roll a fair six-sided die and win $10 if it shows a 6, otherwise nothing. What is your expected profit per game?

  1. A.$0
  2. B.+$0.33
  3. C.-$1.67
  4. D.-$0.33
Show answer

Answer: D. -$0.33

Expected winnings are 10 x 1/6 = $1.67. Subtract the $2 cost and the expected profit is about -$0.33 per game. Expected value weighs each outcome by its probability and is the basic tool for judging bets, prices and business decisions.

7. Probability of A or B

Events A and B are independent, with P(A) = 0.3 and P(B) = 0.5. What is P(A or B)?

  1. A.0.80
  2. B.0.15
  3. C.0.65
  4. D.0.50
Show answer

Answer: C. 0.65

P(A or B) = P(A) + P(B) - P(A and B). Because the events are independent, P(A and B) = 0.3 x 0.5 = 0.15, so the answer is 0.3 + 0.5 - 0.15 = 0.65. Simply adding to get 0.80 double-counts the cases where both happen.

8. Expected sign-ups from 100 visits

Each of 100 visitors signs up independently with probability 0.2. What are the mean and SD of the number of sign-ups?

  1. A.Mean 20, SD 4
  2. B.Mean 20, SD 16
  3. C.Mean 0.2, SD 0.4
  4. D.Mean 20, SD 20
Show answer

Answer: A. Mean 20, SD 4

A binomial count has mean np = 100 × 0.2 = 20 and variance np(1 − p) = 100 × 0.2 × 0.8 = 16. The SD is the square root, 4. So seeing anywhere from about 12 to 28 sign-ups is normal variation.

9. Red after five blacks

A fair roulette-style wheel (ignore the green zero) has landed on black five times in a row. What is the probability the next spin is red?

  1. A.Higher than 1/2, since red is due
  2. B.Lower than 1/2, since black is hot
  3. C.Exactly 1/32
  4. D.1/2, since spins are independent
Show answer

Answer: D. 1/2, since spins are independent

Independent spins have no memory, so the next spin is still 1/2. The law of large numbers says long-run proportions settle near 1/2, but it does not 'correct' past streaks. Expecting red to be due is the gambler's fallacy.

10. Sum of seven with two dice

You roll two fair dice. What is the probability that they sum to 7?

  1. A.1/12
  2. B.7/36
  3. C.1/6
  4. D.1/11
Show answer

Answer: C. 1/6

There are 36 equally likely outcomes. Six give 7: (1,6), (2,5), (3,4), (4,3), (5,2), (6,1). So the probability is 6/36 = 1/6, which makes 7 the most likely sum. Treating the 11 possible sums as equally likely is a common mistake.

Probability intermediate interview questions medium

11. Two people with the same birthday

About how many randomly chosen people do you need for a better than 50% chance that two share a birthday (365 days, ignore leap years)?

  1. A.23
  2. B.183
  3. C.50
  4. D.366
Show answer

Answer: A. 23

The number of pairs grows fast: 23 people form 253 pairs. The chance that all 23 birthdays differ is about 49.3%, so a match is about 50.7% likely. The same maths explains why random IDs and hashes collide sooner than people expect.

12. From logprobs to probability

The API returns token logprobs of -0.5 and -1.0 for a two-token answer. What is the probability of the whole two-token sequence?

  1. A.About 0.37
  2. B.About 0.22
  3. C.About 0.61
  4. D.About 0.50
Show answer

Answer: B. About 0.22

Log probabilities add for a sequence: -0.5 + (-1.0) = -1.5. Converting back gives e^-1.5 ≈ 0.22. Summing logprobs avoids multiplying many small numbers, which is why APIs return them in log form.

13. Shared birthdays in a small team

Ignoring leap years and assuming birthdays are spread evenly, about how many people are needed for a 50% chance that at least two share a birthday?

  1. A.23
  2. B.183
  3. C.365
  4. D.57
Show answer

Answer: A. 23

With 23 people there are 253 possible pairs, and the chance that no pair matches drops to about 49%. So the chance of a shared birthday is just over 50%. With 57 people it is about 99%. The same maths explains hash collisions appearing sooner than expected.

14. At least one faulty unit in a box

Each phone in a box of 10 is faulty with probability 0.1, independently. What is the chance the box has at least one faulty phone?

  1. A.1.0
  2. B.About 0.65
  3. C.0.10
  4. D.About 0.35
Show answer

Answer: B. About 0.65

P(no faulty phones) = 0.9^10 ≈ 0.349. The complement gives P(at least one) ≈ 0.651. Simply multiplying 10 × 0.1 = 1 gives the expected number of faults, not a probability.

15. Calls until the first sale

Each cold call succeeds independently with probability 0.2. On average, how many calls are needed to get the first sale, counting the successful one?

  1. A.2
  2. B.5
  3. C.4
  4. D.20
Show answer

Answer: B. 5

The number of trials until the first success is geometric with mean 1/p = 1/0.2 = 5. That includes the successful call. The expected number of failures before it is (1 − p)/p = 4.

16. Two defective items without replacement

A batch of 10 items has 3 defective ones. You pick 2 at random without replacement. What is the probability both are defective?

  1. A.9/100
  2. B.1/15
  3. C.3/10
  4. D.1/9
Show answer

Answer: B. 1/15

The first pick is defective with probability 3/10. Given that, 2 defective remain among 9, so the second is 2/9. Multiply: 3/10 × 2/9 = 6/90 = 1/15. With replacement it would be (3/10)² = 9/100.

17. Switching doors in a game show

A prize is behind one of three doors. You pick door 1. The host, who knows where the prize is, opens door 3 to show it is empty and offers a switch to door 2. What is the chance of winning if you switch?

  1. A.1/2
  2. B.2/3
  3. C.1/3
  4. D.1
Show answer

Answer: B. 2/3

Your first pick is right 1/3 of the time, so the prize is behind one of the other two doors 2/3 of the time. The host's choice is not random: he always reveals an empty door from those two, so switching collects that 2/3. Staying wins only 1/3.

18. Are two events independent

P(user is from the UAE) = 0.5, P(user pays by card) = 0.4, and P(UAE and card) = 0.2. Are the two independent?

  1. A.No, because 0.2 is less than 0.4
  2. B.No, because the probabilities do not add to 1
  3. C.Yes, because 0.5 × 0.4 = 0.2
  4. D.It cannot be known without a test
Show answer

Answer: C. Yes, because 0.5 × 0.4 = 0.2

Events are independent when P(A and B) = P(A) × P(B). Here 0.5 × 0.4 = 0.2, which matches, so knowing a user is from the UAE does not change the chance they pay by card. With sample data you would test whether the gap from independence is larger than noise.

19. Two servers in the same rack

Two servers are each down 1% of the time. A planner says both are down together only 0.01% of the time. They share a power supply. What is wrong with the estimate?

  1. A.Nothing; probabilities always multiply
  2. B.It should be 2%, the sum
  3. C.It ignores that failures are likely correlated
  4. D.It should be 1%, since they are the same
Show answer

Answer: C. It ignores that failures are likely correlated

Multiplying probabilities assumes independence. A shared power supply means one event can take down both, so the joint failure rate can be far above 0.01%. Real reliability planning looks for such common causes.

20. Expected value of an uncertain benefit

A new pricing engine will add ₹40 lakh a year if a key retail partner signs (60% likely), or ₹10 lakh a year if not. What is the expected yearly benefit?

  1. A.₹25 lakh
  2. B.₹28 lakh
  3. C.₹40 lakh
  4. D.₹24 lakh
Show answer

Answer: B. ₹28 lakh

Expected value = 0.6 × 40 + 0.4 × 10 = 24 + 4 = ₹28 lakh. ₹24 lakh forgets the 40% outcome, and ₹25 lakh is a simple average that ignores the probabilities. Expected value is useful, but also show the downside, since one result will actually happen.

Probability interview questions for experienced candidates hard

21. Bias from random byte % 100

Code makes a 0–99 lucky draw number with `randomByte % 100`, where randomByte is uniform from 0 to 255. What is wrong?

  1. A.Nothing, because % keeps the spread uniform
  2. B.Only the value 0 is more likely than the rest
  3. C.Values 56–99 are more likely than 0–55
  4. D.Values 0–55 are 1.5 times as likely as 56–99
Show answer

Answer: D. Values 0–55 are 1.5 times as likely as 56–99

256 values do not split evenly into 100 buckets. 0–55 are hit by three bytes each (for example 5, 105, 205) and 56–99 by only two, so low numbers are 1.5 times as likely. Fix it with rejection sampling, for example drop bytes of 200 or more and try again, or use crypto.randomInt.

22. Weighted random server choice

Servers have weights [1, 3, 6], so prefix sums are [1, 4, 10]. A random r in [0, 10) is 4.5. Using 'first index whose prefix sum is greater than r', which server is picked?

  1. A.Index 2, with weight 6
  2. B.Index 1, with weight 3
  3. C.Index 0, with weight 1
  4. D.No server, because 4.5 is not a prefix sum
Show answer

Answer: A. Index 2, with weight 6

The prefix sums split [0, 10) into [0, 1), [1, 4) and [4, 10), whose widths match the weights. 4.5 falls in [4, 10), so index 2 is picked, and it will be picked 60% of the time. With many items, find the index by binary search in O(log n).

23. Making a Monte Carlo result 10× more precise

A Monte Carlo risk estimate uses 10,000 random samples. To cut its typical error by a factor of 10, about how many samples do you need?

  1. A.100,000
  2. B.20,000
  3. C.10,000,000,000
  4. D.1,000,000
Show answer

Answer: D. 1,000,000

The standard error of a Monte Carlo average falls like 1/√n. To divide the error by 10, √n must grow 10 times, so n must grow 100 times, from 10,000 to 1,000,000. This slow rate is why variance reduction tricks matter.

24. Why least squares is maximum likelihood

Under which assumption about the noise does minimising mean squared error give the maximum likelihood estimate of linear regression weights?

  1. A.Independent Laplace noise, constant scale
  2. B.Uniform noise on a fixed interval
  3. C.Independent Gaussian noise, constant variance
  4. D.Noise that grows in proportion to the target
Show answer

Answer: C. Independent Gaussian noise, constant variance

With independent Gaussian noise of fixed variance, the log-likelihood is a constant minus the sum of squared residuals divided by 2σ². Maximising it is the same as minimising squared error. Laplace noise would instead lead to minimising absolute error.

25. Spam probability from one word

40% of emails are spam. The word "lottery" appears in 50% of spam emails and 10% of normal emails. An email contains "lottery". Using Bayes rule, what is the probability it is spam (to two decimals)?

  1. A.0.77
  2. B.0.50
  3. C.0.83
  4. D.0.20
Show answer

Answer: A. 0.77

P(spam and word) = 0.4 × 0.5 = 0.20. P(normal and word) = 0.6 × 0.1 = 0.06. So P(spam | word) = 0.20 / (0.20 + 0.06) = 0.769, about 0.77. The 0.20 option forgets to divide by the total probability of seeing the word.

26. Precision when prevalence drops

At a fixed threshold a model has 80% recall and 95% specificity. Where 10% of cases are positive, its precision is 64%. You deploy it in a market where only 1% of cases are positive. What precision should you expect?

  1. A.About 64%
  2. B.About 14%
  3. C.About 80%
  4. D.About 95%
Show answer

Answer: B. About 14%

Per 1,000 cases at 1% prevalence: 10 positives give 8 true positives, and 990 negatives give 49.5 false positives. Precision is 8 / 57.5, about 14%. Recall and specificity do not depend on prevalence, but precision does, so the same model can look much worse in a new population.

27. Which plant made the faulty part

Plant A makes 60% of parts with a 2% defect rate. Plant B makes 40% with a 5% defect rate. A part is defective. What is the probability it came from plant A?

  1. A.0.375
  2. B.0.60
  3. C.0.40
  4. D.0.012
Show answer

Answer: A. 0.375

P(defect and A) = 0.6 × 0.02 = 0.012, and P(defect and B) = 0.4 × 0.05 = 0.020. So P(A | defect) = 0.012 / 0.032 = 0.375. Even though A makes more parts, B's higher defect rate makes it the more likely source.

28. A density value of 4

A probability density function for a measurement equals 4 at x = 0.1. Is that an error?

  1. A.Yes, densities must be at most 1
  2. B.Yes, it means the probability at x = 0.1 is 4
  3. C.Only if the variable is discrete
  4. D.No; densities can exceed 1 if the total area is 1
Show answer

Answer: D. No; densities can exceed 1 if the total area is 1

For a continuous variable, probabilities are areas under the density, not its height. A uniform distribution on [0, 0.25] has density 4 everywhere and total area 4 × 0.25 = 1. The probability of any exact value is zero.

29. Reading a Bayesian credible interval

A Bayesian analysis gives a 95% credible interval of 1.2% to 3.4% for a conversion lift. What can you say that a frequentist confidence interval does not literally allow?

  1. A.The lift is exactly 2.3%
  2. B.A 95% probability the lift is in the range
  3. C.95% of users had a lift inside this range
  4. D.The p-value is 0.05
Show answer

Answer: B. A 95% probability the lift is in the range

A credible interval is a probability statement about the parameter, given the prior and the data. A frequentist 95% interval is about the method: 95% of such intervals would contain the true value. Results depend on the prior, which should be stated.

30. Maximum likelihood for a click rate

An email is sent to 10 people and 7 click. Under a binomial model, what is the maximum likelihood estimate of the click probability?

  1. A.0.5
  2. B.0.07
  3. C.0.7
  4. D.1.0
Show answer

Answer: C. 0.7

The likelihood p^7 (1 − p)^3 is highest at p = 7/10 = 0.7, the sample proportion. MLE picks the parameter that makes the observed data most likely. With only 10 people, the uncertainty is large, which a confidence interval would show.

Ready to test yourself?

Take a 15-question Probability MCQ test with a score at the end, or practise the full Probability question bank and earn points on the leaderboard.