This is labeled as soft-question, because I'm aware that I did not do enough work by myself. (I did, years ago and forgot nearly all of it).
I am doing a Bernoulli trial with a given number of trials, to find out if the probability of success is greater or lesser than 0.5 . (Why? See my note on background information below.)
Then I go to a site that computes the Wilson score interval for me, and if the interval does not include 0.5, I accept it.
If it does contain 0.5, I add some new trials, and this is where I am fooling myself: if the sample accidentally shows a good result despite the true probability is not on the side of 0.5 that shows up, I will stop.
How to approach this problem?
Background information:
I'm trying to recover data from a scratched dvd that reads differently nearly every time I read it (checked using md5sum). I split the file into really small chunks to check each separately (many versions of each, from different reads). Desperately, I look at the byte positions whit the least numbers of equal bytes, but even that proves difficult, so I break the bytes at that position down into bits, and count the versions where a bit position for a given byte position are equal, and if each bit position has a trustworthy probability, I collect those bits into a byte and force it into the sample chunks.