I'm getting a result I cannot explain when using beta distribution.
I've got a result which came from a binomial distribution: 2 successes in 6 trials. I would think the maximum likelihood estimator for p would be 2/6 = 0.33?
dbinom(0:6, 6, 0.33)
[1] 0.090458382 0.267324771 0.329168562 0.216170399 0.079853991 0.015732428 0.001291468
But, when I use the beta distribution, the highest point I get is at 0.25:
beta_df <- data.frame(PROB = seq(0, 1, 0.01), HEIGHT = dbeta(seq(0, 1, 0.01), 2, 4))
beta_df[which.max(beta_df$HEIGHT),]
beta_df[which.max(beta_df$HEIGHT),]
PROB HEIGHT
26 0.25 2.109375
I cannot get my head around this... am I misinterpreting the results, or calling either of these functions incorrectly? Thanks :)