How to compute a "luck percentile" from a set of random numbers or die rolls I think it's easiest if I start with my actual use-case:
In a video game (XCOM), soldiers shoot at aliens. When they do, they have a % chance to hit. Hitting deals damage.
I want to look at each shot fired in a match and produce a "percentile" measurement of how lucky the player was in the match.
I have done a bunch of computations surrounding "expected damage" vs "actual damage" which gives some interesting numbers (% of expected damage dealt), but I cannot figure out how to actually create the end result of a 0%-100% number representing the percentile of luck. The number would approach 50% as more shots are fired of course, but these matches typically only have 10-30 shots in them, and a string of bad/good luck is certainly possible within that sample size.
Here is an example data set that would be used:


*

*70% chance for 5 damage: hit

*30% chance for 6 damage: hit

*25% chance for 7 damage: miss

*90% chance for 5 damage: miss

*100% chance for 2 damage: hit

*50% chance for 10 damage: miss

 A: I will illustrate the process of determining what you call the "luck percentile" by a specific case:
Sergeant Joe fires ten shots, with success probability of $3/4$ on each shot.
He hits nine of the ten targets.  
Well, if you fire ten shots with probability $3/4$ of success on each, the number of hits will be distributed according to the binomial distribution, with $n=10$ and $p=\frac34$.  So the likelihood of each outcome of $k$ hits is
$$
\left( \frac34 \right)^k \left( \frac14 \right)^{10-k} \binom{10}{k}
$$
If you look at these numbers, the likelihood of ten hits is 5.6%, of none his it is 18.8%.  5.6% of people would be luckier than Joe; and you could count half of the people that matched Joe exactly, and say that his luck percentile is top 15%.
Notice, by the way, that your degree of luck is always distributed uniformly on $(0,1)$.  For example, if you fire a million shots and hit on $501,000$ of them, you are in the top 2.5% in terms of luck.
A: You measure the ratio $r$
$$
r = \frac{\text{hits}}{\text{shots}} \to p = \frac{P}{100}
$$
which approaches the probability $p$, expressed as percentage $P$.
