高手给看看这个问题
楼主 · 1 楼
请问版主,为什么没有用到题目中2.5的假设呢?
2 楼
| 引用 (songsong @ 2005年03月30日 20时19分) |
| 请问版主,为什么没有用到题目中2.5的假设呢? |
sorry……犯了低级错误……数字看错了,应该是:把2.5代入:
最后统计量的值是:7.56还是>>2的,也就是说结论还是“密码是非随机的”
至于为什么要用p<>0.26做备用假设而不是p=2.5/8做备用假设,是因为2.8/5是统计均值,只是p的一个无偏估计,因为是估计,所以我们无法确定那个本质的p是多少,所以只能用p<>0.26做备用假设,其实要否定随机性假设,只要p<>0.26就可以了,不用确定总体中的真实p是多少。
3 楼
多谢版主指教
4 楼
比较简单的方法是:
单位密码取lower case是服从b(1,p)的,所以500个人,每个人取8位密码,就是4000个b(1,p)相加,根据中心极限定理,服从N(4000p,4000p(1-p))。
原假设:H0: 密码随机,即:P=0.26
备择假设:H1:密码不随机,即: p<>0.26
构造统计量:\((\sum x_i - 0.26*4000)/\sqrt{769.6}\)
( ∑ x
i - 0 . 26 * 4000 ) / 769
. 6 这个统计量在 H0 下服从N(0,1)
把:\(\sum x_i=2.8*500=1400\) ∑ x
i = 2 . 8 * 500 = 1400
带入,得到统计量值为:12.97,明显大于3,因此原假设不正确。也就是说密码不是随机的。
单位密码取lower case是服从b(1,p)的,所以500个人,每个人取8位密码,就是4000个b(1,p)相加,根据中心极限定理,服从N(4000p,4000p(1-p))。
原假设:H0: 密码随机,即:P=0.26
备择假设:H1:密码不随机,即: p<>0.26
构造统计量:\((\sum x_i - 0.26*4000)/\sqrt{769.6}\)
把:\(\sum x_i=2.8*500=1400\)
5 楼
因为导师要求要用到statistical test但是我并不知道对于我这个题目来说那个statistical
test是合适的,我看过Handbook Applied Cryptograph书中(附件中是第五章的电子版)的5个基本statistical
test但是都觉得不是很合适,有没有高手能给指点一下呢?
6 楼
由于这里不能张贴2项式公式,和一些数学符号,所以我的思路和解题步骤在附件pdf文件中但是不知道是否正确,因为计算量有点大,麻烦各位高手给看一下。
7 楼
You should also look up statistical tests based on binomial
distributions.
Effectively they work as follows:
Suppose you have something which should occur with prob p
- e.g. Out of 100 characters (say) 26 are lower case. Therefore
for a random password the prob a char is lower case is p=0.26
Expected number of lower case letters in an 8 digit password is then
- 8*p = 2.08
Now suppose your survey has 500 responders and the average number of
chars which are lower case is 2.5
- The question is whether 2.5 is statistically different from
2.08 given this sample size, i.e. is 2.5 likely to occur by
chance as the average or is it too high compared to what one
would expect if passwords were chosen really randomly ?
You answer the above question with a statistical test
The reason for the binomial distribution is that, assuming passwords
are random (the null hypothesis), the distribution of lower case
letters should follow a binomial distribution with parameter p=0.26
(assuming only 100 chars are usable in passwords).
Effectively they work as follows:
Suppose you have something which should occur with prob p
- e.g. Out of 100 characters (say) 26 are lower case. Therefore
for a random password the prob a char is lower case is p=0.26
Expected number of lower case letters in an 8 digit password is then
- 8*p = 2.08
Now suppose your survey has 500 responders and the average number of
chars which are lower case is 2.5
- The question is whether 2.5 is statistically different from
2.08 given this sample size, i.e. is 2.5 likely to occur by
chance as the average or is it too high compared to what one
would expect if passwords were chosen really randomly ?
You answer the above question with a statistical test
The reason for the binomial distribution is that, assuming passwords
are random (the null hypothesis), the distribution of lower case
letters should follow a binomial distribution with parameter p=0.26
(assuming only 100 chars are usable in passwords).