Amazon Interview Question for Analysts


Country: United States
Interview Type: Phone Interview




Comment hidden because of low score. Click to expand.
9
of 9 vote

Prob. of actually defective = prob of defective / (prob of defective + prob of good misidentified as defective)
prob of good misidentified as defective = prob of good * 2 / 100
= 0.006 / (0.006 + 0.994 * 0.02) = 0.006 / (0.006 + 0.01988)
= 0.232

- mitruka.abhishek July 29, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 votes

Actually the question was probability of defective given the test result was defective. P(defective/identified defective) = P(identified defective/defective)*P(defective)/P(identified defective) = (1*0.6)/(1*0.6 + 0.02*0.4) = 0.987 (approx).

- Mani Kiran September 26, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Simpler method to calculate the same :

Out of 100 -----0.6 are actually defective
So out of 2.6 how many will be actually defective - 0.6/(100*2.6) = 0.00238 %
Out of 1 (probability) = 0.238

- Ananymous August 12, 2014 | Flag
Comment hidden because of low score. Click to expand.
2
of 2 vote

Here is how I understand the question:

0.6% or 6 out of 1000 are actually defect.
2% or 20 out of 1000 are declared defect, but they are not defect.

Meaning out of 1000, 26 would be declared defect.

Now the Question:
Given that a randomly chosen transistor is declared defective by the
tester, compute the probability that it is actually defective.

26 out of my 1000 would be declared defective, but only 6 are
actually defective.

The chances that the transistor chosen is defective is
6 out of 26 = 0.2308 or 23.08%

In other words that would not be a very efficient test. Roughly
three out of four transistors that are thrown out, are not
defective.

- gonzo July 29, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Correction:
In a lot of 1000 only 20 out of 994 are misidentified, not out of 1000 as I stated, so 23.2% is the correct answer.

- gonzo July 30, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Prob of actually defective = 1 - (Prob of actually correct) x (Prob of correct transistor correctly classified)
                                          = 1 - (99.4/100) *(98/100)
                                          = 0.02588

- Learner July 29, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 vote

This is a simple conditional probability problem of the form P(A | B) or the probability that A happens given B has already happened. In this case A is the event that the transistor is defective and B is the event of a positive test.

P(A) = probability that the transistor is defective = 0.6
P(B) = probability that the test is positive
= probability that a defective transistor tests positive + probability that a good transistor tests positive
= probability that a transistor is defective * probability test is positive + probability that a transistor is good * probability of a test is positive
= 0.6*1 + 0.4*0.02
= 0.608
P(A | B) = P(A intersect B) / P(B) = 0.6 / 0.608 = 0.986

- Anonymous July 29, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
3
of 3 votes

The explanation is correct but the probability is 0.6%, so 0.006, not 0.6

- Miguel Oliveira July 29, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

The probability can be found out as:
Consider there are 1000 transistors. Out of those 6 are defective that is 994 are good transistors. Now as 2 transistors are mis-identified as defective in 100 transistors. So number of transistors misidentified in 994 good transistors are - (2*994)/100=19.88. So in total defective transistors 6+19.88=25.88. So probability it is actually defective is 6/25.88=0.232

- vgeek July 30, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Actual defective= 0.6 %
Defective as per test = 2 + 0.6 %=2.6%

Hence, The probability that the transistor is actually defective= 0.6/2.6 = 0.23077

- HerCules August 04, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

This is an incorrectly designed problem. The interviewer tries to ask the capability to handle conditional probability properly. This seemingly witty question can be resolved only when two events A: "Transistor is defective" B: "Test shows defective" are independent; In English, "test" is ineffective and it actually has no reliability to test the transistor's defectiveness. Otherwise, the probability of the intersection of two events cannot be expressed in the form of product of each event probability.

If the interviewer changed the question as follows, then the other people's suggested answers are correct.

"A bag contains many red or blue colored transistors. Among them 0.6% are defective. In every 100 non-defective transistors, two are red. You randomly pick one transistor and it turns out to be red. What is the probability that it is defective?"

Do you see the difference?

- Knoll October 11, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Use Bayes theorem

- Anonymous November 13, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Why not 0.006*(0.98) / (0.006*0.98 + 0.994 * 0.02) ?

- Anonymous March 26, 2014 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More