• Support PF! Buy your school textbooks, materials and every day products via PF Here!

Monte Carlo methods

  • Thread starter 8614smith
  • Start date
here is the background information before the question:

For a function of x, y(x), the two probability distributions must satisfy [tex]\left|p_{y}(y)dy\right|=\left|p_{x}(x)dx\right|[/tex] and therefore

[tex]p_{y}(y)=p_{x}(x)\left|\frac{dx}{dy}\right|[/tex] where [tex]\int^{y_{max}}_{y_{min}}p_{y}(y)dy=\int^{x_{max}}_{x_{min}}p_{x}(x)dx=1[/tex]

Now, if we want to generate a particular probability distribution, [tex]p_{y}(y)=f(y)[/tex], and for simplicity let us assume that y(x) is a monotonically increasing function of x, then since x is a uniform deviate this implies

1[tex]x=\int^{y(x)}_{y(0)}f(y)dy=F[y(x)][/tex] [tex]\frac{dF}{dy}=f(y)[/tex] [tex]F[y(0)]=0[/tex] [tex]F[y(1)]=1[/tex]

so that,

[tex]y(x)=F^{-1}(x)[/tex] [tex]y(x_{max})=y(1)=F^{-1}(1)=y_{max}[/tex] [tex]F[y(x_{max})]=F(y_{max})=x_{max}=1[/tex]

Given a uniform deviate x (as described above) find y(x) such that the distribution function for y, [tex]p_{y}(y)[/tex], will be equal to f(y), and find the value of either [tex]y_{max}[/tex] or the normalization constant A for which [tex]p_{y}(y)[/tex] will be properly normalized in the range [tex]y_{min}<y<y_{max}[/tex].

(a) [tex]f(y)=Ay+1[/tex] [tex]y_{min}=0[/tex] [tex]y_{max}=2[/tex]; find A and y(x)

(b)[tex]f(y)=2y+4y^{3}[/tex] [tex]y_{min}=0[/tex]; find [tex]y_{max}[/tex] and y(x)

Attempt at the answer;

using 1 i have [tex]x=\frac{Ay(x)^{2}}{2}+y(x)[/tex]

substituting for [tex]x_{max}[/tex], which i guessed must be 1? as its the max probability which is unity.


putting in the limits of [tex]y_{min}=0[/tex] and [tex]y_{max}=2[/tex] into the integral gives;


is that correct? and how do i find y(x)??

using 1 and substituting the lower limit of [tex]y_{min}=0[/tex] i have [tex]x=y^{2}+y^{4}[/tex]

how do i go to find [tex]y_{max}[/tex] from here? i can put x = 1, but then i get stuck again as i can't get y(x) on its own to get a value for it.
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

Want to reply to this thread?

"Monte Carlo methods" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving