Solving a nonlinear equation with random variable
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
UPDATE
I would like to solve an eguation that looks like this
E[(R^(1-\gamma))*(rk+theta -rz)]=0 , where R=phi*rz+(1-phi)*(rk+theta) and phi is between zero and 1
theta, is a random variable normaly distributed with zero mean, and some variance sigma^2. Thus, the E[.] stands for the expectation operator over this random variable.
An alternative version, requires
E[(R^(1-\gamma))*(rk*theta -rz)]=0
where theta now, is lognormaly distributed with mean=1, and some variance.
The computational task, is to find phi, such as the condition/equation above holds, for some given numbers/values for rz,rk and gamma all of which are positive real numbers.
Can somone help me on this please ?
0 commentaires
Réponse acceptée
Roger Stafford
le 18 Oct 2014
Write a subfunction using matlab's function 'integral' whose input is a vector 'phi' and computes your expected value for each value of 'phi' in the vector. Then call on 'fzero' to adjust 'phi' so as to obtain a zero value for this expected value. For the purposes of integration, integrate with respect to 'theta' and multiply your integrand by its normally-distributed pdf. (Hopefully your integral will be convergent.)
2 commentaires
Roger Stafford
le 18 Oct 2014
The change you describe does not affect the generalized advice I offered. You need to compute the expected value of whatever expression you have for values of 'phi' using integration taken with respect to 'theta' in which you take into account its probability density function. You call on 'fzero' to so adjust 'phi' that this integral finally becomes zero. I have purposely left to you the details of how you should set up your integral.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Systems of Nonlinear Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!