r:binominalverteilung

n  <- 50
k  <- seq(0, n, by = 1)
dY <- 1/sqrt(n*p*(1 - p))
t <- (k - n*p)*dY

Bp01n50 <- dbinom(k, n, p)
bp01n50 <- Bp01n50/dY
Bp01n50df <- data.frame(k,t,bp01n50)

ggplot(Bp01n50df) +
  aes(t,bp01n50) +
  geom_col(width = dY, alpha = 0.1, fill = 'blue', color = 'black') +
  labs(x = "t", y = expression(B[0.1]^{50}~(K(t))/Delta~Y[50](K(t)))) +
  xlim(-4,4) +
  geom_line(color = "grey", size = 1.1) +
  geom_line(data = f01df, aes(tau, f01), color = "red", size = 1.1)

ggsave("Bp01n50.pdf", width = 15, height = 15, units = "cm")

  • Last modified: 2017/07/28 18:07
  • (external edit)