由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - onsite面经
相关主题
大家来讨论chimbo大牛的几道题吧.也问一道题
some MS written test questions看看这道题(probability)
an interview question问个掷骰子的概率问题 (转载)
请教概率题[合集] 请教一个概率题
一个概率题: boy & girl请教一个关于copula的问题
[合集] 面试题等bus的问题
问几个brain teaser (转载)3 interview questions
one probability questionMS新题一题
相关话题的讨论汇总
话题: var话题: what话题: prove话题: so话题: uniform
进入Quant版参与讨论
1 (共1页)
c****o
发帖数: 1280
1
They are from different companies, including hedge fund and IB.
1.How to find out first K biggest number in an array efficientely, time
complexity.
2. How to find out the memory layout of a class without initiate the class
3x_i are independent uniform distribution,let s_\tao denoted the first time
the sum exceed 1, what the expectation of \tao(answer:e)
4.A matrix which is ordered each row (left to right)and column(up to dowm),
how to find an element in the matrix?
5.Assume the temperature on the earth is continuous, prove that there exists
a point x such that the temperature at the point equals the temperature at
-x.
6.N people in the room, A is a matrix, A_ij=0 means i-th person knows j-th
person, and A is not symmetric. There is one celebrity in the room,
everybody knows him and he know nobody(like Obama), how to find this person
efficientely?(In O(n) time)
7.Three nine digits number e,f,and g. If we replace f_i with e_i they the
new nine digites can be divided by 7, for all i. Same happens if we replace
g_i with f_i,prove that g_i-e_i==0 mod 7 for all i.
8.I know Ben have Two kids, and I know one is boy and is born on Tuesday,
what is the probability that he has two boys?(Answer:13/27)
9.x,y independent uniform distribution on [0,1], calculate p(x*y<0.5)
10.Three R.Vs,x,y,z, can they be negatively correlated pairwise?
11.solve heat equation explicitely and numerically.
12.50 black cards and 50 red cards, if the card is red, I get $1, if black I
lose $1, what is the strategy for this game.(See green book)
13. What is call-put parity for vanilla and binary options
14.for a R V within [0,1], if mean=0.5, how to maximize the variance, prove
it.
I skip some standard questions that appear A LOT in this board.
Good Luck to all!
waiting for Baozi~~~~~~~~
P*****s
发帖数: 758
2
赞啊~
l*********t
发帖数: 89
3
好贴~ chimbo is a good guy~
顶一个~
t*******y
发帖数: 637
4
12题 green book上有吗?

time
,
exists
at

【在 c****o 的大作中提到】
: They are from different companies, including hedge fund and IB.
: 1.How to find out first K biggest number in an array efficientely, time
: complexity.
: 2. How to find out the memory layout of a class without initiate the class
: 3x_i are independent uniform distribution,let s_\tao denoted the first time
: the sum exceed 1, what the expectation of \tao(answer:e)
: 4.A matrix which is ordered each row (left to right)and column(up to dowm),
: how to find an element in the matrix?
: 5.Assume the temperature on the earth is continuous, prove that there exists
: a point x such that the temperature at the point equals the temperature at

P*****s
发帖数: 758
5
yes

【在 t*******y 的大作中提到】
: 12题 green book上有吗?
:
: time
: ,
: exists
: at

A*******u
发帖数: 66
6
Thanks for sharing!

time
,
exists
at

【在 c****o 的大作中提到】
: They are from different companies, including hedge fund and IB.
: 1.How to find out first K biggest number in an array efficientely, time
: complexity.
: 2. How to find out the memory layout of a class without initiate the class
: 3x_i are independent uniform distribution,let s_\tao denoted the first time
: the sum exceed 1, what the expectation of \tao(answer:e)
: 4.A matrix which is ordered each row (left to right)and column(up to dowm),
: how to find an element in the matrix?
: 5.Assume the temperature on the earth is continuous, prove that there exists
: a point x such that the temperature at the point equals the temperature at

a***u
发帖数: 67
7
.for a R V within [0,1], if mean=0.5, how to maximize the variance, prove
it.
any idea?
b*******e
发帖数: 86
8
co-ask

【在 a***u 的大作中提到】
: .for a R V within [0,1], if mean=0.5, how to maximize the variance, prove
: it.
: any idea?

a***u
发帖数: 67
9
我想了下,这个应该就是在uniform的时候variance取到最大是1/4
下面这个问题想了想没啥想法啊
Three nine digits number e,f,and g. If we replace f_i with e_i they the
new nine digites can be divided by 7, for all i. Same happens if we replace
g_i with f_i,prove that g_i-e_i==0 mod 7 for all i.

【在 b*******e 的大作中提到】
: co-ask
l******f
发帖数: 568
10
跟distribution无关吧(比如bernoulli, 0,1 各1/2), 其实只要mean是1/2, max Var
就是1/4

replace

【在 a***u 的大作中提到】
: 我想了下,这个应该就是在uniform的时候variance取到最大是1/4
: 下面这个问题想了想没啥想法啊
: Three nine digits number e,f,and g. If we replace f_i with e_i they the
: new nine digites can be divided by 7, for all i. Same happens if we replace
: g_i with f_i,prove that g_i-e_i==0 mod 7 for all i.

相关主题
[合集] 面试题也问一道题
问几个brain teaser (转载)看看这道题(probability)
one probability question问个掷骰子的概率问题 (转载)
进入Quant版参与讨论
a***u
发帖数: 67
11
对,你说的是对的
我想表达的意思就是你说的这个,最大值是1/4,而且是sharp的
大佬们给看看整除7那道?

Var

【在 l******f 的大作中提到】
: 跟distribution无关吧(比如bernoulli, 0,1 各1/2), 其实只要mean是1/2, max Var
: 就是1/4
:
: replace

c****o
发帖数: 1280
12
uniform has variance 1/12........
think about var=E(x-E(x))^2

replace

【在 a***u 的大作中提到】
: 我想了下,这个应该就是在uniform的时候variance取到最大是1/4
: 下面这个问题想了想没啥想法啊
: Three nine digits number e,f,and g. If we replace f_i with e_i they the
: new nine digites can be divided by 7, for all i. Same happens if we replace
: g_i with f_i,prove that g_i-e_i==0 mod 7 for all i.

w******i
发帖数: 503
13
Thanks for the post.

1.How to find out first K biggest number in an array efficientely, time
complexity.
2. How to find out the memory layout of a class without initiate the class
3 x_i are independent uniform distribution,let s_\tao denoted the first time
the sum exceed 1, what the expectation of \tao(answer:e)
4.A matrix which is ordered each row (left to right)and column(up to dowm),
how to find an element in the matrix?
5.Assume the temperature on the earth is continuous, prove that there exists
a point x such that the temperature at the point equals the temperature at
-x.
6.N people in the room, A is a matrix, A_ij=0 means i-th person knows j-th
person, and A is not symmetric. There is one celebrity in the room,
everybody knows him and he know nobody(like Obama), how to find this person
efficientely?(In O(n) time)
7.Three nine digits number e,f,and g. If we replace f_i with e_i they the
new nine digites can be divided by 7, for all i. Same happens if we replace
g_i with f_i,prove that g_i-e_i==0 mod 7 for all i.
8.I know Ben have Two kids, and I know one is boy and is born on Tuesday,
what is the probability that he has two boys?(Answer:13/27)
9.x,y independent uniform distribution on [0,1], calculate p(x*y<0.5)
10.Three R.Vs,x,y,z, can they be negatively correlated pairwise?
11.solve heat equation explicitely and numerically.
12.50 black cards and 50 red cards, if the card is red, I get $1, if black I
lose $1, what is the strategy for this game.(See green book)
13. What is call-put parity for vanilla and binary options
14.for a R V within [0,1], if mean=0.5, how to maximize the variance, prove
it.

【在 c****o 的大作中提到】
: uniform has variance 1/12........
: think about var=E(x-E(x))^2
:
: replace

s******r
发帖数: 58
14
3) 怎么做?simulation result is e, how to get it analytically?
8) 1/2
9) int_0^1 p(X<1/2Y|Y=y)f(Y)dy = 0.5*int_0^2 1/Y dy = 0.5lnY|_0^1
好象不对啊,超过1了,哪错了?
14) variance of Uniform is 1/12, how to maximize it?
b*******e
发帖数: 86
15
for 9, you should divide the integral into two parts. 0
【在 s******r 的大作中提到】
: 3) 怎么做?simulation result is e, how to get it analytically?
: 8) 1/2
: 9) int_0^1 p(X<1/2Y|Y=y)f(Y)dy = 0.5*int_0^2 1/Y dy = 0.5lnY|_0^1
: 好象不对啊,超过1了,哪错了?
: 14) variance of Uniform is 1/12, how to maximize it?

s****p
发帖数: 19
16
Hi, thank you so much for sharing. It's so valuable.
For this problem, my method is to define a binary r.v. I such that I takes
value 0 or 1 with probability 1/2, then let
Y = X if I=0 and Y=1-X if I=1. It is easy to show that var(Y)>var(X) while E
(Y)=0.5, how ever the distribution of Y is symmetric w.r.t. the point 0.5,
and E(Y-0.5)^2 = 2 E[(Y-0.5)^2, Y>0.5] <= 1/4.

【在 c****o 的大作中提到】
: uniform has variance 1/12........
: think about var=E(x-E(x))^2
:
: replace

s****p
发帖数: 19
17
I am not as good as your guys in programming and I have trouble with first
two problems.
1) The best I can do is [\log_2 K]n, any one knows anything better?
2) I totally have no idea what this means, any one gives me some suggestion?
Thank you.
s****p
发帖数: 19
18
any guy knows how to do (6)?
j********t
发帖数: 97
19
Thank you for posting.
How can we solve (3)? Seem (S_n - 1/2) is a martingale. How can we connect
to expectation of first passage time? Thanks.
J**********g
发帖数: 213
20
thanks for sharing..
相关主题
[合集] 请教一个概率题3 interview questions
请教一个关于copula的问题MS新题一题
等bus的问题probability questions
进入Quant版参与讨论
s****p
发帖数: 19
21
use brutal force. Compute P(X_1+...+X_n < 1) and sum them up. It's not too
hard.

【在 j********t 的大作中提到】
: Thank you for posting.
: How can we solve (3)? Seem (S_n - 1/2) is a martingale. How can we connect
: to expectation of first passage time? Thanks.

s****y
发帖数: 12
22
再赞一个!
x******a
发帖数: 6336
23
Wald identity.

【在 j********t 的大作中提到】
: Thank you for posting.
: How can we solve (3)? Seem (S_n - 1/2) is a martingale. How can we connect
: to expectation of first passage time? Thanks.

p******e
发帖数: 756
24
可以解释一下怎么用wald identity么
我怎么也绕不开S_\tau的分布或者期望.thx

【在 x******a 的大作中提到】
: Wald identity.
x******a
发帖数: 6336
25
sorry, 估计很难求,ssheep的方法不错

【在 p******e 的大作中提到】
: 可以解释一下怎么用wald identity么
: 我怎么也绕不开S_\tau的分布或者期望.thx

p******e
发帖数: 756
26
求ssheep的方法详解
p(x_1+...x_n>1)的概率怎么求呢,n次卷积?看不出有什么办法得到一个直接的数值阿
thx

【在 x******a 的大作中提到】
: sorry, 估计很难求,ssheep的方法不错
x******a
发帖数: 6336
27
P(x_1+...+x_n<1)=1/n!.
归纳:
2维的是x_1+x_2<1, 单位正方形的一角,1/2
3维的是单位立方体的一角, 1/6,
写卷积也可以。

【在 p******e 的大作中提到】
: 求ssheep的方法详解
: p(x_1+...x_n>1)的概率怎么求呢,n次卷积?看不出有什么办法得到一个直接的数值阿
: thx

b******e
发帖数: 118
28
然后怎么求tau的expectation呢?

【在 x******a 的大作中提到】
: P(x_1+...+x_n<1)=1/n!.
: 归纳:
: 2维的是x_1+x_2<1, 单位正方形的一角,1/2
: 3维的是单位立方体的一角, 1/6,
: 写卷积也可以。

b******e
发帖数: 118
29
还有这个第8题,我用楼主的答案,反推了一下,如果用Bayes'formula,given两个
boys的前提,一个是boy且出生在Tuesday的概率是13/49??这个为什么??

time
,
exists
at

【在 c****o 的大作中提到】
: They are from different companies, including hedge fund and IB.
: 1.How to find out first K biggest number in an array efficientely, time
: complexity.
: 2. How to find out the memory layout of a class without initiate the class
: 3x_i are independent uniform distribution,let s_\tao denoted the first time
: the sum exceed 1, what the expectation of \tao(answer:e)
: 4.A matrix which is ordered each row (left to right)and column(up to dowm),
: how to find an element in the matrix?
: 5.Assume the temperature on the earth is continuous, prove that there exists
: a point x such that the temperature at the point equals the temperature at

x******a
发帖数: 6336
30
E(\tau)=\sum nP(\tau=n)=\sum P(\tau>n)=\sum P(S_n<1)=e.

【在 b******e 的大作中提到】
: 然后怎么求tau的expectation呢?
相关主题
【Random Walk】非对称的random walk撞边界问题怎么解?some MS written test questions
【Probability】老题 Fair coinan interview question
大家来讨论chimbo大牛的几道题吧.请教概率题
进入Quant版参与讨论
b******e
发帖数: 118
31
明白了,谢谢。

【在 x******a 的大作中提到】
: E(\tau)=\sum nP(\tau=n)=\sum P(\tau>n)=\sum P(S_n<1)=e.
b******e
发帖数: 118
32
又算了一下,应该就是13/49。而且可以不用Bayes'formula,直接分三种情况考虑就可
以了:13/(13+7+7)=13/27

【在 b******e 的大作中提到】
: 还有这个第8题,我用楼主的答案,反推了一下,如果用Bayes'formula,given两个
: boys的前提,一个是boy且出生在Tuesday的概率是13/49??这个为什么??
:
: time
: ,
: exists
: at

b*******e
发帖数: 86
33
May I ask where did you get the 13 in the formula? Thanks.

【在 b******e 的大作中提到】
: 又算了一下,应该就是13/49。而且可以不用Bayes'formula,直接分三种情况考虑就可
: 以了:13/(13+7+7)=13/27

y**x
发帖数: 117
34
For x in [0,1], we have x^2<=x
So
Var(X)=E(X^2) - (E(X))^2
<=E(X) - (1/2)^2
=1/2 -1/4
=1/4


E

【在 s****p 的大作中提到】
: Hi, thank you so much for sharing. It's so valuable.
: For this problem, my method is to define a binary r.v. I such that I takes
: value 0 or 1 with probability 1/2, then let
: Y = X if I=0 and Y=1-X if I=1. It is easy to show that var(Y)>var(X) while E
: (Y)=0.5, how ever the distribution of Y is symmetric w.r.t. the point 0.5,
: and E(Y-0.5)^2 = 2 E[(Y-0.5)^2, Y>0.5] <= 1/4.

b******e
发帖数: 118
35
考虑two boys的情况,given一个boy born on Tuesday,另外一个boy可以是Monday-
Sunday任意一天,所以是2*7-1(count twice for the case of two boys both born
on Tue)=13

【在 b*******e 的大作中提到】
: May I ask where did you get the 13 in the formula? Thanks.
b*******e
发帖数: 86
36
Thanks a lot, bitalice!

born

【在 b******e 的大作中提到】
: 考虑two boys的情况,given一个boy born on Tuesday,另外一个boy可以是Monday-
: Sunday任意一天,所以是2*7-1(count twice for the case of two boys both born
: on Tue)=13

1 (共1页)
进入Quant版参与讨论
相关主题
MS新题一题一个概率题: boy & girl
probability questions[合集] 面试题
【Random Walk】非对称的random walk撞边界问题怎么解?问几个brain teaser (转载)
【Probability】老题 Fair coinone probability question
大家来讨论chimbo大牛的几道题吧.也问一道题
some MS written test questions看看这道题(probability)
an interview question问个掷骰子的概率问题 (转载)
请教概率题[合集] 请教一个概率题
相关话题的讨论汇总
话题: var话题: what话题: prove话题: so话题: uniform