`
jobar
  • 浏览: 340851 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

R与γ(伽玛)分布(2) 累积分布函数

 
阅读更多
其累积分布函数为:

set.seed(1000)
x<-seq(0,10,length.out=100)
y<-pgamma(x,1,2)

plot(x,y,col="red",xlim=c(0,10),ylim=c(0,1),type='l',
     xaxs="i", yaxs="i",ylab='density',xlab='',
     main="The Gamma Cumulative Distribution Function")

lines(x,pgamma(x,2,2),col="green")
lines(x,pgamma(x,3,2),col="blue")
lines(x,pgamma(x,5,1),col="orange")
lines(x,pgamma(x,9,1),col="black")

legend("bottomright",legend=paste("shape=",c(1,2,3,5,9)," rate=", c(2,2,2,1,1)), lwd=1, col=c("red", "green","blue","orange","black"))



plot如下:


  • 大小: 5.3 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics