Could you pass a first round Jane Street interview?

1.There are 2 boys and unknown number of girls in a nursery . A new baby is just born inside the room. We pick randomly a baby from the room, it turns out that the baby is a boy. What is the probability that the new baby just born is a boy?

2.Chance of seeing a shooting star in 1 hour is 60%. What is the chance of seeing star in half an hour?

3.Given a six-sided die, what's the expected value of the difference between two die rolls?

4.You have 12 black socks and 12 white socks mixed up in a drawer. You’re up very early and it’s too dark to tell them apart. What’s the smallest number of socks you need to take out (blindly) to be sure of having a matching pair?

5.There is a car auction. The price of the car is uniform [0,1000], you do not know the actual value of the car. If you bid higher than the value of the car you get it, if you bid lower than the value of the car you don't. If you know you can sell it on afterwards for x times its worth, what should you should you bid when: x=1.5 (e.g. For x=1.5, you bid 100, the car is worth 80, you get it and sell it on for 120, which is a 20 profit).

Attached: 1563918900311.jpg (250x214, 5K)

Other urls found in this thread:

en.wikipedia.org/wiki/Bayes'_theorem#Statement_of_theorem
twitter.com/SFWRedditGifs

1. Not enough information
2. 30%
3. Not enough information you didn't say what the die faces are
4. Two is the smallest because that's the amount in a pair.
5. 1000

>probability that the baby is a boy
Just chuck the girls off a cliff until only boys remain

im sorry but this is 100% wrong. you even got the easiest one wrong (no. 4)

I hope this is OP having a laugh. Otherwise I feel sorry for your poor parents.

1. 50%
2. 30%
3. 7
4. 3
5. 0

I agree with 4-5, but 2-3 are wrong.
If p = P(you see shooting star in 30 mins)
P(you don't see shooting star in 1 hour) = 1 - 0.6 = 0.4 = (1 - p) ^ 2
1 - p = sqrt(0.4)
p = 1 - sqrt(0.4)

Also, how would you get a difference of above 5 between two dice rolls user?

So the interview is just basic stats?

Any way to do 3 without listing out the possibilities?

AAAAAAAAAAAAAHHHH OHHHHHHHHHHHHHHHHHHGOOOOOOOOOD IM COOOOOOOOOOOMING

3. 70/36
4. 3
5. 0 if x

1. No idea
2. 30% I guess
3. 0
4. 13
5. 500/x?

1. 50%
2. 30%
3. 0 if you mean the straight difference, 1.944 if you mean the high minus the low.
4. 3
5. This is gambling and I don't believe there is any safe bet with that multiplier.

based

Linearity of expectations means E(dice1 - dice2)=E(dice1)-E(dice2). Since obviously they're equal it's 0

i don't think the point is to actually get these questions right (well not all of them anyway) and more to show your thinking and consideration of possbilities. some of the questions are not precise enough.

That would work if there were negative differences. However, there is only a 1/6 chance there is no difference; in every other case there is a difference.

What if the question is for absolute difference?

>4. 13
HAHA

>1. 50%
>2. Less than 60%
>3. 0
>4. 14 socks unless you are super unlucky
>5. The actual value could be negative due to towing fees, registration costs and safety repairs, salvaged title, etc. Do not bid.

1: 100% because that's the only baby in the room, the rest are boys and girls.
2: 60%. You have the same chance of seeing it in half an hour.
3: between 0-5. Otherwise, dunno.
4: 3
pick black, pick black, end with a pair
pick white, pick white, end with a pair
pick black, pick white, pick either color, end with a pair
pick white, pick black, pick either color, end with a pair
5: The car could be even worthless. Going with $0 is the absolute safest option. Otherwise, dunno.

Attached: excel.png (718x166, 6K)

3/5
1 - sqrt(.4)
35/18
3
Never bid
I don't want your job. I already work at FAANG.

1. 50%
2. 30%
3. 2
4. 3
5. no fucking idea what you're even saying nigga

1. 50%
2. 60%
3. 3
4. 3
5. 0

1. 100% chance since no value is given to the girls.
2. 60% as the stars are not governed by time.
3. 1.5?
4. 3 to assuredly have a pair.
5. I'm stumped by this one. I'm gonna wing it and say 200 since to bet higher is to pooch your chances of making a profit.

Don't be silly, it is obviously three socks.

>1.There are 2 boys and unknown number of girls in a nursery . A new baby is just born inside the room. We pick randomly a baby from the room, it turns out that the baby is a boy. What is the probability that the new baby just born is a boy?
do they really ask this? i don't see the point of asking trick questions in job interviews

Wow, you're smart.
For the 3/5 answer, I guess it could be reasoned like this.
Probability of picking boy if
boy is born: 3/(3+g)
girl is born: 2/(3+g)

Out of the 5 universes that lead to a boy being picked, 3 of them are because a boy was born, and 2 are because a girl was born. Hence 3/5.

>Never bid
So, never take blind risk? Would the answer change if 3 out of 4 have a chance of having a value of 200 at least? What about 1 out of 4?

13 socks

Ahh shit. This is why I never click interview question threads. The dice one seems like it should be 0. Why isn't it?

the question is too vague

1. Not enough information.
2. Not enough information. See attached garbage.
3. Not enough information. You have to say "fair die."
4. 3. Duh.
5. "The price of the car is uniform [0,1000]" I don't even know what that's supposed to mean. Do you mean the price of the car is randomly determined by a uniform distribution?

Well, then that's easy EV = P(loss) * 0 + P(win) * (Average Value on Win) * 1.5
If you bet $Y, then P(loss) = (1000 - y)/1000 and P(win) = y/1000
Average Value On Win would clearly be (y + 1000) / 2
If you win then on average you get (y + 1000) / 2 * 1.5 - y profit.
Thus EV = 0 + (y + 1000) / 2 * 1.5 - y
The break-even point is y = (y + 1000) / 2 * 1.5 - y
y = 600

Unless I'm misunderstanding your poorly-phrased question and you don't actually pay if you loose. In which case OBVIOUSLY you bet 1000.

Attached: mega autism pedant comic.png (636x612, 154K)

I did it on paper and got 70/36

You get 35/18 if you take high-low across all possible combinations.

Holy shit it's actually true
import random

randboy = 0
wasboy = 0
for i in range(0,1000000):
children = [1,1]
newchild = random.choice([0,1])
children.extend([0 for _ in range(0, random.randint(0,100))])
children.append(newchild)
if random.choice(children) == 1:
randboy += 1
if newchild == 1:
wasboy += 1
print("was boy", wasboy/randboy)
10/10 would never have guessed

>In which case OBVIOUSLY you bet 1000.
I'm guessing this is more risk management than anything. You can roll with 600 with statistics at your side, guessing that if you do this perpetually, you'll eventually break even.
But if there's a more than 5% risk that paying 1000 for a car that is worth 50 or less, having a loss of 925% is absolutely unacceptable. 0 is sound - even if you bid 1 to get a 1.5 car every time, with a guaranteed 100% win rate, you need to consider opportunity cost.
Or it seems that way, considering Jane Street is all about investing.

repping FAANG pretty well there.

Attached: 11325124132.jpg (250x240, 8K)

1. 50%
2. Oof lemme try
(1-p)^2=.4
1-p=sqrt(.4)=0.6324
p=0.3675
so 36.75%
3. 0
4. 3
5. 0

How did I do?

So, judging by the thread i got 3/5.
Okay

13 socks? Just turn the lights on, nigga.

Probability and statistics has never stuck with me. If I have to, I can struggle to learn something and hold on to it until I no longer need to know it and then I'm back to square one. Nothing else I learn has this low a level of retention besides probability. I hate these numbers.

>You have 12 black socks and 12 white socks mixed up in a drawer. You’re up very early and it’s too dark to tell them apart. What’s the smallest number of socks you need to take out (blindly) to be sure of having a matching pair?
If it's too dark to see then it doesn't matter, just use the first 2. You're home alone in the dark you idiot, do you really care if they match?

1. Not enough data.

2. Seeing a star? That depends on the weather, but usually 100%.

3. 0-5.

4. Turn on a light you dumbfuck, why are you getting dressed in the dark.

5. I don't know what [0,1000] means.

Jane street only takes MIT math wizards so no.

>What is the chance of seeing star in half an hour?
Does not say "shooting star".The answer is 100%.

>clouds

Answers like this may seem clever to you, but they don't demonstrate any brain power.
Figuring out the math is what they want, because it demonstrates you aren't a moron and can reason.
Answers like yours (wrong and silly) are a method of wriggling out of having to actually use your brain, and they are not any good for distinguishing yourself from a brainlet, which is what the interviewer wants you to do.

No.4 is 14. You have to remove all chances or error to guarantee a positive result.

The one asking the questions is the idiot if he cant even form valid sentences.

Seriously nigga? Please explain how you can't get a pair on three attempts.

hahahaha, so how many tries til you get either 2 black socks or 2 white socks? they mention 12 pairs in order to weed out morons.

he's just joking bro

Three things

1) Aren't these just stats and probability problems?

2) How is this tech related?

3) Why are you asking Jow Forums to do your homework for you?

it says 12 individual black and white socks

mmmkay moron

It's highly unlikely that someone would have an even amount of matching socks available in their drawer to begin with.

damn washers sucking up socks

um what.

you either get a matching pair on the first two attempts or you get a matching pair by the third attempt. so it's 3.

4 is 13. Rather than any complex mathematical proof, the way you solve it is by analyzing ANY scenario which can give you a number as possible. You have 6 pairs of black socks, and 6 pairs of white socks, meaning 6 black left socks, 6 black right socks, 6 white left socks, and 6 white right socks. If you pull out a sock, you are not guaranteed to pull a similar colored mate, so say you grab a white left sock. The next six could entirely be black right socks. Then the rest could be 5 more white left socks. Then, the next sock you pull must match one of the ones you've already pulled, so the 13th sock will give you a pair.

*as great a number as possible

1. 50%

2. One minus the square root of 40%.

3. 0

Isn’t this confidential information?

>left and right socks
u w0t m8

1. the baby isnt old enough to state what its gender is so we dont know
now give me my 200k starting

1. 50% If we knew how many girls were in the nursery we could do better. If there were 10 billion girls in the nursery then we would know that the probability the new baby is a boy is very high. [spoiler]Also people don't have babies in nurseries.[/spoiler]

2. 100% If you can see a shooting star you can definitely see a star.

3. Do you mean the most likely value? The most likely difference between two dice rolls is 1. I ran every possible combination of 2 rolls and the difference was one in 10 of those 36 possibilities.

4. 3 socks. If the first two socks are the same color then you're good. If they're opposite colors then the 3rd sock will match one of the first two.

5. That is not how auctions work.

1. Anywhere between 100% (if unknown number is 0) and ~1% (in an exceptionally large nursery of 100). All that is certain is at least 1 baby in the room during random selection is a boy.

2. Seeing any star? 100% in the daytime, very high % at night (unless completely overcast)

3. One. You can roll 1 higher than 5 but not 2 higher. You can roll 1 lower than 2 but not 2 lower. And you're twice as likely to roll 2 or 4 after 3 - than you are of getting 3 again - so it can't be zero.

4. If you're too retarded to get a little bit of light to distinguish black from white then you have bigger problems. Don't you all have phones? But to answer - the second sock you take out has a 11/23 chance of matching the first, if it doesn't the 3rd sock has an 11/22 chance, then 11/21, and so on until you get it.

5. tl;dr

1. 3/5
2. 1 - sqrt 0.4
3. 70/36
4. 3
5. 1000/1.5

See: Literally two posts up.

Fitted socks, friend.

He looked up the "answers". To truly answer these in an interview setting, you have to ask probing questions about the phrasing.

How the fuck would they expect the person being interviewed to know about Bayes Theorem. These problems are not hard for someone with a background in stats but I feel like it would weed out decent candidates who aren't up to date on set theory bullshit.

Attached: IMG_1325.jpg (4032x3024, 1.7M)

>If there were 10 billion girls in the nursery then we would know that the probability the new baby is a boy is very high.
Wrong. You're committing a Monte Carlo fallacy if you think that because the probability of being either male or female is 50%, and there were 10 billion girls born beforehand, that this one must have a 99.9% chance, when this is completely false. Worse yet, knowing there are 10 billion girls sets your chances 10B:2, and it sets a precedent that there's an obvious bias towards females; normal biology patterns are not applying for whatever reason.

>100% If you can see a shooting star you can definitely see a star.
Cheeky.

Every new grad with a CS background would encounter Bayes' Theorem multiple times, whether in their Intro Stats class, or Discrete Math class

>Jane Street is a quantitative trading firm and liquidity provider with a unique focus on technology and collaborative problem solving.
They most likely expect someone with a background in stats.

jane st. is fintech, of course they're looking for candidates with stats background

Attached: 1503974664081.jpg (239x213, 20K)

ocamlcucks btfo

tips m'haskelldora

It is not true. The correct answer is 50%. Statistics tries to pretend like the events are somehow connected. They are not. I read a whole long fucking text doing mental gymnastics about it but it reads like complete bs.

It is 50%. It does not matter if there are already boys or girls or fucking or whatever in the room. It. Is. Not. Related.

I assumed it was something more like your googles or amazon. I should have just posted the solution.

That is not how randomness works. You can have 1.000.000 girls born and only 1 guy and the chance can still be 50/50.

Show your math, because that doesn't make any sense. If there are two possible outcomes and one happens a million times more than the other, the chance is NOT 50/50, bro.

You're replying to the code I gave you to simulate it, user. The only part of the problem that truly does not matter is the number of girls, you can comment out the children.extend(), so it's just [boy, boy, [boy/girl]], and the experimental result remains 0.6. It's the same trick as the golden ball thing, just with some extra padding to make it more confusing.

The 50% does not come from any background knowledge that boys and girls are usually born with equal probability. There are 2 possible events total, if it were possible for 3 sex's to be born with biological probability 0.4 for X, 0.4 for Y, 0.2 for Z the event probability of any of the 3 sex's born is 1/3. So since our two events are boy is born or girl is born, you introduce 50% as a probability of the first event happening.

Exactly my point.
>If there were 10 billion girls in the nursery then we would know that the probability the new baby is a boy is very high.
Is wrong based on your own statement. The chance the new baby will be a boy is not very high, it is still 50% based on basic biology nuances, and thinking it would be higher because of previous results is the definition of a Monte Carlo fallacy,

Or rather the simpler and less dumb reason it is 50%:

>1
1:infinity
>2
30% 30 minutes
>3
Average expected is a little bit above 2. Can range between 0-5.
>4
13
>5
500

0/5 wow user

Attached: 1551452347225.gif (202x360, 1.84M)

1. 50%
2. 60% I guess
3. 0
4. 13
5. Is a gamble and the house always wins, the only way you can win the car and max out your profit if is if you actually guess the price of the car + 1 dollar if the rule for winning is strict, but because is a uniform distribution you're fucked with a 1/999 chance to do it. Also, is an auction, not a simple for only one person, other people will bid higher values until some retard bids the 1000 bucks and in that case, he will lose money if the price of the car is 667 or less.

>sell all females as sex slaves leaving only boys so probability of boy is now 100%
>only a real faggot would be out on a nice night looking at stars instead of being in his coding dungeon jerking off over mother boards specs
>six sided die? worse game of dnd ever
>maybe instead of blindly picking socks like an idiot I should turn on a light or move the socks to some place that has light
>google the value of the car on my smart phone and win by cheating aka the path to success in life

1. Stupid question, I'm just gonna say 50%.
2.30%
3.0
4.3
5.500

based and coompilled

4 is clearly 3 how are people this retarded?

It's X+1 everywhere. P(pick a boy|boy born) is 3/X+1. A boy being born means more babies.

The question was whether there is a way to solve it without tabulating the differences.

How much time they give you to answer these questions and are you allowed to use pen+paper?

Mostly true, with some exceptions (me)

This is true. X meant two different things in my head when I did the calculation for each.

1. unknown; we can't tell until the child is old enough to choose its gender
2. the chance of seeing a star is 100%; the sun is up right now
3. as much as you want among the possible values if you're good enough at rolling them
4. 2; I don't mind wearing mixed socks, it's cute
5. you shouldn't bid (or bid 0); gambling is bad

It's basic stat my dude en.wikipedia.org/wiki/Bayes'_theorem#Statement_of_theorem

1. 60%
2. Unknown
3. 0
4. 3
5. 250x, assuming this isn't higher than 1000

>1.There are 2 boys and unknown number of girls in a nursery . A new baby is just born inside the room.
Does those 2 boys include the newly born person if it's a boy?