I have a probability $P$ derived from:
- A random integer $A$ uniformly distributed on its range such that $A\in\left[0, 100\right]$
- An integer $K$ such that $K\in\Bbb N$
- A number $X$ such that $X\in\Bbb R$
- The relationship between $X$ and $K$ is unknown
$$P\left\{\left( A<K\right)\wedge\left( A>X\right)\right\}=P\left\{X<A<K\right\}=\frac{clamp\left[ clamp\left(K\right) -clamp\left(\lfloor X \rfloor\right) -1\right]}{101}$$
Where $clamp\left( X\right)$ is shorthand for $\max\left[ 0,\min\left( X,101\right)\right]$, i.e. $X$ is constrained within $\left[0, 101\right]$.
To learn more about $P$ and its result, you can read my previous question. $P$ represents a conditional branch in a program and the result is supposed to predict how often this branch will be true.
Preliminary question: I would now like to calculate the standard deviation for that probability. How do I do that ? I know it is the square root of the variance, but I'm not sure how to get variance in the first place.
Bulk of the question: Because standard deviation is going to be large considering the range of $A$ and the low amount of attempts, I will most likely want to reduce it. How should I do that ? Is it even possible to reduce the standard deviation when you deal with a uniformly distributed random number ?
The goal in the end is to provide a result for $P$ that will have a low standard deviation so that it should be reliable even with only $10$-$15$ rolls of this $101$-faced dice to which the constraints detailed earlier are applied. (The average of these $10$-$15$ attempts should always be very close to $P$, for any batch of $10$-$15$ attempts)
I get the feeling that standard deviation cannot be reduced without modifying the program, which sounds like it would defeat the purpose of using $P$ to describe it.