I have nonlinear data of function y(x), which is let's say parabolic. At some points of x there are several y's (look at the picture).

enter image description here

Is it possible to train a probabilistic model to return several distributions (when needed) i.e. several means and variances. For example: when I feed a (x=a) to the model -> it returns 2 red distributions (2 means and 2 variances), and when I feed b (x=b) to the model -> it returns 1 blue distribution.


  • $\begingroup$ Interesting question! Can you flip x,y so that you have a proper function x(y). $\endgroup$
    – Peter
    Aug 26, 2019 at 17:40
  • 1
    $\begingroup$ For reference the function your trying to describe is a one to many function as in one x value gives many y values (if my a-level maths serves me correctly). It technically isn't a function as functions can't be one to many. $\endgroup$
    – Tasty213
    Aug 27, 2019 at 10:41

2 Answers 2


That data can be modeled as a statistical process, where the distributions and parameters change as a function of x. This is in contrast to modeling it as a typical statistical distribution which assumes the same distribution and parameters throughout a range.

The "a" range could be modeled as a bimodal distribution and the "b" range could be modeled as a unimodal distribution.


The conditional distribution of $Y$ when $X=a$ is bimodal. The mean is in the middle, and reporting it as such is correct (the mean of $1,2,3,91,92,93$ is indeed $47$).

This will be reflected somewhat in the variance being extremely wide. If you want to model a full distribution, you could consider quantile regression at many quantiles. I found this article on neural networks to predict multiple quantiles.

Such a quantile regression approach would, correctly, show that the conditional median is in the middle of the parabola, but then you’ll have a big jump to the, say, 45th and 55th percentiles before the quantiles bunch up around each mode.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.