I observe a binary string that contains both 0's and 1's like this one 100111101. However the true process that created these strings are either all 1's or all 0's. Due to technical errors and measurement errors I observe a string that contains both 0's and 1's. For example if there are no technical or measurement errors the above example string should have been 111111111 or 000000000. I am interested in inferring whether my observed string is truly all 1's or all 0's. In addition to classifying them into two groups I am also interested in a confidence measure that tells me how confident that it comes from all 1's scenario vs all 0's scenario.
Is there any statistical procedure that I can use to answer this type of question ?