Solving a nonlinear equation with random variable
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
msh
el 18 de Oct. de 2014
Editada: Star Strider
el 18 de Oct. de 2014
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 comentarios
Respuesta aceptada
Roger Stafford
el 18 de Oct. de 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 comentarios
Roger Stafford
el 18 de Oct. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Systems of Nonlinear Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!