对不起数学老师系列三

负二项分布(Negative Binomial Probability Distribution)
何谓负二项实验?
一个实验必须满足下列各条件,才能称为负二项实验。
1)某一个实验独立、重复地试行y次
2)每一试行均产生两结果:成功(Success)或失败(Failure)
3)每一试行成功的机率均为p,失败的机率为(1-p)或q
4)我们对出现第r次成功所经历的试行次数y有兴趣
负二项机率分布
The probability distribution for a negative binomial random variable Y is given by
p(y)={y-1 \choose r-1}p^rq^{y-r}(y=r,r+1,r+2,...)
其中
p=Probability of success on a single Binomial trail
q=1-p
y=Number of trails until the r^{th} success is observed

  • 负二项随机变数的平均数与变异数
    -平均数E(x)=\mu=\frac rp
    -变异数Var(x)=\sigma^2={rq\over p^2}

  • Example 1:To attach the housing on a motor,a production line assembler must use an electrical hand tool to set and tighten four bolts.Suppose that the probability of setting and tightening a bolt in any 1-second time interval is p=0.8.If the assembler fails in the first second, the probability of success during the second 1-second interval is 0.8 and so on.
    a)Find the probability distribution of Y, the length of time until a complete housing is attached.
    b)Find p(6).
    c)Find the mean and variance of Y.

  • Example 2:In an NBA championship series,the team which wins four games out of seven will be winner.Suppose that team A has probability of 0.55 of winning over the team B and both teams A and B face each other in the championship games.
    a)What is the probability that team A will win the series in six games?
    b)What is the probability that team A will win the series?

最近发现简书上有个人也在听唐老师的课,而且笔记写得非常好,从此转战不写笔记啦。偷个懒。
打卡吧
接下来是第5章 连续型随机变数
另外想起一个在看data.frame的时候,view(data)首字母要大写V
View(data)

为了画这个机率分布函数的图,费了我好大劲了,一顿百度,终于搞成。
1 首先百度了咋计算二项分布的概率
2 然后用ggplot作图发现histogram还有什么统计变换,总是提示'stat_bin'
绘图基本概念
3 这么看颜值的我最后一定要挑一个美丽的颜色!原谅绿色!色板

size <- 5
p <- 0.5
n1 <- c(0,1,2,3,4,5)
n2 <- dbinom(0:size,size,p)
data <- data.frame(n1,n2)
View(data)
library(ggplot2)
ggplot(data,aes(x=n1,y=n2))+geom_histogram(fill='#669900',stat='identity')
概率分布直方图

听课笔记


1
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • abbreviation 简写符号;简写 absolute error 绝对误差 absolute value 绝...
    沧海一睹阅读 4,991评论 0 2
  • Charpter 3 机率(Probability) 第一单元:机率概念之介绍 第一章与第二章介绍了一些统计量数。...
    lanct阅读 263评论 0 0
  • 1 基本概念 1.1 样本空间与随机事件 样本空间随机试验的所有可能结果构成的集合,记为S={e},e是样本点 随...
    深深睁开眼阅读 2,215评论 0 0
  • 3.3 概率分布 3.3.1 离散型随机变量 若随机变量的取值为有限个或可列个,则称此随机变量为离散型(discr...
    jlyq617阅读 783评论 0 3
  • 課程連結:台灣交通大學 統計學(一) Statistics I 唐麗英老師 [統計學筆記及整理] 第三章.機率(P...
    RJ阿杰阅读 2,810评论 1 4

友情链接更多精彩内容