unknown student Interview Question for Students


Country: India
Interview Type: Written Test




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

right answer is 9/10

- siva.sai.2020 May 05, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
2
of 6 vote

probability will be 8/9<=p<=1

- Learn Android: http://learnandroideasily.blogspot.in/ May 08, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Even though you're answer expressed as a range is correct, there exists an exact value. So one vote down from me so that readers get to know more precise answer on this.

- buckCherry November 21, 2012 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

I always believe that if a probability question can be solved with various approaches, it makes the understanding more clear.
In that vain I've listed below couple of solutions :

1)Intuitively such probability questions often yields answer similar to avg case. Thus we can assume that 9:1 ratio of black to white balls will be maintained when 100 balls are drawn leaving 900 - 90 = 810 black balls and 100-10=90 white balls. 
Thus probability of picking a black ball from a population of 900 balls with distribution (810 B + 90 W) is 810/900
    =9/10. 
    Now one thing that can haunt you is that we're calculating this probability in a modified sample space with 900 balls after executing a conditional event of picking 100 balls without returning. So will the probability of this the given event will be same in the context of original sample space of 1000 balls! We can intuitively argue that since the probability of the conditioning event is 1 (probability of removing 100 balls from 1000 balls is 1), most likely the probability of the event in both the sample space (i.e. both conditional and unconditional probabilities) will be same.


2)Mathematically we can calculate the final probability as below.
      Method 1:
            Let's define two events X and Y in the original sample space of 1000 balls where
            X=The event of picking 100 balls at random and discarding
            Y=The composite event of picking 100 balls and discarding followed by picking another ball and noting its color

            The desired question is P(Y=black) = (no. of outcomes for Y=black) / (no. of outcomes for Y=any color)
                              =  (900P1x999P100)/ 1000P101          [Note uPv implies permutation of v elements from u distinct elements]
                              = 9/10
      Method 2:
            The experiment can be equivalent to arranging 1000 elements such the left most 100 elements will be first 100 elements to be discarded and color of the 101st element from left will be observed.
            Thus desired probability = number arrangements with 101st left most element is black  / number of arrangement of 1000 elements
                        = 900P1 x (999!) / (1000!)
                        = 900/1000

- buckCherry November 21, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Ans. is 9/10.

- Navoneel August 26, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Sure it is 0.9
Matlab code
sum = 0;
for i = 0:1:100
G=nchoosek(900,100-i)*nchoosek(100,i)*(800+i)/(nchoosek(1000,100)*900);
sum= sum +G;
end

sigma i from 0 to 100 { pr{next is Black | i of White balls in the 100 taken balls} *pr{i of White balls in the 100 taken balls} }

- Sanhe June 01, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

This sounds like the Monty Hall problem to me. Note the use of the word random in how the balls are drawn. Probability of drawing a black ball is 9/10 and would remain constant if the previous balls were drawn randomly.

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

The exact answer is 901/1000

Proof:

Let 101th position be fixed for white ball, and remaining be open

999C99 will be the number of combinations possible (99 whites) with this constraint.
However, in total 1000C100 combinations are possible

This implies that our answer = 1- (999C99)/(1000C100) = 1-0.099 = 0.901

- Chirag Sahai November 25, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

P(1st ball is black) = 900/1000
P(2nd ball is black) = P(2nd black| 1st black)+P(2nd black|1st white) = 900*899/(1000*999)+100*900/(1000*999)=900/1000
Etc...
So we suspect P(kth ball is black) = 9/10.

To make the argument rigorous, we have to do a calculation for P(kth ball is black). We know the exact conditional probabilities we need (from the Hypergeometric distribution), and so the problem reduces to some playing around with sums. It's not a hard problem, but it is calculations-intensive.

There should also exist a nice and elegant solution by induction; but I can't quite see it...

Wikipedia's Hypergeometric section has the answer but only a high-level proof.

P.S.
buckCherry's second solution is excellent!

- mathytime September 24, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 3 vote

My ans is c:
Approach before u take 100balls.The p(b)=9/10.
when u take 100balls assuming at least one black ball is there in those 100balls.
Then when u take 101ball is become <9/10.

- udhaya10 May 05, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

First of all, its a wrong answer. The correct exact answer is 9/10. See my post below.

Secondly, language is not clear enough to understand what you're trying to say. Still here is how I would solve using your approach.
If all balls which are taken out are white in color.. then probability of 101st ball being black becomes 900/900=1
and if all the balls which are taken out are black in color.. then probability of 101st ball being black becomes
800/900
.89
so probability that 101st ball will be black should lie between 1 and .89
How ever here we can calculate exact value of the probability which is 0.9 and it conforms to the fact that it lies between [0.89 , 1.00]

One vote down from me

- buckCherry November 21, 2012 | Flag
Comment hidden because of low score. Click to expand.
-2
of 2 vote

Using expected value of first 100 outcomes. black 90 white 10.
remains 810 black and 90 white. so probability would still be 9/10

- Punit Jain May 05, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 votes

YEAH!

- Anonymous January 29, 2013 | Flag


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