How to define the Conditional probability density function from a n-by-2 matrix ?

Dear all,
I am currently trying to define the probability density function P(X/Y<y).
I indeed have an n-by-2 matrix where column 1 gives values of X and column 2 gives matrix of Y. They are correlated (coef=0.5).
How can I define the conditional pdf P(X<x/Y<y) from this matrix ?
Thank you for your help!
Best
Laurène

 Respuesta aceptada

Maybe start with 'ksdensity' to estimate the joint pdf of x & y from your observed x,y pairs. Once you have a good numerical estimate of the joint density at each (x,y) pair, you should be able to estimate whatever you want from that.
It isn't entirely clear what you want to compute, though, because "conditional pdf P(X<x/Y<y)" looks like a conditional CDF instead of PDF. It might help to give a small numerical example to show what number you would like to get.

3 comentarios

Thank you Jeff for your answer.
To be more precise, I'm trying to solve an economic model where individuals choose their optimal effort e depending on a cost c and an ability a. I assume that a and c are drawn in a bivariate log-normal distribution: a and c are correlated.
Then individuals draw (a,c) but they observe only c and are able to know what is the distribution of a for them knowing the c they have drawn. To solve the model, I thus want to maximize a function of e which depends also on the distribution of a for each particular c.
If you have any idea on how to do that another way, please don't hesitate to tell me !
I know that to define a multivariate log-normal distribution I can use MvLogNRand(mean,sigma,Sims,CorrMat). But It only gives me a 2-columns matrix with random couple of a and c.
If you have any idea/comment I will take them, it will surely help me at this point.
Do you know the exact bivariate long-normal distribution of a and c (i.e., do you know the value of the correlation)?
If so, then you should be able to compute the marginal distribution of a for each particular c.
I don't really understand what you are trying to do, though, so I'm not sure how you could achieve it once you had this marginal distribution.
Sorry, Jeff. And how do you estimate the conditional distribution from the joint estimated by ksdensity?
Thank you.

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 23 de Oct. de 2019

Comentada:

el 20 de Nov. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by