由买买提看人间百态

topics

全部话题 - 话题: prob
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
s*********k
发帖数: 1989
1
来自主题: TexasHoldem版 - Prob Quests (baozi)
Too few post here now. Let's do some PROB tests.
I have two below. Whoever asks correctly (vote by others, I do not have the
correct answer) gets baozi.
1) MTT, Avg Chip=25BB (middle stage). You raise with high cards and one
caller at position calls with low pair.
On turn, all low cards (ten below; no pair; flop, you cbet and villian calls
). What is the PROB the villian hits set already on turn?
2) MTT, final table, 5 left, Avg chip=35BB
You raise 2.3BB w/ AKs at BTN and BB 2.4x. You wondering ... 阅读全帖
s*********k
发帖数: 1989
2
来自主题: TexasHoldem版 - Prob Quests (baozi)
This is PROB quest ONLY; not how-to-play best quest.
Only PROB concern. You get PROB first and then decide what to do with
consideration on the villian style.
M********g
发帖数: 717
3
来自主题: TexasHoldem版 - Prob Quests (baozi)
It seems harder than i originally thought:
1. 4*(9-1)=32 cards from 2-9. suppose 2 in his hand, and another 2 to hit,
and no other low cards in the mucked hands(which is of course almost
impossible), the prob to have set or quads is: 1- C_28^4/C_30^4) = 1-20475/
27405=.25
if suppose 10 2-9 cards in those mucked 7 hands(reasonable assumption), and
the set mining guy still has 2 outs for the set: 1- C_18^4/C_20^4) = 1-3060/
4845=.368
if 1 out for the set: 1- C_19^4/C_20^4)=1-3876/4845*.2
So i wi... 阅读全帖
p******e
发帖数: 756
4
来自主题: Quant版 - 关于risk neutral prob一问
其实是一个面试题,ATM call option,binomial tree,S0=100,ST=110 or 90,很显
然,risk neutral prob应该是0.5对0.5,然后这个call的价格应该是5。
下面问题来了,面试官问如果公司做了细致的research,然后发现,ST变成110的概率是
0.8,变成90的概率是0.2。怎么justify这个neutral prob。我说你这个0.8/0.2的概率
不可能是准的,他说,没错,可能0.75/0.25,可能0.9/0.1但肯定不是0.5/0.5。然后又
变换了一下,说如果告诉你实际概率是0.8/0.2,现在call 的market price follows B
S model,那你应该short还是long。其实就是real world 和risk neutral怎么统一到一
起。最后他说这个在black scholes的paper里有介绍。有大牛能点拨一下么,我好像只
能知道这个risk neutral怎么来的。。。多谢
s**********y
发帖数: 353
5
来自主题: Quant版 - 关于risk neutral prob一问
写得罗嗦一些
假设risk-free rate是0,如果实际概率是0.8/0.2, 那么80%可能性call payoff是10
,20%可能性是0。虽然expected payoff 是8,但各个investor愿意承担的risk是不一
样的,risk-aversion的人可能4块钱才愿意买,risk-taking的人可能9块钱都愿意买。
所以并不能把这个call定价为8. 这个risk对应的是discount rate,每个人的discount rate都不一样,所以不能用real world prob来pricing。
但是如果用hedge的方法,long 0.5 share的stock,sell一个call,花费是50-call
price,你的payoff永远都是45,所以arbitrage-free price 是5,相对应的risk-
neutral prob是0.5/0.5, under which the returns of the stock and call are all risk-free rate 0. 如果call的价格大于5,long 0.5 sh... 阅读全帖
k****n
发帖数: 165
6
I'm wondering how you handle the cutoff point for your model (1).
Essentially every customer has a 2-dimensional vector. The first entry is
his prob to buy while the second one average $ spent.
One possible way to create a scaler statistic is to 1) calculate the
percentile of the average $ spent. 2) report p * w * q, where p is his prob
to buy, q is the quantile of his expect $ spent, w is your relative weight
given to miss a potential whale customer.
W***n
发帖数: 11530
7
来自主题: Automobile版 - Honda Accord 76k prob
thought a godcar won't have such prob
until at least 150K
W***n
发帖数: 11530
8
来自主题: Automobile版 - Honda Accord 76k prob
Got a Ford, also 76k
zero prob
d*****0
发帖数: 1500
9
来自主题: TexasHoldem版 - Prob Quests (baozi)
1) flop a set+ == 12%, say the probability of his giving up flop cbet is x%,
then the prob that he has set on turn P = 12% + (1-12%)*(1-x%)*2/45
if x == 50, p = 14%, if x == 0, p = 16%, if x == 33, p = 14.6%
2)假设bb 3bet against btn steal range 是ATs AJs KQs AQ AK and 99+,以及非常少
的air(忽略不计), 减去你block的A和K,一共3(ATs)+3(AJs)+3(KQs)+12(AQ
)+9(AK)+6*4(99~QQ)+3(KK)+3(AA)=60手
AA三手,所以我猜他有AA的概率是3/60大约5%,完全取决于BB的range。
请指正
o******u
发帖数: 60
10
Unquestionably,
there are a lot of freaking probs while talking with the USPS
such as
"PO box cant ask for a redelivery"
"sender cant make the redelivery call"
"you didnt waive the Sig"
"you have to call the PO office to waive the sig"
......
at least have to make 5 calls to get anything done here...
p*****k
发帖数: 318
11

one H is easy, the sum is exactly the taylor expansion of
-(p/q)*log(1-q), where p (or q) is the prob of getting H (or T).
for a fair coin, E[1/T] = log(2) ~ 0.69
case of two H's is a little messy. for a fair coin, i got:
E[1/T] = log(2) + log([sqrt(5)-1]/[sqrt(5)+1])/sqrt(5) ~ 0.26
anyone interested could help checking with monte-carlo
p*****k
发帖数: 318
12
来自主题: Quant版 - a prob problem
it's the prob generating function, as g(1)=1
just do Taylor expansion and get the coefficients:
g(s) = (1/3) * (1-2s^3/3)^(-1) = (1/3) * (1 + 2s^3/3 + 4s^6/9 + ...)
so p(X=2)=0 and p(X=3)=2/9
r*******y
发帖数: 1081
13
来自主题: Quant版 - 关于risk neutral prob一问
what is the interest rate?
risk neutral prob. also depends on the interest rate ?

率是
后又
B
到一
W*******d
发帖数: 63
14
来自主题: Quant版 - 关于risk neutral prob一问
Under risk neutral measure, all assets can be discounted with risk free rate
if using other measure, the option will have higher discount factor than
stock's df.
While stock's df can be easily derived as E(S(t1)/S(t0), the df for option
in real prob'
is not known. That is why risk neutral measure is used to price the option,
as value
of the opiton is the same under different measures.

率是
后又
B
到一
n*********e
发帖数: 318
15
------
Say, I have 10,000 customers and their data from a merchant.
Currently, I have successfully built two predictive models to predict for
each customer -
1) predicted prob. of a purchase (buy vs. no-buy)
2) expected spend $ of this customer given it is a buy
--------
In the end, I need to deliver just one score for my merchant client so that
they can approach their customers starting from top of the list (and working
down the list).
How should I construct a single score to combine both infor... 阅读全帖
h**********g
发帖数: 123
16
我的解法和他的类似。不知有帮助不:
x = Prob(A Wins)
y = Prob(A Wins | A's first is H)
z = Prob(A Wins | A's first 2 are HT)
x = Prob(A Wins)
= p*Prob(A Wins| A's first is H)
+ q*Prob(A Wins| A's first is T)
= p*y+q*(1-Prob(B Wins| A's first is T)
= p*y+q*(1-x)
y = Prob(A Wins|A's first is H)
= p*Prob(A Wins|A's first 2 are HH)+q*Prob(A Wins|A's first 2 are HT)
= p*1+q*z
Just consider first 2 tosses, A =HT means A's first two are HT
z = Prob(A Wins|A=HT)
= Prob(A Wins|A=HT, B=HT)*Prob(B=HT)
+... 阅读全帖
p**b
发帖数: 1808
17
来自主题: LES版 - 和妈妈的QQ对话,哈哈
妈妈 7:49:14
你胖啦注意啊
prob 7:49:21
我没胖,猪妈妈,呵呵
妈妈 7:49:42
胖啦我和爸爸都看出来了
prob 7:49:50
随你怎么说吧
prob 7:49:51
呵呵
prob 7:49:57
我去洗澡咯
妈妈 7:50:00
那脸蛋
prob 7:50:06
多好看的脸蛋
妈妈 7:50:09
注意
prob 7:50:13
你要是喜欢瘦脸的人的话。。。找去吧
prob 7:50:24
天天面对我爸,你没够啊
妈妈 7:50:29
别太胖啦,减肥困难啊
prob 7:50:38
啥时候打字不需要看键盘打字啊
prob 7:50:43
总低头,打字真慢
妈妈 7:50:46
够傻啊
prob 7:50:57
呵呵,我跟你长得是挺像的,呵呵呵
妈妈 7:51:00
嫁不出去可怕啊
prob 7:51:05
呵呵,放心
prob 7:51:07
肯定有人要我
妈妈 7:51:10
呵呵
prob 7:51:13
主要是我要不要人家
prob 7:51:26
我不要因为需要结婚而结婚
妈妈 7:51:26
不相信
s**********e
发帖数: 326
18
来自主题: JobHunting版 - 一个小题目
贴个我的代码:
evenProb have 50/50 probability to return true, genAnyProb can return true
with any prob(first parameter)
main should call genAnyProb like this: genAnyProb(0.6,1,0.00001)
public boolean evenProb() {
return new Random().nextInt(2) == 0;
}
public boolean genAnyProb(double prob, double base, double epsilon) {
if (prob * base < epsilon) {
return true;
}
if (prob == 0.5) {
return evenProb();
} else if (prob > 0.5) {
... 阅读全帖
p********n
发帖数: 20
19
来自主题: JobHunting版 - 报个offer@FG,回报版面
prob的那题:
借助于prob,可以如此进行算法:
设第k次调用prob前,目标区间是[a,b];k=1,2,…。k=1时a=0,b=1。对于这一次调用,
假想prob的工作方式是:随机一个[a,b]上的均匀分布数,如果这个数小于等于(a+b)/2
,则返回true;否则返回false。设x=a+p*(b-a),prob2的工作方式可假想为:随机一
个[a,b]上的均匀分布数,如果这个数小于等于x,则返回true;否则返回false。于是
可按两种情况处理:
(1) x <= (a+b)/2
如果调用prob返回true,表明prob产生的随机数在[a,(a+b)/2]之间,但无法确定这个
随机数是否在[a,x]之间;此时令a’=a, b’=(a+b)/2,继续在[a’,b’]上重复上面的
过程(第k+1次)。
如果调用prob返回false,表明prob产生的随机数在((a+b)/2,b]之间,必不可能在[a,x
]之间,此时prob2可以返回false。
(2) x > (a+b)/2
如果调用prob返回true,表明prob产生的随机数在[a,(a+b)/2]之间... 阅读全帖
p********n
发帖数: 20
20
来自主题: JobHunting版 - 报个offer@FG,回报版面
prob的那题:
借助于prob,可以如此进行算法:
设第k次调用prob前,目标区间是[a,b];k=1,2,…。k=1时a=0,b=1。对于这一次调用,
假想prob的工作方式是:随机一个[a,b]上的均匀分布数,如果这个数小于等于(a+b)/2
,则返回true;否则返回false。设x=a+p*(b-a),prob2的工作方式可假想为:随机一
个[a,b]上的均匀分布数,如果这个数小于等于x,则返回true;否则返回false。于是
可按两种情况处理:
(1) x <= (a+b)/2
如果调用prob返回true,表明prob产生的随机数在[a,(a+b)/2]之间,但无法确定这个
随机数是否在[a,x]之间;此时令a’=a, b’=(a+b)/2,继续在[a’,b’]上重复上面的
过程(第k+1次)。
如果调用prob返回false,表明prob产生的随机数在((a+b)/2,b]之间,必不可能在[a,x
]之间,此时prob2可以返回false。
(2) x > (a+b)/2
如果调用prob返回true,表明prob产生的随机数在[a,(a+b)/2]之间... 阅读全帖
c****e
发帖数: 1842
21
来自主题: LES版 - [合集] YK901 进来说说
☆─────────────────────────────────────☆
Kikyo (桔梗) 于 (Sat Apr 23 15:05:08 2011, 美东) 提到:
你为什么是个十万个为什么?你以为你是蔡明啊!
以下罗列你三个月来版上可查到的、曾经问过的问题:
1. 为什么p喜欢t,但是不喜欢男人?
2. 关于嫁不嫁人这个问题
3. 玩干你的脑细胞帖:les最怕什么?
4. 有没有les情侣是柏拉图的关系??
5. 如果经常有男的和你表白示爱,你怎么拒绝?
6. 版里有人相亲过么? 被家里逼迫
7. 第一次和t是不是也会疼?
8. 爱吃醋,占有欲强,算是缺点么
9. 先出柜,还是有伴侣再出柜好?
10.大家变成les的原因?
11.大家喜欢什么样的t?
12.大家最不喜欢什么样的
13.为什么条件稍微好点的t都喜欢单着?
14.一有时间就心情不好?
15.如何吸引一个你喜欢的人呢?
16.大家在约会的时候比较注意什么细节?
17.爱一个人会有什么表现??
18.两个人的关系之中出现什么是你无法忍受的?
19.大家习惯睡前做什么?枕边放什么?
20.忘记一个人有多
2... 阅读全帖
c********8
发帖数: 2
22
来自主题: Quant版 - [合集] 两个面试题(probability)
Define Y[n]=E{max(X[n],X[n+1], ...., X[30])}, then Y[n]=E(max(X[n],Y[n+1])).
prob[2]=1/36=0.0277778
prob[3]=2/36=0.0555556
prob[4]=3/36=0.0833333
prob[5]=4/36=0.111111
prob[6]=5/36=0.138889
prob[7]=6/36=0.166667
prob[8]=5/36=0.138889
prob[9]=4/36=0.111111
prob[10]=3/36=0.0833333
prob[11]=2/36=0.0555556
prob[12]=1/36=0.0277778
Y[30]=E(max(X[30]))=E(X[30])=7;
Recursively,
Y[n]=E(max(X[n],Y[n+1]))=sum{max(X[n],Y[n+1])*prob(X[n])}
Y[1]=11.1289
Y[2]=11.104
Y[3]=11.0784
Y[4]=11.052
Y[5]=11.025
Y[6]=10
p**e
发帖数: 41
23
另外第一题的后面几问我还做不出来,请大家帮我讨论讨论
1, a Random walk, starting from 0, will walk +2 steps with probability 0.5,
and -1 steps with probability 0.5, Q: calculate the
Prob(首达 -1)
Prob(首达 -k)
Prob(首达 1)
Prob(首达 2)
Prob(首达 k)
Answers:
as discussed before, let x = Prob(从点0出发,首达-1),y = Prob(从2出发,首达
-1)
then
x = 0.5 + 0.5 y
y = Prob(从2出发,首达-1)
= Prob(从2出发,首达1) * Prob(从1出发,首达0) * Prob(从0出发,首达-1)
= x^3
therefore we have
x = 0.5 + 0.5 x^3
solve is x = ( sqrt(5)-1 ) /2
so the answers to this question are
Prob
c*******g
发帖数: 71
24
my 2c.
This question is no different from the Monty Hall problem. Prob remains to
be 1/1000 in Q2 since removing 990 seats is independent of the prob of
correctly picking the prize seat in the beginning.
another way to think of it is:
1. the prob of being the prize seat is equivalent to the prob of winning if
you don't switch after removing 990 seats, which equals to prob(lose if
switching after 990).
2. prob(lose if switching after 990) is irrelevant to # seats removed, since
it equals to prob(... 阅读全帖
D********g
发帖数: 650
25
来自主题: JobHunting版 - 报个offer@FG,回报版面
prob那题,我的code:
static boolean prob() {
Random r = new Random();
if (r.nextDouble() < 0.5) {
return true;
}

return false;
}
static boolean prob(double p) {
double EPS = 1e-8;
if (p >= 1.0) {
return true;
}
if (p <= 0.0) {
return false;
}

int bitPos = 0;
while (p > EPS) {
bitPos ++;
p = p * 2; ... 阅读全帖
D********g
发帖数: 650
26
来自主题: JobHunting版 - 报个offer@FG,回报版面
prob那题,我的code:
static boolean prob() {
Random r = new Random();
if (r.nextDouble() < 0.5) {
return true;
}

return false;
}
static boolean prob(double p) {
double EPS = 1e-8;
if (p >= 1.0) {
return true;
}
if (p <= 0.0) {
return false;
}

int bitPos = 0;
while (p > EPS) {
bitPos ++;
p = p * 2; ... 阅读全帖
i****w
发帖数: 329
27
I found the informaiton is very uselful, while preparing for my RFE response
to Eb1a petition.
The original document link is as follows:
http://imminfo.com/Library/green_cards/EB/extraordinary_ability
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
The USCIS Adjudicator's Field Manual provides the following guidance to
center adjudicators:
(i) Special Considerations Relating to EB-1 Cases.
Certain alien beneficiaries are exempted from the labor certification
application process by virtue of their e... 阅读全帖
t***n
发帖数: 1494
28
来自主题: LES版 - [合集] 同性强奸。。。lol
☆─────────────────────────────────────☆
lkes (亦) 于 (Thu Nov 4 18:21:45 2010, 美东) 提到:
真的好笑,
这位同志也太那个,咋整个对面地,不是找麻烦。
☆─────────────────────────────────────☆
z22222222222 (一包子基金创始人) 于 (Thu Nov 4 18:27:13 2010, 美东) 提到:
就是有这么些个傻逼无聊,强奸女人自己还能爽?自己还是忍不住了还是怎样,不嫌丢
人。
☆─────────────────────────────────────☆
majia111 (majia111) 于 (Thu Nov 4 18:43:08 2010, 美东) 提到:
因为她不觉得那是强奸

☆─────────────────────────────────────☆
tnfan (无聊) 于 (Thu Nov 4 18:44:22 2010, 美东) 提到:
嗯,很败类的。该有法律制裁制裁。
☆───────... 阅读全帖
c****e
发帖数: 1842
29
来自主题: LES版 - [合集] 老婆,你在哪-5
☆─────────────────────────────────────☆
baqibaqibaqi (baqibaqibaqi) 于 (Tue Mar 1 00:43:04 2011, 美东) 提到:
多些各位前辈的意见,只是思前想后,标题还是别改了,改完之后就没办法排序号了。
不过换换风格吧,前面是有点儿酸文假醋,不过是心情急切,敬请各位包涵了,不过写
的正式一些,觉得无病呻吟总好过油嘴滑舌。
本人不高,1.64,偏瘦,不是很好看好看,也不至于对不起观众。绝对不会被形容成,
你长得很有骨气。
爱吃,不过怎么吃都不胖,总被周围的人嫉妒,哈哈。
喜欢旅游,没事儿就乱跑,实在抓不到人就自己开车转转。
喜欢打牌,这个简直无师自通。
喜欢看书,什么有内涵没内涵的,艰涩通俗的,觉得看书像吃东西,满汉全席当然好,
特色小吃也不能少,没有营养的零食也能打发时间。
没事儿也跑跑步,身体是革命的本钱。
比较有正事儿,毕竟生活艰难,les的路更难走,总不能有一天真找到了,一起喝西本
风吧。fl这地方,连风都没有。
反正呢,就是看上去普普通通一人,接触久了,觉得还挺好玩儿的。
当然,我咋说... 阅读全帖
t***n
发帖数: 1494
30
☆─────────────────────────────────────☆
tweety2006 (抵制日货) 于 (Fri Jul 1 02:50:54 2011, 美东) 提到:
麻烦给个逻辑解释,很好奇,同性恋是如何看待这个问题的。
另外说同性恋是天生的,那么麻烦给篇权威的研究表明同性恋是天生的。如果这只是一
种可能的话,那么父女,母子之恋可否也是可能天生的,那么父女,母子也可以结婚的

☆─────────────────────────────────────☆
suifeng (godhelpme) 于 (Fri Jul 1 03:02:20 2011, 美东) 提到:
瑞士可以
☆─────────────────────────────────────☆
suifeng (godhelpme) 于 (Fri Jul 1 03:04:03 2011, 美东) 提到:
但是那个貌似属于另外一个话题了,和异性恋婚姻不是一个level的 而同性婚姻和异性
婚姻是属于并列关系
☆──────────────────────────────... 阅读全帖
d*z
发帖数: 150
31

#define MINV -10
#define MAXV 30
double prob[MAXV-MINV+1];
double tprob[MAXV-MINV+1];
int main()
{
int i,j;
prob[10-MINV]=1.0;
for(i=0;i<20;i++){
tprob[0]=prob[0];
for(j=1;j<=MAXV-MINV-1;j++){
tprob[j-1]+=prob[j]/2.0;
tprob[j+1]+=prob[j]/2.0;
}
tprob[MAXV-MINV-1]+=prob[MAXV-MINV]/2.0;
memcpy(prob,tprob,sizeof(tprob));
}
printf("%.13f\n",prob[0]);
}
w********r
发帖数: 290
32
来自主题: Quant版 - 问两道probability的题

is
sigma2
1) Given x, min{x,a}=x with prob.P, or a with prob. (1-P). So E[min{x,a}]=E{
E[min{x,a}|x]}=E{P*x+(1-P)*a}=P*mu+(1-P)*a, where P=prob{x ].
2) Given x & y, min{(a-x)^+, (y-b)^+}=(y-b) with P1, or (a-x) with P2, or 0
with P3. Then E[min{(a-x)^+, (y-b)^+}]=P1(mu2-b)+P2(a-mu1), where P1=prob{x>
=a,y>b}+prob{y-b>a-x>0}=int_p1{f_x,y(u,v)dudv}; P2=prob{x=
y-b>0}=int_p2{f_x,y(u,v)dudv}; P3=prob{x>=a,y<=b}=int_p3{f_x,y(u,v)dudv}. p1
, p2, and p3 are indicate
p**e
发帖数: 41
33
2, a Random walks, starting from 0, will walk +1 steps with probability p,
and -1 steps with probability 1-p, Q: calculate the
Prob(首达 0)
Prob(首达 1)
Prob(首达 k)
Prob(首达 -1)
Prob(首达 -k)
A: 经典random walk: as discussed before on the board, let x = Prob(从1出发
,首达0),y = Prob(从-1出发,首达0)
then
Prob(从0出发,又首达0) = px + (1-p)y
and we also have
x = (1-p) + p x^2
y = p + (1-p) y^2
solve these equations:
x = 1 when p<0.5
(1-p)/p when p>0.5
y = 1 when p>0.5
p/(1-p) when p<0.5
therefor
k*****y
发帖数: 744
34
来自主题: Quant版 - 问一个面试题,关于概率的
int main()
{
const int N = 63;
const int MAX = N + 6;
double prob[ MAX+1 ];
double ans[ MAX+1 ];
double visit[ MAX+1 ];
for( int ith=0; ith<=MAX; ++ith ){
prob[ ith ] = ( ith>=1 && ith<=6 ) ? 1./6 : 0;
ans[ ith ] = 0; visit[ ith ] = 0;
}

for( int runtime=2; runtime<=MAX; ++runtime ){
for( int ith=MAX; ith>=0; --ith ){
if( ith <= N) prob[ ith ] = 0; // reset if the state is
transient

for( int num=1;... 阅读全帖
W**********E
发帖数: 242
35
来自主题: Statistics版 - 一个混合型联合分布的问题
试一下
Prob(X>Y)=Sum P(X>Y, Y) from y=0 to n;
=Sum P(X>Y|Y)P(Y) from y=0 to n;
then P(X>Y)=(1-P+exp(-a)*P)^n
Simulation check:
> prob.actual<-prob.theory<-numeric(1000);
>
>
> for(k in 1:1000){
+
+ ###rate a=2;
+ n<-100000;
+ x<-rexp(n,2)
+ ###binomial m=20, p=0.2;
+ m<-20;
+ p<-0.2;
+ y<-rbinom(n,m,p);
+
+ prob.theory[k]<-(1-p+exp(-2)*p)^m;
+
+ prob.actual[k]<-sum(x>y)/n
+
+ }
>
> mean(prob.theory)
[1] 0.02242923
> mean(prob.actual)
[1] 0.02241922
c*****e
发帖数: 737
36
来自主题: JobHunting版 - 报个offer@FG,回报版面
1 #include
2 #include
3 #include
4
5 int prob()
6 {
7 return rand() % 2;
8 }
9
10 int prob(double req_, double has_)
11 {
12 int a = prob();
13
14 if (req_ == has_)
15 return a;
16 else if (req_ > has_)
17 {
18 if (a == 1)
19 return a;
20 else
21 return prob(req_ - has_, has_ / 2);
22 }
23 else
24 {... 阅读全帖
c*****e
发帖数: 737
37
来自主题: JobHunting版 - 报个offer@FG,回报版面
1 #include
2 #include
3 #include
4
5 int prob()
6 {
7 return rand() % 2;
8 }
9
10 int prob(double req_, double has_)
11 {
12 int a = prob();
13
14 if (req_ == has_)
15 return a;
16 else if (req_ > has_)
17 {
18 if (a == 1)
19 return a;
20 else
21 return prob(req_ - has_, has_ / 2);
22 }
23 else
24 {... 阅读全帖
w****x
发帖数: 14
38
来自主题: JobHunting版 - G家onsite 随机数一题
下面这个应该是对的,思路是边用二叉树走blacklist,边生成随机数(在leaf上)。
int getnumber(int n, vector& bl) {
if (bl.size() > n) {
cout << " wrong, black list size error! ";
}

int low = 0, high = bl.size() - 1;
int os = 0, oe = n - 1;
double prob, u;
int length1, length2;
while (high > low) {
int mid = (high + low) / 2;
length1 = oe - bl[mid] - (high - mid);
length2 = oe - os - (high - low);
if (length2 > 0)
prob = (double) length1 / le... 阅读全帖
w****x
发帖数: 14
39
来自主题: JobHunting版 - G家onsite 随机数一题
下面这个应该是对的,思路是边用二叉树走blacklist,边生成随机数(在leaf上)。
int getnumber(int n, vector& bl) {
if (bl.size() > n) {
cout << " wrong, black list size error! ";
}

int low = 0, high = bl.size() - 1;
int os = 0, oe = n - 1;
double prob, u;
int length1, length2;
while (high > low) {
int mid = (high + low) / 2;
length1 = oe - bl[mid] - (high - mid);
length2 = oe - os - (high - low);
if (length2 > 0)
prob = (double) length1 / le... 阅读全帖
p****r
发帖数: 9164
40
来自主题: TexasHoldem版 - Run it twice in Rush
The following is copy&paste from the blog I posted before. Hopefully no
copyright issue.
Running it twice is great for risk-reverse. I really do not mind the
extra 1$ rake since I only do it a few times a day at most. Guess it is
worth more in NL 200 and NL 400. Unless you have unlimited BR(over 200bi),
this is great way to reduce variance. When you look at these high risk game
(Poker, stock etc) , EV is not the only thing you should consider, reducing
variance is very important as well... 阅读全帖
p****r
发帖数: 9164
41
来自主题: TexasHoldem版 - 问个基础数学问题
It is the same.
This is from the blog a of Ph.d student @ CMU CS, studying AI and
game theory in poker.
" In the previous examples we assumed the cards were dealt with
replacement; but in reality they are not. Does this change anything? It isn'
t obvious at all, but it turns out that your expected payoff is the same in
both settings.
Let P be the size of the pot.
Let p be the probability P1 wins the first hand.
Let w be the probability P1 wins the second hand given he wins the ... 阅读全帖
b*****d
发帖数: 7166
42
来自主题: Statistics版 - 问个条件概率的题
X,Y都是N(0,1)的standard normal分布,而且cov(X,Y)=0. Z=X+Y。
求Prob(X=x|Z=z)。
1. Prob(X=x|Z=z)=Prob(Y=z-x),得1/sqrt *(2Pi)exp(-(x-z)^2/2)dx
2. Prob(X=x|Z=z)=Prob(X=x, Z=z)/Prob(Z=z),
得 1/sqrt *(2Pi)exp(-(x-z/2)^2/2)dx。
根据1,当Z=z时, x的mean是z, 根据2, x的mean是z/2。 为什么结果会不一样? 谢
谢!
f*******e
发帖数: 1300
43
15年的single family house.下面是incpection report
LOTS & GROUNDS: WALKS
PROS: HEAVED/SETTLED CONCRETE WALK IS CREATING A TRIP HAZARD AT THE
FRONT RIGHT. '
SOLU: PROPERLY REPAIR/REPLACE THE WALK TO ELIMINATE THE TRIP HAZARD.
LOTS & GROUNDS: GRADING ,
PROS: NEGATIVE GRADE SLOPING TOWARD THE DWELLING AT THE BASEMENT.
SOLU: PROPERLY REGRADE LOW AREAS TO DIVERT WATER AWAY FROM THE FOUNDATION.
THE GRADE SHOULD SE SLOPED AT A RATE OF l inch PER FOOT Up, TO 6 FEET FROM
THE DWELLING USING A COMPACT CLAY TYPE ... 阅读全帖
z*****n
发帖数: 7639
44
来自主题: CS版 - 问一个CRC出错的概率
算出真正的CRC校验错误率是很麻烦的。
对于一个N比特的CRC校验码,它可以检测出所有字长
小于N比特的burst error。对于字长大于等于N比特的
错误,只有当错误字的polynomial可以被CRC生成码的
polynomial可以整除的时候,CRC校验failure才会发生。
所以CRC校验失败率是
\eta = (prob. of divisible error pattern)/(prob. of all error pattern)
当然,这两个probability都跟BER有关。
举个简单例子,如果G(x)=x+1 (两位CRC generator,
一位冗余码,等同于parity校验),3位信息比特。
总字长4比特。BER=p。
出现1比特错误的概率是C(4,1)*p,
prob. of 2-bit error = C(4,2)*p^2,
prob. of 3-bit error = C(4,3)*p^3,
prob. of 4-bit error = C(4,4)*p^4,
All 1-bit errors can be correctly detected, ... 阅读全帖
a*****g
发帖数: 19398
45
来自主题: Programming版 - 计算围棋棋盘合法图案的源代码
#!/usr/bin/env pike
// legal.pike - Count the number of legal go boards.
// Copyright 2005 by Gunnar Farneb?ck
// [email protected]
/* */
//
// You are free to do whatever you want with this code.
//
//
// This program computes the number of legal go board configurations
// for a rectangular board of a given size. It is efficient enough to
// handle boards up to 8x8 within minutes and up to 11x11 in less than
// 24 hours (on a fast computer). For rectangular boa... 阅读全帖
f*****x
发帖数: 2748
46
来自主题: Mathematics版 - 搞概率的给参谋参谋,投哪
什么时候Ann Prob混这么惨了。
论影响因子JRSSB 可能高点,但Ann Prob几乎属于数学
范畴,玩的就是清高;而JRSSB 老实说给人鱼龙混杂的
感觉,里面好文章不少,但平庸的文章也非常多。统计
里面四大杂志,Ann Stat,JASA, JRSSB, Biomatrica,
地位差不多但侧重点不一样。 Ann Prob 的地位应该是
和Ann Stat一样的,同一本杂志分出来。很多人可以操
JRSSB, 但有几个人玩得起Ann Prob。
看你的摘要感觉投Ann Prob挺合适,你甚至可以考虑纯
数学领域的顶级杂志。
a*****g
发帖数: 19398
47
来自主题: Mathematics版 - 计算围棋棋盘合法图案的源代码
【 以下文字转载自 Programming 讨论区 】
发信人: ananpig (●○ 围棋数学一把抓的安安猪), 信区: Programming
标 题: 计算围棋棋盘合法图案的源代码
发信站: BBS 未名空间站 (Fri Jan 22 10:39:02 2016, 美东)
#!/usr/bin/env pike
// legal.pike - Count the number of legal go boards.
// Copyright 2005 by Gunnar Farneb?ck
// [email protected]
/* */
//
// You are free to do whatever you want with this code.
//
//
// This program computes the number of legal go board configurations
// for a rectangular board of a given size. It is ef... 阅读全帖
s*********k
发帖数: 1989
48
来自主题: Quant版 - One probability problem
Say 3 ppl(N=3), the prob. you get your own present back is 1/3(N=3).
Then the prob no one get own present = 1- prob (1 ppl get own back)
-prob(2 get own back) -prob(3 get own back); p(N-1)=p(N)
That is it, right?
g****n
发帖数: 6
49
来自主题: Quant版 - 问道题目
why? what is the solution to the question?
hard to understand why it is the case p = K-S_t.
it is a good way to explain. But it is not true.
Because prob( senario 2 ) is not equal to prob(senario 3).
prob(senario 3) = N( d_1)
d_1 = [ log( S_t/ S_t) + (r+ 1/2*vol^2) T ] / [ vol * sqrt( T) ]
= [ 0 + 0 + 1/2*vol^2 T ] / [ vol * sqrt( T) ]
= 1/2 vol * sqrt( T) >0
prob(senario 3) = N( d_1) > 1/2
but prob(senario 2) = 1 - N( d_1) < 1/2
发信人: nevergum (em), 信区: Quant
标 题: Re: 问道题目
发信站: BBS 未名... 阅读全帖
g****n
发帖数: 6
50
来自主题: Quant版 - 问道题目
why? what is the solution to the question?
hard to understand why it is the case p = K-S_t.
it is a good way to explain. But it is not true.
Because prob( senario 2 ) is not equal to prob(senario 3).
prob(senario 3) = N( d_1)
d_1 = [ log( S_t/ S_t) + (r+ 1/2*vol^2) T ] / [ vol * sqrt( T) ]
= [ 0 + 0 + 1/2*vol^2 T ] / [ vol * sqrt( T) ]
= 1/2 vol * sqrt( T) >0
prob(senario 3) = N( d_1) > 1/2
but prob(senario 2) = 1 - N( d_1) < 1/2
发信人: nevergum (em), 信区: Quant
标 题: Re: 问道题目
发信站: BBS 未名... 阅读全帖
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)