# Setting the observation likelihood threshold for outlier detection if you know know the percentage of outliers

Let's assume I have a sensor that gives me measurements $$z$$ and I know that $$50\%$$ of the measurements I read are outliers (more than 3 standard deviations away from the real measurement distribution).

If I use the likelihood of the measurement to reject outliers (e.g. conditional probability of the likelihood given the predicted state in a particle filter $$p(z| x_t^m)$$), then is there a way to incorporate the knowledge that $$50\%$$ of my samples will be outliers in setting my likelihood threshold?

Is there a systematic way of setting a threshold for such a likelihood based outlier detection?

The standard deviation is strictly a symmetric distribution construct. Outlier is an arbitrary construct. If you really think that a normal distribution has some beautiful property for your particular situation, the only elegant way to deal with this situation is to model a mixture of distributions, say a normal and a $$t$$ distribution with low degrees of freedom. Here you have specified the mixing proportion of 0.5. If you fit the model using Bayesian methods you can get a posterior mixing probability as a result. But again everything is tied to the normal distribution being special, which it may not be for your situation.