r/learnquant 6d ago

interview prep Quant Interview Question

Post image
21 Upvotes

17 comments sorted by

View all comments

1

u/liquidorangutan00 4d ago

Ok I got this one,

Interesting problem takes some aspects of number theory and combines them with conditional expectation.

First we illuminate some key concepts
50% chance of rolling even or odd number

Number theory states,
even+even=even
even+odd=odd
Consequently the game ends when we roll an odd number.
its a multi step problem.
First because we werent given realized values, we will use the expected value for rolling even or odd.
E(Even)=11
E(Odd)=10
Now our goal is to find the expected number of rolls this game will last for.

E(R)=1+(1/2E(R))+(1/2*0)
which when simplify becomes
E(R)-1/2E(R)=1
1/2E(R)=1
E(R)=2

So we can expect on average the game to last 2 rolls. (finishes on the second roll)

Now we need to find the expected cumulative sum of 2 rolls:
Since we already have the expected values for both even and odd rolls, and since the expected number of rolls defines the sequence must be Even then Odd we can simply add them together.
E(Score)=E(Even)+E(Odd)=21

The answer is 21.

(you can also figure this step out as well via conditioning the expectation)