# Bernouilli ML parameter estimation from indirect observations

Suppose I have a coin with a probability $$p$$ for heads and $$1-p$$ for tails. My aim is to estimate $$p$$ using the max likelihood criterion.

I flip the coin several times but cannot directly observe the outcome. I observe an event $$e_t$$ for each flip (I use an index $$t$$ because the event is not the same for each flip of the coin) that can occur or not with probabilities depending on the outcome (heads or tails). I will call observations of $$e_t$$ indirect observations.

Suppose : $$P(e_t \mid \text{head})=h_t$$ and $$P(e_t \mid \text{tail})=t_t$$

I define the likelihood vector $$(a_t,b_t)$$ as:

$$(a_t,b_t)=(h_t,t_t)$$ if $$e_t$$ is observed

$$(a_t,b_t)=(1-h_t,1-t_t)$$ otherwise

My aim is to estimate $$p$$ given the vectors $$(a_t,b_t)$$ for $$1 \le t \le T$$. But I would also like that my estimation could be revised with each additional indirect observation without having to reparse all previous indirect observations. Of course I will be happy with an exact solution, but an approximation that would statistically converge to the correct $$p$$ when $$T \rightarrow \infty$$ will be fine too. That is, I suppose I want to build a component able to estimate $$p$$ and revise its estimation with new indirect observations with a limited memory. (I will need a kind of sufficient statistic that spares me from the need to memorize all my previous observations.)

Elements of resolution

we have : $$logLH(p)=\sum_tlog(p.a_t+(1-p).b_t)$$

So, a local maximimum is obtain for $$p=0$$ or $$p=1$$ or p such that :

$$G(p)=\sum_t\frac{a_t-b_t}{p.a_t+(1-p).b_t}=0$$

Eliminating useless $$t$$ where $$a_t=b_t$$ and writing $$x_t=\frac{-b_t}{a_t-b_t}$$ it takes a simplier form :

$$G(p)=\sum_t\frac{1}{p-x_t}=0$$

[1] $$p=0$$ is a local maximal if $$G(0) = -\sum_t\frac{1}{x_t} \lt 0$$

[2] $$p=1$$ is a local maximal if $$G(1) = \sum_t\frac{1}{1-x_t} \gt 0$$

Now, if we start with $$T=1$$, then [1] or [2] so the max LH is on a extrema ($$p=0$$ or $$p=1$$).

Suppose for instance, that [1] is true for $$T=1$$ , I can then memorize $$G(0)$$ so I will be able to check whether [1] is still true when a second undirect observation is available. If it is the case, then I can continue doing so. But when [1] becomes false, I don't know how I can do.

Of course, it is possible to solve the problem using a gradient ascent algorithm parsing all the whole indirect observations each time a new one is available. But that is what I would like to avoid.

• I don't see how it is possible for general $h_t$ and $t_t$. Maybe possible for some specific values. Apr 6, 2021 at 12:40
• That is likely. Anyway, I will be happy with an approximate solution. I will modify my question to make it clear. Apr 6, 2021 at 12:48
• Is this problem essentially one of misclassification, i.e. given the true outcome is "heads" there is a probability it will be recoded to tails, and similarly for "tails" flips? Apr 6, 2021 at 14:58
• Not really. Actually, I have simplified a problem of parameters estimation for a Markov Network when you learn parameters from uncomplete samples (see Koller and Friedman - Probabilistic Graphical Model - chapter 19). Currently, we are doing gradient ascent. It works fine but we can not update the parameters estimation with new data. We have to learn with the full sample of data. Apr 6, 2021 at 15:14

The model is a mixture of Bernoullis, with likelihood $$L(p)=\prod_{t=1}^n \{pa_t+(1-p)b_t\}$$ a polynomial of degree $$n$$ in $$p$$. Since this distribution is not an exponential family, there is no sufficient statistic of fixed dimension and hence no way to update the maximum likelihood estimator in the way you describe.

As an aside, the Bayesian estimation of $$p$$ allows for a sequential update of the posterior distribution, if one uses a particle filter. Bernardo and Giròn (1988) have an updating mecchanism that is quite simple but also very approximate:

@InCollection{    bernardo:giron:1988,
author        = "J.M. Bernardo and F.J. Giròn",
title         = "A {B}ayesian analysis of simple mixture problems",
booktitle     = "{B}ayesian Statistics 3",
pages         = "67--78",
publisher     = "Oxford University Press",
year          = 1988,
editor        = "J.M. Bernardo and M.H. DeGroot and D.V. Lindley and A.F.M. Smith"}

• I am not very familiar with particle filters. Though we use it as an algorithm for approximate inferences for complex Bayesian networks, I don't understand how it can help for bayesian parameter estimations. Maybe you mean estimating the posterior distribution over P and update it after each indirect observation ? Maybe we can consider it is as a beta distribution and consider indirect observations as lightweight direct observations ? Apr 6, 2021 at 14:25
• Particle filtering allows for the exploration of a sequence of distributions such as partial posteriors, each new observation modifying the weights of the particles (and inducing a resampling if the ESS gets too low). Since the correct posterior is a $2^n$ mixture of Beta distributions (when assuming a Beta prior), using a single Beta distribution would prove to be a poor approximation. Apr 6, 2021 at 14:29
• OK I thought naively that if the prior was a beta distribution, the posterior would remain in the same family. But it is obviously not true. Thanks for the article reference. In your idea of particle filter, what would be the nature of a particle ? a value of p ? Apr 6, 2021 at 15:01
• A particle filter is a dynamic collection of weighted simulations of $p$ representing the posterior distribution at time $t$. It gets updated by reweighting and usually random perturbations to aim at the next posterior distribution. Apr 6, 2021 at 17:09