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

R与t分布(2) 累积分布函数

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

其中其中:是超几何函数

set.seed(1000)
x<-seq(-5,5,length.out=1000)
y<-pt(x,1,0)

plot(x,y,col="red",xlim=c(-5,5),ylim=c(0,0.5),type='l',
     xaxs="i", yaxs="i",ylab='probility',xlab='',
     main="The T Cumulative Distribution Function")

lines(x,pt(x,5,0),col="green")
lines(x,pt(x,5,2),col="blue")
lines(x,pt(x,50,4),col="orange")

legend("topleft",legend=paste("df=",c(1,5,5,50)," ncp=", c(0,0,2,4)), lwd=1, col=c("red", "green","blue","orange"))

结果如下:



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

相关推荐

Global site tag (gtag.js) - Google Analytics