Let there be a repeatable real world experiment with two outcomes denoted by $0,1$ for convenience (Tossing a coin for example). Let $X_i$ be the random variable that models the ith repetition of the experiment. It is an assumption of our model of that real world phenomenon that $X_1,X_2,X_3,...$ are independent identically distributed to $B(1,p)$. I noticed in all confidence intervals for $p$ I encountered so far, one basically throws away all information in the sample and only keeps track of the total number of 1(s) (Total number of heads in case of a coin).
I came up with the following confidence interval. First let me make clear my defintion of a confidence interval in case we are working with a sample of size $n$.
Defintion: A $1-\alpha$ confidence interval for the parameter $p$ above are random variables $L,U$ that are functions of our sample $X_1,X_2,...,X_n$ such that $P(L<p<U)\geq 1-\alpha$. It is almost similar to the defintion of my book.
Using this defintion, I proceed to design my own confidence interval. Suppose our sample size is even of size $n=2k$. Set $\overline{X}$ to be the average of $X_1,X_2,X_3,...,X_{2k}$, and set $\overline{Y}$ to be the average of $X_2,X_4,X_6,...,X_{2k}$ By Chebyshev inequality, we have the inequalities below: $$P(\overline{X}-\frac{1}{2\sqrt{k\alpha}}<p<\overline{X}+\frac{1}{2\sqrt{k\alpha}})\geq 1-\frac{\alpha}{2}$$ $$P(\overline{Y}-\frac{1}{\sqrt{2k\alpha}}<p<\overline{Y}+\frac{1}{\sqrt{2k\alpha}})\geq 1-\frac{\alpha}{2}$$ By Inclusion exclusion principle, we get: $$P(\overline{Y}-\frac{1}{\sqrt{2k\alpha}}<p<\overline{X}+\frac{1}{2\sqrt{k\alpha}})\geq 1-\alpha$$. Thus, we get a $(1-\alpha)$ confidence interval which is $]\overline{Y}-\frac{1}{\sqrt{2k\alpha}},\overline{X}+\frac{1}{2\sqrt{k\alpha}}[$ Ofourse one could even consider more interesting statistics (more interesting than $\overline{Y}$)from the sample like for example the number of occurrences of the strings $1,0,0,0,1$ in the data collected.
Question : Now suppose we use the above confidence interval with confidence 99% for the case of tossing a coin $2\times 10^{30}$ times and it happens that we get the sample realization $0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,.....$, then applying the confidence interval above that I designed will give approximately something like $0.999...<p<0.50001$. I am not sure how to interpret the result of this confidence interval in this case. Should the interpretation be that our model that $X_1,X_2,...$ independent identically distributed is not appropriate ? More generally, does it happen in the literature of statistics that the realization of $L$ happens to be greater than the realization of $U$ for some really critical sample outcomes ?
$$-----------------------------------------------------$$ Edit:
I added a picture of definition of confidence interval and a clarifying paragraph about it. Question: Let a sample be drawn and the realization of the random variables $L,U$ of the $1-\alpha$ confidence interval turns out to be $l,u$. What happens if $l$ happened to be strictly greater than greater than $u$ ? How does the statistician interpret the result ?
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Edit: One of the answers asked me to clarify my use of the inclusion exclusion principle:
$$P(\overline{X}-\frac{1}{2\sqrt{k\alpha}}<p<\overline{X}+\frac{1}{2\sqrt{k\alpha}})\geq 1-\frac{\alpha}{2}$$
$$P(\overline{Y}-\frac{1}{\sqrt{2k\alpha}}<p<\overline{Y}+\frac{1}{\sqrt{2k\alpha}})\geq 1-\frac{\alpha}{2}$$
Denote the event $\{\overline{X}-\frac{1}{2\sqrt{k\alpha}}<p<\overline{X}+\frac{1}{2\sqrt{k\alpha}}\}$ by $A$, and denote the event $\{\overline{Y}-\frac{1}{\sqrt{2k\alpha}}<p<\overline{Y}+\frac{1}{\sqrt{2k\alpha}}\}$ by $B$ . Denote the event $\overline{Y}-\frac{1}{\sqrt{2k\alpha}}<p<\overline{X}+\frac{1}{2\sqrt{k\alpha}}$ by $C$.
The result follows from noting that $A\cap B\subseteq C$, hence:
$$P(C)\geq P(A\cap B)=P(A)+P(B)-P(A\cup B)\geq 1-\frac{\alpha}{2}+1-\frac{\alpha}{2}-1=1-\alpha$$