File:Beta-binomial cdf.png

Beta-binomial_cdf.png (480 × 480 pixels, file size: 4 KB, MIME type: image/png)

Summary

Description
English: Beta-binomial distribution cumulative distribution function (cdf)
Date 5/26/10
Source Own work
Author Nschuma
  1. Display the beta-binomial distribution cdf in png format for various values of alpha and beta and fixed n

require(VGAM)

create.beta.binomial.cdf <- function(N, alpha_v,beta_v,colour="black", pch=16) {

n <- max(length(N),length(alpha_v),length(colour),length(pch))
N <- rep(N,length=n); alpha_v <- rep(alpha_v,length=n)
colour <- rep(colour,length=n); pch <- rep(pch,length=n);labels=NULL 
add.one.series <- function(N, alpha_v,beta_v, colour, pch, maxN) {
  cdf <- pbetabin.ab(0:N, N, alpha_v,beta_v,log=FALSE)
  for (i in 1:N) lines (c(i-1,i), c(cdf[i], cdf[i]), type="s", col=colour)
  lines(c(N,maxN), c(1, 1), type="s", col=colour)
  points(0:N, cdf, col=colour, pch=pch)
}
par(lwd=1, cex=1, mar=c(5,4,2,2)+.1)
plot(x= c(0,max(N)),y=c(0,1),xlab=expression(italic(k)),
 ylab=expression(P(italic(X >= k))),type="n" ,main="")
 axis(1, at=0:(max(N)), lab=0:(max(N)),font.lab=5)
 
for (i in 1:n)
  add.one.series(N[i],alpha_v[i],beta_v[i],col=i,pch[i], max(N))
  

for(i in 1:n){ labels=c(labels,as.expression(bquote(paste(alpha==.(alpha_v[i]),", ", beta==.(beta_v[i])))))

}

legend("bottomright", inset=.05, title=paste("n=",max(N)),legend=labels

, pch=19,lty=1, col=1:n,bty="n") }

png("beta-binomial cdf.png") create.beta.binomial.cdf(10,c(.2,.7,2,600),c(.25,2,2,400)) dev.off()

Licensing

I, the copyright holder of this work, hereby publish it under the following licenses:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
You may select the license of your choice.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

image/png

a2df676355162b7e5512945098b9b49bd5881990

4,375 byte

480 pixel

480 pixel

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current23:09, 26 May 2010Thumbnail for version as of 23:09, 26 May 2010480 × 480 (4 KB)Nschuma~commonswiki{{Information |Description={{en|1=Beta-binomial distribution cumulative distribution function (cdf)}} |Source={{own}} |Author=Nschuma |Date=5/26/10 |Permission= |other_versions= }} # Display the beta-binomial distribution cdf in png forma

The following page uses this file:

Global file usage

The following other wikis use this file: