Solving a nonlinear equation with random variable

1 view (last 30 days)
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 ?

Accepted Answer

Roger Stafford
Roger Stafford on 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 Comments
msh
msh on 18 Oct 2014
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 on 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.

Sign in to comment.

More Answers (0)

Categories

Find more on Systems of Nonlinear Equations in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!