Undergrad How do I express that a 100% occurrence in a small sample is low "confidence"?

Click For Summary
SUMMARY

This discussion focuses on expressing the confidence of a 100% occurrence in small sample sizes, specifically comparing two experiments: Experiment A with 2 successes in 2 trials and Experiment B with 100 successes in 100 trials. Both experiments yield a frequency of 100% and a 95% confidence interval of (1, 1). However, the results from Experiment B are statistically stronger. The Bayesian approach using a beta distribution reveals that the credible intervals differ significantly, with Experiment A yielding a 95% credible interval of 0.368 to 1.000 and Experiment B yielding 0.971 to 1.000.

PREREQUISITES
  • Understanding of binomial distributions and confidence intervals
  • Familiarity with Bayesian statistics and credible intervals
  • Knowledge of beta distributions as conjugate priors
  • Basic proficiency in Python for statistical calculations
NEXT STEPS
  • Learn about Bayesian analysis and its applications in statistics
  • Explore the properties of beta distributions in depth
  • Implement statistical simulations in Python to visualize credibility heatmaps
  • Study Laplace's formula and its relevance in probability theory
USEFUL FOR

Statisticians, data scientists, researchers conducting experiments, and anyone interested in understanding the implications of sample size on confidence intervals and statistical inference.

Archosaur
Messages
333
Reaction score
4
TL;DR
How do I express that a 100% frequency occurrence in a small sample is low "confidence", when, strictly speaking, its 95% confidence interval is (1,1)?
In experiment A: I observe an event 2 times in 2 trials.
In experiment B: I observe an event 100 times in 100 trials.

In both cases, I calculate a frequency of 100%
In both cases, I calculate a 95% confidence interval of (1, 1).

But intuitively the result of experiment B is "stronger" than that of A. How can I express this as a number?
 
Physics news on Phys.org
Archosaur said:
TL;DR Summary: How do I express that a 100% frequency occurrence in a small sample is low "confidence", when, strictly speaking, its 95% confidence interval is (1,1)?

In experiment A: I observe an event 2 times in 2 trials.
In experiment B: I observe an event 100 times in 100 trials.

In both cases, I calculate a frequency of 100%
In both cases, I calculate a 95% confidence interval of (1, 1).

But intuitively the result of experiment B is "stronger" than that of A. How can I express this as a number?

Assume a null hypothesis of whatever frequency you think is appropriate. 50% maybe. Then calculate the probability that such an experimental result is due to chance, ie. that your null hypothesis is true. This will usually be very close to zero in the second case.
 
  • Like
Likes Agent Smith
Or you could do a Bayesian analysis and the 95% credible interval would not be (1,1) in either case, but it would be quite broad in the low data case and quite narrow in the high data case
 
In the Bayesian case a beta distribution is the conjugate prior for a binomial random variable. The posterior is ##\beta(a+1,b+1)## where ##a## is the number of successes observed and ##b## is the number of failures observed.

From that you can calculate the credible interval. For ##(a=2,b=0)## we find that the 95% credible interval for ##\beta(3,1)## is 0.368 to 1.000. In contrast, for ##(a=100,b=0)## we find that the 95% credible interval for ##\beta(101,1)## is 0.971 to 1.000
 
  • Like
Likes Agent Smith
This is awesome. Thanks very much for pointing me to the Beta distribution - this is exactly what I was looking for. I made a python function that calculated frequency and "credibility" (1 - width of 95% credible interval) for O observations in N trials up to 100, because I was curious what a credibility heatmap would look like in this space.
credibility.png
 
  • Like
Likes Agent Smith, berkeman and Dale
Excellent! Personally, I think that this behaves as a reasonable person would expect. With just 2 observations it seems reasonable to say “I am pretty sure the probability is greater than 30%”. And with 100 observations it also seems reasonable to say “I am pretty sure the probability is greater than 96%”.
 
  • Like
Likes Agent Smith
Dale said:
In the Bayesian case a beta distribution is the conjugate prior for a binomial random variable. The posterior is β(a+1,b+1) where a is the number of successes observed and b is the number of failures observed.
This looks like Laplace's "formula" which he invented to answer the question "what is the likelihood that the sun will rise tomorrow?" If out of ##b## observations, the sun rose ##a## of those times, ##\text{P(sun will rise tomorrow)} = \frac{a + 1}{b + 1}##
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 24 ·
Replies
24
Views
5K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K