Created
February 15, 2013 09:44
-
-
Save rpcgen/4959409 to your computer and use it in GitHub Desktop.
Chart to explain Negative Binomial distribution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
png("chart_nevative_binomial.png", height = 300, width = 1000) | |
par(mfrow = c(1,3)) | |
barplot(dnbinom(0:25, 5, 0.4), ylim = c(0, 0.20), col = "blue", | |
ylab = "probability", | |
main = "p = 0.4") | |
barplot(dnbinom(0:25, 5, 0.5), ylim = c(0, 0.20), col = "blue", | |
ylab = "probability", | |
main = "p = 0.5") | |
barplot(dnbinom(0:25, 5, 0.6), ylim = c(0, 0.20), col = "blue", | |
ylab = "probability", | |
main = "p = 0.6") | |
dev.off() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment