I'm learning stats, and I've reasoned about this for many days and I'm losing sleep over it.
Say I have a binomial distribution B(k; n, p)
simulating a hypothesis p
value for some events:
B(14; 41, 0.5)
In R:
dbinom(14, 41, 0.5) #=> 0.016
So in English, this could be said as "the probability of exactly 14 successes in a series of 41 fifty-fifty events is about 1.6%. OK, makes sense (a poor hypothesis).
Now, lets try iterating over different p values using R:
p <- seq(0, 1, by = 0.01)
qplot(
x = p,
y = dbinom(14, 41, p)
)
This is clearly starting to form a shape of the probabilities for different probability values:
I understand this is not the "proper" way to do a beta distribution because of the fact that probability is continuous, and this graph needs to be integrated, it doesn't add up to 1, etc.
With that said... it seems the above chart IS perfectly "accurate", because each single value by itself is accurate.
Question 1: how IS the graph above "different" than a proper beta distribution in terms of what they describe in English?
- Incorrect beta distribution is saying (I think...) "For these 100 exact values, chart the probability (Y) that each probability (X) is correct"
- Correct beta distribution is saying (I think...) "For all possible values, chart the probability density (Y) that each probability (X) is correct"
Question 2: Are the charts related somehow? Like can they convert between them? It's clear from the incorrect chart I CAN compute a probability of a probability in a non-continuous way, yet in the second chart it appears there's no way I can do this unless I say something like p > 0.49 & p < 0.51)
. How can both charts be "correct" (to my knowledge) yet in the continous one the probability of choosing that item is 0, and in the non-continous chart I can compute it just fine?
qplot(
x = p,
y = dbeta(p, 14, 41)
)
dbeta(p, 14, 41)
code $\endgroup$ – Henry Jan 12 at 9:00