- #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.
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.