Suppose we have $n$ independent coins, each of which has an unknown and different probability of coming up heads. We have a magical machine that guesses the probabilities of each coin coming up heads. For $n=5$ coins, its guesses might look like 0.03, 0.45, 0.17, 0.91, 0.76
. Then we flip each coin once and record the results, which might be heads, tails, tails, heads, heads
. Our question: is there a statistical test that evaluates how accurate the machine is?
My first intuition was a chi-squared test like Pearson's or possibly a G-test, where our observed value is 1 if heads and 0 if otherwise. However, the data isn't categorical, nor do the observed values sum to a known constant. I also considered a Kolmogorov-Smirnov test to compare the expected with the observed, but neither are probability distributions.
I'm not sure how to phrase my preferences mathematically, but I'll try to do them qualitatively:
- edit: any prediction of, say, $p=0.5$ by the machine should be interpreted to say that the machine has evidence that 50% of coins with this probability will land heads and should be rewarded accordingly if the proportion of heads for coins with this probability is very close to 50%; it does not mean that the machine is clueless and ambivalent on heads/tails
- accuracy should be determined mostly on heads ratio: for instance, when the machine guesses 0.2 for every coin in a set, we should consider it accurate if 1 out of 5 landed heads or if 11 out of 50 landed on heads, but inaccurate if 3 out of 5 landed heads
- true probabilities might not be uniformly distributed from 0 to 1
- optional: accuracy should be reasonably tolerant of singular, highly unlikely events
Sorry if a similar question has been asked before—I'm very new to this site and statistics in general, but hopefully this question is clear enough.
Edit: As a response to a posted answer, we are not looking for Bernoulli proper scoring rules. To see why, suppose our machine predicts $p=0.5$ for all of 100 coins. In situation A, 50 coins land heads up, and in situation B, 95 coins land heads up. Clearly, the machine was a better predictor in situation A, which should be reflected in our test. However, the log-loss and Brier scoring rules, for example, each return the same score in both situations: $$\text{log-loss score, situation A}=-\frac{1}{100}\left(\sum_{n=0}^{50}\ln0.5+\sum_{n=51}^{100}\ln(1-0.5)\right)\approx0.69$$ $$\text{log-loss score, situation B}=-\frac{1}{100}\left(\sum_{n=0}^{95}\ln0.5+\sum_{n=96}^{100}\ln(1-0.5)\right)\approx0.69$$ $$\text{Brier score, situation A}=\frac{1}{100}\left(\sum_{n=0}^{50}(1-0.5)^2+\sum_{n=51}^{100}(0-0.5)^2\right)=0.25$$ $$\text{Brier score, situation B}=\frac{1}{100}\left(\sum_{n=0}^{95}(1-0.5)^2+\sum_{n=96}^{100}(0-0.5)^2\right)=0.25$$ The machine's predictions should be evaluated in aggregate. The machine's individual predictions should not be evaluated against its individual corresponding outcomes.