找回密码
 注册
查看: 1802|回复: 0

R语言:birthday()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 17:36:54 | 显示全部楼层 |阅读模式
birthday(stats)
birthday()所属R语言包:stats

                                        Probability of coincidences
                                         巧合的概率

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Computes answers to a generalised birthday paradox problem. pbirthday computes the probability of a coincidence and qbirthday computes the smallest number of observations needed to have at least a specified probability of coincidence.
计算广义的生日悖论问题的答案。 pbirthday计算巧合的概率qbirthday计算的观察,需要有至少一个巧合指定的概率最小。


用法----------Usage----------


qbirthday(prob = 0.5, classes = 365, coincident = 2)
pbirthday(n, classes = 365, coincident = 2)



参数----------Arguments----------

参数:classes
How many distinct categories the people could fall into
多少个不同类别的人可能落入


参数:prob
The desired probability of coincidence
巧合的期望概率


参数:n
The number of people
人数


参数:coincident
The number of people to fall in the same category
在同一类别的人数下降


Details

详情----------Details----------

The birthday paradox is that a very small number of people, 23, suffices to have a 50–50 chance that two or more of them have the same birthday.  This function generalises the calculation to probabilities other than 0.5, numbers of coincident events other than 2, and numbers of classes other than 365.
生日悖论是一个极少数人,23岁,只需有一个50-50的机会,两个或多个,其中有相同的生日。此功能可以推广的概率大于0.5,重合大于2的其他事件,以及其他数字类超过365的数字计算。

The formula used is approximate for coincident > 2.  The approximation is very good for moderate values of prob but less good for very small probabilities.
公式中使用的是coincident > 2近似。逼近温和prob但不太好非常小的概率值是非常好。


值----------Value----------


参数:qbirthday
Minimum number of people needed for a probability of at least prob that k or more of them have the same one out of classes equiprobable labels.  
的人的概率所需的最低数量至少probk或更多的人有相同的classes等概率的标签之一。“


参数:pbirthday
Probability of the specified coincidence.
概率指定巧合。


注意----------Note----------

Prior to R 2.14.0 the approximate formula was used even for coincident = 2.
在此之前的近似公式为R 2.14.0甚至是使用coincident = 2。


参考文献----------References----------

Methods for studying coincidences. J. American Statistical Association, 84, 853–861.

举例----------Examples----------


require(graphics)

## the standard version[#标准版]
qbirthday() # 23[23]
## probability of > 2 people with the same birthday[#> 2人生日相同的概率]
pbirthday(23, coincident = 3)

## examples from Diaconis & Mosteller p. 858.[#范例从戴康尼斯&Mosteller带够。 858。]
## 'coincidence' is that husband, wife, daughter all born on the 16th[#“巧合”的是,丈夫,妻子,女儿都出生在16]
qbirthday(classes = 30, coincident = 3) # approximately 18[约18]
qbirthday(coincident = 4)  # exact value 187[精确值187]
qbirthday(coincident = 10) # exact value 1181[精确值1181]

## same 4-digit PIN number[#相同的4位数的PIN号码]
qbirthday(classes = 10^4)

## 0.9 probability of three or more coincident birthdays[#0.9概率的三个或更多的重合生日]
qbirthday(coincident = 3, prob = 0.9)

## Chance of 4 or more coincident birthdays in 150 people[#150人,可能有4个或更多的重合生日]
pbirthday(150, coincident = 4)

## 100 or more coincident birthdays in 1000 people: very rare[#100或更巧合的生日,在1000人:非常罕见]
pbirthday(1000, coincident = 100)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-23 02:13 , Processed in 0.032704 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表