SIG (Susquehanna International Group) Interview Question






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

P(5H in a row) = P(5H/unfair)P(unfair) + P(5H/fair)P(fair)
= 9/40
What is asked is P(6 H/5H) = P(6H)/P(5H)
P(6H) = P(6H in a row) = P(6H/unfair)P(unfair) + P(6H/fair)P(fair)
= 17/80
so correct answer is 17/18 = 0.9444

- Gursharan November 26, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 3 vote

1/5*1+4/5*(1/2^5)
=9/40

chance of getting head is 1/5
pro=(1/5)/(9/40)==>8/9Ans

- Abhish1 June 28, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

8/9 is the (conditional) probability that (after 5 tosses) the coin was the coin that has heads on each side.
The probability of having heads "the next time" is independent of the previous 5 tosses, but conditioned on the pull from bag. The answer of Anonymous below, i.e., 3/5 is the correct answer in this case.

- MST August 18, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

N = next toss is heads
H = previous 5 tosses are heads
U = unfair coin

P(N/H) = P(N/H,U) + P(N/H,~U)

- Synonymouse November 24, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i think its 0.5125.. any corrections required ??

- saumils1987 November 25, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

if a coin is tossed the probability of head and tail doesn't depend on previous tosses it only depend on that coin itself so

4/5*1/2 + 1/5*1 = 3/5

- Anonymous November 25, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

This is not correct.
If what you are saying is correct, then the probability of two heads in two tosses is 3/5 * 3/5 = 9/25, right?
But the probability of two heads in two tosses should be calculated as (4/5 * 1/2 * 1/2) + (1/5 * 1 * 1) = 2/5.

Gursharan's comment explains the answer neatly.

- riderchap November 26, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

i think 3/5 is the right answer as the result of a toss doesnt depend on the previous tosses:)
@riderchap: in your answer 9/25, there is a mistake, you arrive at the result when u choose a different coin for each toss. which is not the case here...

- Anonymous December 02, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

I was exposing that your answer is indeed based on the assumption that each time you are pulling a coin from the bag. But that is not the case here.

The result of a toss doesn't depend on previous tosses if you know what you are tossing. If I am tossing a fair coin the probability of next head after 5 (or any number of) heads is 1/2. If that is a double headed the probability is 1. Here you don't know what you are tossing.

For a fair coin the probability of a head after 5 heads is 1/2 as we all know, and we can reach that solution by the same solution proposed by Gursharan.

P(6 heads in a row ) =  1/64
P(5 heads in a row ) =  1/32
P( Next head ) = P( Next head | 5 heads in a row)
                ----------------------------------
                       P(5 heads in a row )
But P( Next head | 5 heads in a row) = P(6 heads in a row )
P( Next head ) = P(6 heads in a row )
                 ---------------------
                 P(5 heads in a row )

P( Next head ) = 1/64
                 ----  = 1/2
                  1/32

For the problem given.

P(6 heads in a row ) =  17/80
P(5 heads in a row ) =  9/40
P( Next head ) = P( Next head | 5 head in a row)
                ----------------------------------
                       P(5 heads in a row )
But P( Next head | 5 head in a row) = P(6 heads in a row )
P( Next head ) = P(6 heads in a row )
                 ---------------------
                 P(5 heads in a row )

P( Next head ) = 17/80
                 ----  = 17/18
                  9/40

Imagine this, I have a fair coin in my hand and I got say 1000000000000000000 heads in a row, since its a fair coin I know the probability of next head is 1/2.

Now in the given scenario I got say 100 heads in a row, I don't know its fair coin or a double headed coin in my hand. At first (when we pulled the coin from the bag) there was a 4/5 chance that its a fair coin and 1/5 chance that its a double headed coin in my hand. But now since we saw 100 heads in a row there is 2^n/(4+2^n) = 2^100/(4 + 2^100 ) = 0.99999999999999999999999999999684 chance that its a double headed coin (see http://math.arizona.edu/~jwatkins/f-condition.pdf). Still do you think that the probability of next head is 3/5?

- riderchap December 03, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

My answer comes as 39/32

Explanation.

First time when you pick coin out of bag. you have
4 conins with head and tail and one coin with head only.
Probability of getting head five time can be count as follows.
with first coin with head and tail five times head = 1/32. second coin and 5times head 1/32 and upto 4th coin 1/32
for the 5th coin probability of getting head is 1 its surely returns 1.
(1/32 + 1/32 + 1/32 +1/32 + 1) = 36/32 = 9/8.

now when one coin is already removed we have 4 coins left.
two posibilities. one might be fair or might not be. we have to consider both case.

I) when one fair coin is there
probability = (1/32 + 1/32 + 1/32 +1) = 35/32

II) when one fair coin is not there
probability = (1/32 + 1/32 + 1/32 + 1/32 ) = 4/32

adding two posibilities 35/32 + 4/32 = 39/32.

- Rinks December 19, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

how can probability be greater than 1..:O..:S

- ankit February 02, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

can anyone explain it ..

- nitin November 25, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I think the answer, 3/5, is correct. That is:
(4/5 * 1/2) + (1/5 * 1) = 3/5.
The comment above from RiderChap, which shows 3/5 * 3/5 for a two-heads toss would, expanded out, be:
[(4/5 * 1/2) + (1/5 * 1)]*[(4/5 * 1/2) + (1/5 * 1)]
But this brings in all kinds of cross terms, which don't seem to make much sense.

Also, Gursharan's comment below is taking into account the previous 5 tosses, which have nothing to do with the outcome being asked for. Do you really think that the probability of getting a head is that close to 1, when there is a 4/5 probability that the coin is a fair one? I don't.

- Frank January 27, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

>>"The comment above from RiderChap, which shows 3/5 * 3/5 for a two-heads toss would, expanded out, be:
[(4/5 * 1/2) + (1/5 * 1)]*[(4/5 * 1/2) + (1/5 * 1)]
But this brings in all kinds of cross terms, which don't seem to make much sense."

Yes, it does not make any sense. I put that to explain that 3/5 is not correct. I am sorry if my comment was misleading.


If I am getting all heads for 100000 tosses in a row, there is a greater chance that I pulled a two headed one from the bag, don't you think? So if the previous outcomes are given you need to consider that, it could give you (in the given question it will) a more accurate probability for what kind of coin is in your hand.

See http://math.arizona.edu/~jwatkins/f-condition.pdf

- riderchap January 27, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

use Bayes rule, the answer I got is 17/18

- SwingMan December 07, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Yea 17/18 is correct as far as I can tell. The classic assumption of coin flips not having a history does not apply here, since we are trying to ascertain information about the coin we are tossing. The history of 5 heads is a valuable data point used to give us a more informed perspective on the probability that the unfair coin is being used

- CathalH January 28, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

exactly, need to apply bayes rule because a condition is given.....
so we have to find P(head given 5 heads).....
A - Event of head
B - 5 successive heads
P(A|B) = P(B|A)*P(A)/P(B)

- Anonymous February 20, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Well it will be 3/5

P(H/5H) =P(H/5H,fair coin) + P(H/5H, unfair coin)

= 1*1/5 + 1/2*4/5 = 3/5

End of Discussion

- Anonymous Poochi June 16, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

It is not P(H/5H) we need to find. We need to find P(6H/5H).

Find P(6H/5H) and you will get 17/18.

- riderchap June 18, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Well it will be 3/5

P(H/5H) =P(H/5H,fair coin) + P(H/5H, unfair coin)

= 1*1/5 + 1/2*4/5 = 3/5

End of Discussion

- Anonymous June 16, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Let A be the event that we tossed a fair coin, B be the event that we tossed a "unfair" coin, and C be the event that all 5 times head turned up.

P(A)=4/5, P(B)=1/5, P(C|A)=(1/2)^5,P(C|B)=1

Apply the Bayes' Rule,

P(A|C)= {P(C|A)P(A)}/{P(C|A)P(A)+P(C|B)P(B)}=1/9

P(B|C)= {P(C|B)P(B)}/{P(C|A)P(A)+P(C|B)P(B)}=8/9

The probability that next toss turns out to be Head should be

P(A|C)*(1/2)+ P(B|C)*1=17/18.

- Probabiltyguy February 05, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Should be 17/18

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

(4/5)*(1/5)^6+(1/5)*(1)^6

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

by conditional probability and bays theorem it's 17/18..

- cs1rangers September 12, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

2 part problem.

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

At the 6th toss, probability of the coin to be unfair is not just 1/5 (and its more than that) as we already know that last 5 tosses resulted head.

Let P(A) = coin is unfair, P(B) = coin is fair, P(C) = coin is heads 5 times.
Then P = P(A|C)*P(Head with unfair coin) + P(B|C)* P(Head with fair coin)
As:
P(A |C) = P(C|A) * P(A) / P(C) = 1 * 1/5 / P(C) (Using Bayes Formula)
P(C)= (1*1/5) + ((1/2)^5 (4/5)) =(1/5 + (1/32 * 4/5)) = (1/5 + (4/160)) = 9/40
So P(A |C) = (1/5) / (9/40) = 8/9
Similarly P(B|C) = P(C|B)*P(B)/P(C) = (1/2)^5 * 4/5 / (9/40) = 1/9

So P = 8/9 * 1 + 1/9 * 1/2 = 17/18

- Kailash Gupta August 31, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Please help me solve this questions with detailed work outs.

1. 15% of items produced in a factory are defective. determine the bionomial distribution that a pack of 5 such items from the said factory will contain 5 defective items?

2. differentiate y= sin 3x/x+1

3.work out the second derivative of x^2 + y^2 - 2x - 6y +5 =0

- Anonymous December 02, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

No.

- Clifford the big red dog December 02, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

He seems to be barking up the wrong tree. Way to give him a ruff time, dawg.

- Pundit December 02, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

The Correct Answer should be 3/5
question is: what is the probability that you toss next time, heads turns up.
No matter how many times you toss a coin, the chance will not change
if coin is not fair, then probability is 1/5*1 = 1/5
if coin is fair, then probability is 4/5*1/2 = 2/5

Probability of getting head will be = 1/5 + 2/5 = 3/5

Kindly correct me.

- Puneet Gupta February 19, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Hi. This answer is correct only if the coin is redrawn after each toss. Because you are using the same coin, you must assume that with each successive head, it is that much more likely that you are using the trick coin, therefore it will carry more weight.

- Anon April 20, 2020 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

65/66.

The coin is already picked, it's either a fair or unfair one.

Find following conditional probabilities:
P(coin is fair / given 5 heads) = 1/33
P(coin is unfair / given 5 heads) = 32/33

OK. If we toss the coin for the sixth time,
P(6th head) = P(fair coin)*P(head/fair coin) + P(unfair coin)*P(head/unfair coin) = 1/33*1/2 + 32/33 * 1 = 65/66

P.S. If you don't understand why we got 1/33 and 32/33, it's really hard to explain it shortly. Please check Bayes rule.

- Anonymous March 25, 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