"Monte Carlo Methods for Finding y(x)

  • Thread starter 8614smith
  • Start date
  • Tags
    Monte carlo
In summary, Monte Carlo methods are computational algorithms that use random sampling to solve problems. They work by generating random samples and using statistical techniques to estimate a quantity of interest. These methods are commonly used to find values that are difficult to calculate analytically, and they have several advantages such as versatility and accuracy with a small number of samples. However, they may also have limitations such as being computationally intensive and potentially producing inaccurate results due to random variation. They may also be less effective for high-dimensional problems or those with complex variable dependencies.
  • #1
8614smith
54
0
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;

(a)
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.

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

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

[tex]-1=2A\Rightarrow{A=-0.5}[/tex]

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

(b)
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.
 
Physics news on Phys.org
  • #2






For part (a), you are correct in finding that A=-0.5. To find y(x), you can rearrange the equation x=\frac{Ay(x)^{2}}{2}+y(x) to get y(x) on one side and everything else on the other side. This will give you a quadratic equation in terms of y(x), which you can solve using the quadratic formula. Once you have y(x), you can use it to find y_{max} by plugging it into the equation y(x_{max})=y_{max}.

For part (b), you have correctly found the equation x=y^{2}+y^{4}. To find y_{max}, you can plug in x=1 and solve for y. This will give you two solutions, but only one of them will be within the range y_{min}<y<y_{max}. You can then use this value of y_{max} to find y(x) using the same method as in part (a).
 

FAQ: "Monte Carlo Methods for Finding y(x)

What are Monte Carlo methods?

Monte Carlo methods are a class of computational algorithms that use random sampling to solve various problems, such as finding the value of an integral or simulating complex systems. They are based on the idea of using random sampling to obtain numerical results instead of solving equations analytically.

How do Monte Carlo methods work?

Monte Carlo methods involve generating a large number of random samples, calculating a quantity of interest based on these samples, and then using statistical techniques to estimate the true value of the quantity. The more samples that are generated, the more accurate the estimate will be.

What is the purpose of using Monte Carlo methods for finding y(x)?

The purpose of using Monte Carlo methods for finding y(x) is to estimate the value of y at a given value of x, where the function y(x) is difficult or impossible to calculate analytically. Monte Carlo methods provide a way to approximate the value of y without having to solve complex equations.

What are the advantages of using Monte Carlo methods?

One of the main advantages of using Monte Carlo methods is that they can be used to solve problems that are difficult or impossible to solve analytically. They are also versatile and can be applied to a wide range of problems in different fields, such as physics, finance, and engineering. Additionally, Monte Carlo methods can provide accurate results with a relatively small number of samples.

Are there any limitations to using Monte Carlo methods?

Yes, there are some limitations to using Monte Carlo methods. One limitation is that they can be computationally intensive, requiring a large number of samples to obtain accurate results. Additionally, Monte Carlo methods are based on random sampling, so there is always a chance of obtaining inaccurate results due to random variation. They may also be less effective for problems with high-dimensional spaces or complex dependencies between variables.

Back
Top