Interview Question for Analysts


Team: Risk analysis
Country: United States
Interview Type: Phone Interview




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

Is there just one die? If so, the expected reward of a roll is $3.5. So you should reject the first roll if it's less than that (if it's less than or equal to 3).

The expected reward is: rewards from first roll + rewards from second roll. First roll = 1/6 * 6 + 1/6 * 5 + 1/6 * 4 = 2.5. Second roll = chance of getting that far * expected value of a roll = 1/2 * (3.5) = 1.75. So the total expected value of this game is 4.25.

- eugene.yarovoi April 24, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Seems reasonable, intuitive and is very interesting, but is there is a proof?

- Anonymous April 25, 2012 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

Both rolls are independent of each other so each one has an expected reward of $3.5. So if the first roll gives you 1, 2 or 3 then give it another shot. If not then stick with the outcome and make more then expected (4, 5, or 6)

- probability April 24, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

can i know for which company this question was asked??

- Anon April 24, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

and also did they say how many dice? 2 or 3?

- Anon April 24, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

@Anon -- The company is startup on credit card payment.

Here is my answer:

S1: Stop after 1st roll and get rewarded: expected reward = (1+2+3+4+5+6)/6 = $3.5

S2: Try 2nd time if
a) the first roll is less then 6: (1/6)*6 + (5/6)*(3.5)
b) the first roll is less then 5: (1/6)*6 + (1/6)*5 + (4/6)*(3.5)
c) the first roll is less than 4: (1/6)*6 + (1/6)*5 + (1/6)*4 + (3/6)*(3.5)
d) the first roll is less than 3: (1/6)*6 + (1/6)*5 + (1/6)*4 + (1/6)*3 + (2/6)*(3.5)
...
Hence c) is the stragety to maximize the expected reward.

Comments?

- liyiou April 24, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I was thinking the following way.

Possible outcomes: 1 2 3 4 5 6

First try Probability of doing better on second try
1 1/6 vs 5/6 (2,3,4,5,6 would be better)
2 2/6 vs 4/6
3 3/6 vs 3/6
4 4/6 vs 2/6

So, it seems that anything <=3 should lead to a second try.

- Anonymous April 25, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

You can a tree to represent the possible outcomes with each branch having a probability.

Then you can simply calculate the final probability for a particular leaf (a final outcome).

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

Let's say our strategy is reject the reward if it is smaller than a, then our expectation is

Ex= \sum_{t=a}^6 t/6 + (a-1)/6 \sum_{t=1}^6 t/6 = (7-a)(6+a)/12 + (7a-7)/12 = (-a^2 + 8a +35)/12

max Ex= 17/4, when a = 4. This is bigger than the first choice whose expectation is 14/4.

- Arnie Yuan April 26, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

If we have an option to refuse a result and try again then why not wait till you get 6??? :P

- ShashankTrip May 04, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

only two attempts!

- Arvind December 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

The expectation is 3.5 either way.

On the first roll if you roll less than 3.5 (i.e 1-3) you should roll again. If you roll higher you would stay.

The probability outcomes of the second roll are the same as the first. So expectation here is 3.5. Once you decide to roll again you completely forget what the first dice gave you.

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

Define X = face value on dice upon rolling the dice the first attempt
Define y = threshold (to be determined). If X > y, then we stop after first die roll. If X <= y, we roll the dice once more. It is clear that 1<=y<=6

Define the average pay off to equal Z.

Then Z = { 3.5, X <= y,
[(y +1) + ... 6]/(6 -y), X > y
}

We now compute the expected payoff Z for different values of y
y = 1: Z = 3.5 x (1/6) + (2+3+4+5+6)/5 x (5/6) = 47/12
y = 2: Z = 3.5 x(2/6) + (3+4+5+6)/4 x (4/6) = 50/12
y = 3: Z = 3.5 x (3/6)+ (4+5+6)/3 x (3/6)= 51/12
y = 4: Z = 3.5 x (4/6) + (5+6)/2 x (2/6) = 50/12
y = 5: Z = 3.5 x (5/6) + 6 x 1/6 = 47/12
y = 6: Z = 3.5 x (6/6) = 42/12

Based on above, optimal strategy is to choose threshold y = 3. Expected payoff = $51/12 .

- VC September 21, 2015 | 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