Solving a nonlinear equation with random variable

1 次查看(过去 30 天)
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 ?

采纳的回答

Roger Stafford
Roger Stafford 2014-10-18
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 个评论
msh
msh 2014-10-18
Thx, Roger. Can you please check my updated answer and evaluate whether a similar procedure applies. The modification, involves that the random variable it also appears outside the nonlinear equation for R. I omitted this point in my initial statement.
Roger Stafford
Roger Stafford 2014-10-18
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by