The empirical probability of an event can be estimated as the number of times the event occurred $E$ divided by the total number of samples $N$.
For example rolling a dice 12 times if we see a 6 for 3 times we can say that $\hat p =P(x=6) = 3/12$.
How can I add in this model the confidence that I have in the estimated probability as a function of the samples size?
For example if $N = \infty$ then the confidence should be $1$ while if $N\sim 0$ the confidence should be 0 .
The main application I am looking for is to not overestimate the probability of certain events that may only be due to the small sample size. For example if you roll a dice twice and you get 2 times 6 you do now want to say that the probability of 6 is 100%.
A current simple solution that I am using is $\hat p = E / (N + K)$ where $K$ is predefined value. I am wondering if a better solution exists.