Professional Documents
Culture Documents
Hi hey there, thanks for the continuous support for my previous articles. Today we
will continue from our previous article “Data Science Interview Q’s — II” PART-II, the
commonly asked essential questions by the interviewers to understand the root level
knowledge of DS rather than going for fancy advanced questions.
1. Let A and B be events on the same sample space, with P (A) = 0.6
and P (B) = 0.7. Can these two events be disjoint?
A) Yes B) No
Solution: (B) These two events cannot be disjoint because P(A)+P(B) >1.
And Since probability cannot be greater than 1, these two mentioned events cannot
be disjoint.
C) 0.333 D) 0.75
Solution: The outcomes for two kids can be {BB, BG, GB, GG} Since it is mentioned
that one of them is a girl, we can remove the BB option from the sample space.
Therefore the sample space has 3 options while only one fits the second condition.
Therefore the probability the second child will be a girl too is 1/3.
A) 1/36 B) 1/18
C) 5/36 D) 1/6
E) 1/3
Solution: The two events mentioned are independent. The first roll of the die is
independent of the second roll. Therefore the probabilities can be directly multiplied.
A) -0.00001 B) 0.5
C) 1.001 A) Only A
B) Only B C) Only C
D) A and B E) B and C
F) A and C
B)48C4 x 52C8
C)48C8 x 52C8
Solution: (A) The total number of possible combination would be 52C4 (For selecting
4 cards by Anita) * 52C8 (For selecting 8 cards by Babita). Since, the 4 cards that
Anita chooses is among the 8 cards which Babita has chosen, thus the number of
combinations possible is 52C4 (For selecting the 4 cards selected by Anita) * 48C4
(For selecting any other 4 cards by Babita, since the 4 cards selected by Anita are
common)
7. If you dealt 13 cards, what is the probability that the 13th card is a King?
A) 1/52 B) 1/13
C) 1/26 D) 1/12
Solution: (B) Since we are not told anything about the first 12 cards that are dealt,
the probability that the 13th card dealt is a King, is the same as the probability that
the first card dealt, or in fact any particular card dealt is a King, and this equals: 4/52
A) 0.01543 B) 0.01993
C) 0.23148 D) 0.03333
Solution: (A) For all the outcomes to be unique, we have 6 choices for the first turn,
5 for the second turn, 4 for the third turn and so on. Therefore the probability if
getting all unique outcomes will be equal to 0.01543
C) 18/58 D) 1/2
Solution: (B) Assign a different number to each student from 1 to 60. Numbers 1 to
20 go in group 1, 21 to 40 go to group 2, 41 to 60 go to group 3. All possible
partitions are obtained with equal probability by a random assignment if these
numbers, it doesn’t matter with which students we start, so we are free to start by
assigning a random number to Jack and then we assign a random number to Jill.
After Jack has been assigned a random number there are 59 random numbers
available for Jill and 19 of these will put her in the same group as Jack. Therefore the
probability is 19/59
10. We have two coins, A and B. For each toss of coin A, the
probability of getting head is 1/2 and for each toss of coin B, the
probability of getting Heads is 1/3. All tosses of the same coin are
independent. We select a coin at random and toss it till we get a
head. The probability of selecting coin A is ¼ and coin B is 3/4.
What is the expected number of tosses to get the first heads?
A) 2.75 B) 3.35
C) 4.13 D) 5.33
Solution: (A) If coin A is selected then the number of times the coin would be tossed
for a guaranteed Heads is 2, similarly, for coin B it is 3. Thus the number of times
would be Tosses = 2 * (1/4)[probability of selecting coin A] + 3*(3/4)[probability of
selecting coin B] = 2.75
A) $131 B) $140
C) $112 D) $125
The amount of money the company loses if it loses = 240,000–210 = 239790 While
the money it gains is $210 Expected money the company will have to give =
239790*0.000408 = 97.8 Expect money company gets = 210. Therefore the value =
210–98 = $112
12. When an event A independent of itself?
A) Always
Solution: (D) The event can only be independent of itself when either there is no
chance of it happening or when it is certain to happen. Event A and B is independent
when P(A ꓵ B) = P(A)*P(B). Now if B=A, P(A ꓵ A) = P(A)when P(A) = 0 or 1.
Let’s say you choose Door 1 and the host opens Door 3 which has a
goat behind it. To assure the probability of your win, which of the
following options would you choose.
A) 23.7% B) 37.2%
C) 22.5% D) 27.3%
Solution: (A) The probability of offspring being Red is 0.25, thus the probability of the
offspring not being red is 0.75. Since all the pairs are independent of each other, the
probability that all the offsprings are not red would be (0.75)5 = 0.237. You can think
of this as a binomial with all failures.
A) 1.1165 B) 2.3684
C) 2.6316 D) 4.7368
Solution: (B) The probability that it would be Red in any spin is 18/38. Now, you are
playing the game 5 times and all the games are independent of each other. Thus, the
number of games that you can win would be 5*(18/38) = 2.3684
A) 20% B) 22%
Solution: So here we would need to calculate the Z scores for value being 18 and 24.
We can easily doing that by putting sample mean as 18 and population mean as 18
with σ = 6 and calculating Z. Similarly we can calculate Z for sample mean as 24.
Z= (X-μ)/σ
For 24 as X
Z = (24–18)/6 = 1, looking at the Z table we find 84% of people have scores below 24.
Therefore around 34% of people have scores between 18 and 24.
17. A jar contains 4 marbles. 3 Red & 1 white. Two marbles are drawn
with replacement after each draw. What is the probability that the
same color marble is drawn twice?
A) 1/2 B) 1/3
C) 5/8 D) 1/8
Solution: If the marbles are of the same color then it will be 3/4 * 3/4 + 1/4 * 1/4 =
5/8.
Probability of ‘6’ turning up in a roll of dice is P(6) = (1/6) & P(6’) = (5/6). Thus,
probability of
18. Suppose you were interviewed for a technical role. 50% of the
people who sat for the first interview received the call for the
second interview. 95% of the people who got a call for a second
interview felt good about their first interview. 75% of people who
did not receive a second call, also felt good about their first
interview. If you felt good after your first interview, what is the
probability that you will receive a second interview call?
A) 66% B) 56%
C) 75% D) 85%
Solution: (B) Let’s assume there are 100 people that gave the first round of
interviews. The 50 people got the interview call for the second round. Out of this
95 % felt good about their interview, which is 47.5. 50 people did not get a call for
the interview; out of which 75% felt good about, which is 37.5. Thus, the total
number of people that felt good after giving their interview is (37.5 + 47.5) 85. Thus,
out of 85 people who felt good, only 47.5 got the call for next round. Hence, the
probability of success is (47.5/85) = 0.558.
Another more accepted way to solve this problem is the Baye’s theorem. I leave it to
you to check for yourself.
You can assume that the person throwing has no skill in throwing the
coin and is throwing it randomly.
A) 1/2 B) 1/4
C) Π/3 D) 1/3
Solution: (B) Think about where all the center of the coin can be when it lands on 2
inches grid and it does not touch the lines of the grid. If the yellow region is a 1 inch
square and the outside square is of 2 inches. If the center falls in the yellow region,
the coin will not touch the grid line. Since the total area is 4 and the area of the
yellow region is 1, the probability is ¼ .
For example — Students with birthday 3rd Jan 1993 and 3rd Jan 1994
would be a favorable event.
A) 49% B) 52%
C) 70% D) 35%
Solution: The total number of combinations possible for no two persons to have the
same birthday in a class of 30 is 30 * (30–1)/2 = 435.
Now, there are 365 days in a year (assuming it’s not a leap year). Thus, the
probability of people having a different birthday would be 364/365. Now there are
870 combinations possible. Thus, the probability that no two people have the same
birthday is (364/365)⁴³⁵ = 0.303. Thus, the probability that two people would have
their birthdays on the same date would be 1–0.303 = 0.696
A) $-2.81 B) $2.81
C) $-1.82 D) $1.82
P(losing ) = 1–1/26–1/2600 Therefore we can fit in the values to get the expected
value as $2.81
22 Assume you sell sandwiches. 70% people choose egg, and the rest
choose chicken. What is the probability of selling 2 egg sandwiches
to the next 3 customers?
A) 0.343 B) 0.063
C) 0.44 D) 0.027
Solution: The probability of selling Egg sandwich is 0.7 & that of a chicken sandwich
is 0.3. Now, the probability that next 3 customers would order 2 egg sandwich is 3 *
0.7 * 0.7 *0.3 = 0.44. They can order them in any sequence, the probabilities would
still be the same.
HIV is still a very scary disease to even get tested for. The US military tests its
recruits for HIV when they are recruited. They are tested on three rounds of
Elisa( an HIV test) before they are termed to be positive.
The prior probability of anyone having HIV is 0.00148. The true positive rate for
Elisa is 93% and the true negative rate is 99%.
23. What is the probability that a recruit has HIV, given he tested
positive on first Elisa test? The prior probability of anyone having
HIV is 0.00148. The true positive rate for Elisa is 93% and the true
negative rate is 99%.
A) 12% B) 80%
C) 42% D) 14%
Solution: (A)
A) 20% B) 42%
C) 93% D) 88%
Solution: ( C)
A) You should guess heads again since the tails has already occurred thrice and its
more likely for heads to occur now
B) You should say tails because guessing heads is not making you win
C) You have the same probability of winning in guessing either, hence whatever you
guess there is just a 50–50 chance of winning or losing
D) None of these
26. The inference using the frequentist approach will always yield
the same result as the Bayesian approach.
A) TRUE B) FALSE
Solution: (B) The frequentist Approach is highly dependent on how we define the
hypothesis while Bayesian approach helps us update our prior beliefs. Therefore the
frequentist approach might result in an opposite inference if we declare the
hypothesis differently. Hence the two approaches might not yield the same results.
A) 0.17798 B) 0.13184
C) 0.03295 D) 0.35596
Solution: ( C) Think of this as a binomial since there are only 2 outcomes, either the
patient dies or he survives.
28. The students of a particular class were given two tests for
evaluation. Twenty-five percent of the class cleared both the tests
and forty-five percent of the students were able to clear the
first test.
A) 25% B) 42%
C) 55% D) 45%
P(A ꓵ B) is passing in both the events. P(passing in second given he passed in the
first one) = P(A ꓵ B)/P(A) = 0.25/0.45 which is around 55%
A) 0.38 B) 0.48
C) 0.58 D) 0.68
E) 0.78
Solution: (A) Think of this as a binomial distribution where getting a success is a boy
and failure is a girl. Therefore we need to calculate the probability of getting 2 out of
three successes. P(X) = nCx pxqn-x = 3C2 (0.51)2(0.49)1 = 0.382
C) A 10-year-old who is 65 inches tall would be considered more unusual than a 10-
year-old who is 45 inches tall
D) None of these
Solution: (D)
C) A 10-year-old who is 65 inches tall would be considered more unusual than a 10-
year-old who is 45 inches tall
D) None of these
32. About 30% of human twins are identical, and the rest are
fraternal. Identical twins are necessarily the same sex, half are
males and the other half are females. One-quarter of fraternal twins
are both males, one-quarter both female, and one-half are mixed: one
male, one female. You have just become a parent of twins and are
told they are both girls. Given this information, what is the
probability that they are identical?
A) 50% B) 72%
C) 46% D) 33%
P(I) denoted Probability of being identical and P(~I) denotes Probability of not being
identical
P(Identical) = 0.3
P(FF|I)= 0.5
P(MM|I)= 0.5
P(MM|~I)= 0.25
P(FF|~I)= 0.25
P(FM|~I)= 0.25
P(I|FF) = 0.46
A) 12% B) 7%
C) 25% D) 31.5%
Solution: (B) We need to find the probability of having typhoid given he tested
positive. =P(testing +ve and having typhoid) / P(testing positive)
= = 0.074
34. Jack is having two coins in his hand. Out of the two coins, one
is a real coin and the second one is a faulty one with Tails on both
sides. He blindfolds himself to choose a random coin and tosses it
in the air. The coin falls down with Tails facing upwards. What is
the probability that this tail is shown by the faulty coin?
A) 1/3 B) 2/3
C) 1/2 D) 1/4
Solution: (B) We need to find the probability of the coin being faulty given that it
showed tails.
P(Faulty) = 0.5
P(faulty and tails) =0.5*1 = 0.5 Therefore the probability of coin being faulty given
that it showed tails would be 2/3
35. A fly has a life of between 4–6 days. What is the probability
that the fly will die at exactly 5 days?
A) 1/2 B) 1/4
C) 1/3 D) 0
Solution: (D) Here since the probabilities are continuous, the probabilities form a
mass function. The probability of a certain event is calculated by finding the area
under the curve for the given conditions. Here since we’re trying to calculate the
probability of the fly dying at exactly 5 days — the area under the curve would be 0.
Also to come to think of it, the probability if dying at exactly 5 days is impossible for
us to even figure out since we cannot measure with infinite precision if it was exactly
5 days.
I hope you will find the questionnaires useful for your career and also the credit goes
to aditya vidhya analytics from i was able to gather this set of interview
questionnaires for you.
Next, we will walk through the clustering questionnaire in the next article Part IV,
which will surprise you!
Thanks again, for your time, if you enjoyed this short article there are tons of topics in
advanced analytics, data science, and machine learning available in my medium repo.
https://medium.com/@bobrupakroy