# Estimating probability of event given marginal information for discrete random variables

Given two mutually exclusive events $$A$$ and $$B$$ where $$\mathbb{P}(X=A)=\alpha$$ and $$\mathbb{P}(X=B)=\beta\ \ (=1-\alpha)$$ suppose we want to estimate $$\alpha$$. However we are only given samples from $$(X,Y)$$ (without knowledge of whether $$X=A$$ or $$B$$) for the values $$C_k$$ where the marginals $$C_{A}=Y|X=A$$ and $$C_B=Y|X=B$$ satisfy

$$\mathbb{P}(C_A=C_k)=p_k=1/N,$$ (uniform) where $$k=1,...,N$$

$$\mathbb{P}(C_B=C_k)=q_k$$ for $$k=1,...,N.$$

Obviously if $$q_k$$ is close to $$p_k$$ for all $$k$$ we cannot estimate $$\alpha$$ since the later stage samples are identically distributed. But if $$q_k$$ and $$p_k$$ differ substantially you should get a good estimate. Is anyone aware of a documented solution for this problem, or feel they can come up with a good estimate?

It should be a well documented problem I expect but I am not that comfortable with sample bias statistics. The probability estimates should depend on the number of samples $$m$$ and the differences between the probabilities $$p_k$$ and $$q_k$$.

P.S. If anyone believes there is need for further clarification, please let me know. I am trying to mathematically interpret the problem of estimating the number of samples from one of two datasets and where each set takes values with different probability compared to each other.

• Your model is unclear. How are events $A$ and $B$ related? If they are not related in any way, inference is impossible; but you do not state their relationship. You also do not specify the relationship between $p_k$ and $q_k$. You also describe "binomial distribution probabilities" in the title but I see no reference to a binomial distribution in your question. Commented Aug 25, 2021 at 21:43
• $X$ is sampled from a binomial distribution correpsonding to events $A$ and $B$. $A$ is just uniform distribution, while $B$ is an arbitrary distribution. I am loosely calling these distributions, but I am really talking about the marginal distributions of $X$. Without $q_k$ differing from $p_k$ you shouldn't be able to make an estimate, so you may assume that $q_k\neq p_k$ for all $k$.
– asd
Commented Aug 25, 2021 at 21:45
• I still do not understand what you mean. Events are subsets of the space of elementary outcomes. They are not themselves random variables nor do they have a distribution. Commented Aug 25, 2021 at 21:47
• See the above comment. I was speaking loosely by calling them distributions, they are just events.
– asd
Commented Aug 25, 2021 at 21:48
• You need to provide a concrete example of your model; e.g., $X \sim \operatorname{Binomial}(10, 0.2)$, $A = \{0, 1, 2, 3, 4, 7\}$, $B = \{2, 4, 9, 10\}$, from which we can compute $\alpha$ and $\beta$; then $(C \mid X = A) \sim \operatorname{DiscreteUniform}(N)$, $(C \mid X = B) \sim ???$. Your use of terminology is not consistent with standard statistical practice. Commented Aug 25, 2021 at 21:56

I've thought about this more and if you look in the limit you can recover $$\alpha$$ exactly of course. The empirical probability you get from samples $$r_k:=\mathbb{P}_e(Y=C_k)$$ converges to the actual probability $$\mathbb{P}(Y=C_k)$$ by LLN.

$$\mathbb{P}(Y=C_k)=\mathbb{P}(X=A)\cdot\mathbb{P}(Y=C_k|X=A)+\mathbb{P}(X=B)\cdot\mathbb{P}(Y=C_k|X=B)$$

$$\mathbb{P}(Y=C_k)=\alpha/N+(1-\alpha)q_k$$

So if you look at the estimate $$r_k\sim\alpha/N+(1-\alpha)q_k$$ and solve for $$\alpha$$ you should get a good estimate:

$$\alpha\sim \frac{r_k-q_k}{\frac{1}{N}-q_k}.$$ The probability that $$\alpha$$ differs from this depends on the convergence behavior for LLN with discrete random variables $$(X,Y)$$. I guess this kinda thing is well-known by people, but I've forgotten what the optimal bounds are here.

• This last equation holding for all $k$ makes me wonder if you can actually solve for the $q_k$ without information about them (in the limit) if you have all of the $r_k$.
– asd
Commented Aug 26, 2021 at 0:00