5.2-2 What is the probability that you hire exactly twice
来源:互联网 发布:adobe xd mac 下载 编辑:程序博客网 时间:2024/06/05 18:43
Problem:
In HIRE-ASSISTANT, assuming that the candidates are presented in a random order, what is the probability that you hire exactly twice?
Anlysis
Observation 1: You have to hire the first person interviewed because the assumed number 0 condidate is the worst.
Then the answer is: what's the probability that you have hired one person x with rank(x) and have to hire another condidate?
Observation 2: If rank(x) = n, then the conditional probability will be 0;
Observation 3: if rank(x)=n-1, the the conditional probalibity will be 1;
Observatoin 4: if rank(x)=n-2, then the conditional probability will be ?
....
if rank(x) = rx, then the maximum condidates of all the condidates with rank > rx, ie n, must come before other condidates with rank>rx.
permutate all the remaining condidates P(all) = (n-1)! C(target) = P(all)/P(n-rx)*P(n-rx-1) = (n-1)!/(n-rx)!*(n-rx-1)! = (n-1)!/(n-rx), p(target) = c(target)/P(n-1)=1/(n-rx);
Then add up all the numbers above each multipied by the probability of the condition.
1/n * E{ 1 / (n-rx) } (rx:1 ~ n-1);
Optimized method for calculating the conditional probability for each case above:
the case is as follows: we have (n-1) condidates left, order of (n-rx) must be ordered that the n will be the first of the (n-rx) condidates. Assume that we have arrived at a situation where all other condidates has been put in a position, we have to position the (n-rx) condidates one by one with equal probability so that the order we randomly put the (n-rx) condidates will not matter, so we just put the critical rank n condidates first, what's the probability of he/she be put in the first of the left (n-rx) positions? Of course it's 1/(n-rx);
The final result is 1 / n * E{ 1 / (n-rx) } (rx:1 ~ n-1); The same as the above.
- What is the probability that you hire exactly twice?
- 5.2-2 What is the probability that you hire exactly twice
- What Exactly Is the Error?
- 10056 - What is the Probability ?
- 10056 - What is the Probability ?
- 10056 - What is the Probability --水题
- 10056 - What is the Probability ? 解题报告
- uva10056 - What is the Probability ?(概率是多少)
- uva 10056 - What is the Probability ?
- UVA - 10056 What is the Probability ?
- UVa:10056 What is the Probability ?
- UVa 10056 — What is the Probability?
- uva 10056 What is the Probability ?
- UVA10056 - What is the Probability ?(概率)
- What is the Probability - UVa 10056 概率
- UVA - 10056 What is the Probability ?
- UVA 10056 What is the Probability ?
- What exactly is read_rnd_buffer_size
- 生成互不相同随机数的一种算法
- 一次Oracle11g数据库导入Oracle10g数据库操作笔记
- 【OpenHW参赛手记】AXI初体验
- android:descendantFocusability用法简析
- [Ext JS 4]性能优化
- 5.2-2 What is the probability that you hire exactly twice
- 利用TortoiseSVN获取最新版本的OpenCV源码
- Away3D_Study1 建立基本的3D应用
- 提高你的Java代码质量吧:不要在常量和变量中出现易混淆的字母
- hibernate优化
- MyEclipse 2013 创建 Maven Project 报错 解决方案
- 自己研发的Android3D引擎开发的3d壁纸,欢迎大家拍砖~~
- JAVA远程访问共享目录
- 在android中使用图像资源 bitmap