How to generate a probability of x given a value of y and a distribution? I have a bivariate data set where x and y values, both continuous variables, correlate well (visually speaking) when x and y are small. As the values of x and y increase, the correlation decreases to an eventual random state when x and y are large. My question is, given a y value, I would like to know the probability of the value of a given x. Should I generate a probability distribution for this data? 
I would very much appreciate any practical advice for Python in specific. 
 A: You might first explore fitting the data to a bivariate normal model.  And you'll want to evaluate  whether a bivariate model is sensible of course given your note about the decreasing correlation with larger values.  That's hard to interpret without more detail - if you have a lot of data for those higher regions then bivariate might not be a good idea, but if the data is sparse then you might remove for a cleaner model.  
I suggest trying a bivariate normal model because it has several simplifications which will support your goal: 


*

*You can fit the model by calculating just 5 simple parameters:  $\mu_X$, $\mu_Y$, $\sigma_X$, $\sigma_Y$, and the correlation coefficient $\rho$.

*And for a bivariate distribution the conditional distribution is itself a normal distribution.  Your core question -- how to state that if $y = \text{<some value>}$ then the probability of $x$ being in a range of values -- requires conditional distributions, and a normal conditional distribution is easily calculated from a bivariate normal model:
$$
\begin{aligned}
E[X | Y = y] &= \mu_X + ( \rho * (y - \mu_Y) * (\sigma_X / \sigma_Y))  \\
\text{Var}[X | Y = y] &= \sigma_X^2 * (1 - \rho^2)
\end{aligned}
$$

*With the conditional expectation and the conditional variance you now have the parameters for the (conditional) normal distribution - your new $\mu = E[X | Y=y]$ and your new stdev is equal to $\sqrt{\text{Var}[X | Y=y]}$

*And Peter Flom's point is spot on, its more intuitive to talk about the probability of $X$ being in a range of values, so specifically you want to use the cumulative form of the normal distribution for your conditional distribution.  


Regarding the python that's harder to say without knowing what you're using - but I suspect if you're able to plot out and examine your data to draw those conclusions then you also have basic statistical commands (via scipy / numpy) and can easily calculate the 5 parameters mentioned above.  With that it's just a matter of calculating the two formulas above. 
From there use something like scipy.stats to calculate the cumulative normal distribution values for given $\mu$ and stdev.  Don't try to program that function manually - it's doable but requires some rather arcane formulas! 
