How can obtain a distribution function $f(x,y;s)$ that corresponds to this density plot?

65 Views Asked by At

In the code below (works in SageMathCell) I took a uniformly distributed random variable with support $(0,1)$ and did some operations. Then I generated $10,000$ points randomly sampled from the distribution (see below). I fixed the parameter at $s=.25$ in this plot.

def random_point(): 
   return ((exp(.25/ln(random()))), exp(.25/ln(random()))) 
l = [random_point() for k in [1 .. 10000]]
t= point2d(l,size=1.5,color='blue')
P=show(t, aspect_ratio='1')

enter image description here

I'm looking to formally define (obtain an expression) for a bivariate distribution, or surface, (unnormalized) from this plot. So, the more dense the points are in the plot should correspond to a higher point on the surface and less density should correspond to a lower point on the surface.

Furthermore as the parameter $s$ changes, where $s>0,$ the surface should change as well. I can visualize the surface and how it changes with the varying parameter.

How can I obtain a distribution function, say $f(x,y;s)$ that corresponds to the random points plotted?

2

There are 2 best solutions below

0
On BEST ANSWER

Let us define $\phi(x):=\exp\left(\tfrac{s}{\ln(x)}\right), \ \text{with} \ 0<s<1$.

One can establish that this function $[0,1] \to [0,1]$, whatever the value of parameter $s$

  • is decreasing.

  • is its own inverse,

as illustrated here :

enter image description here

Fig. 1 : Function $\phi$ for values of $s$ in [0.05, 1] by steps of 0.05. Case s=0.25 is featured in red.

The coordinates of the points can be described as :

$$(X,Y)=(\phi(U_1),\ \phi(U_2))$$

where $U_1,U_2 \sim I.U.D([0,1])$, (independent uniformly distributed on $[0,1]$).

The joint CDF of $(X,Y)$ is defined as :

$$F_{X,Y}(x,y)=P(X<x,Y<y)=P(\phi(U_1)<x,\phi(U_2)<y)$$

Due to the fact that $\phi^{-1}=\phi$ and that this function is decreasing :

$$F_{X,Y}(x,y)=P(U_1>\phi(x),U_2>\phi(y))=(1-\phi(x))(1-\phi(y))$$

Its pdf (probability density function) is obtained by taking the mixed second partial derivative :

$$f_{X,Y}(x,y)=\frac{\partial^2 F(x,y)}{\partial x \partial y}=\phi'(x)\phi'(y)$$

You will get a graphical representation of surface $z=f(x,y)$ by using the following SAGE code :

var('x y s')
s=1/4
f(x,y)=exp(-s/ln(x)-s/ln(y))*s^2/(x*y*(ln(x)^2)*(ln(y)^2));
t=plot3d(f,(x,0,0.75),(y,0,0.75), size=0.3, aspect_ratio=[10,10,0.1])
show(t)

with this result :

enter image description here

Fig. 2 : The theoretical pdf corresponding to your simulation. Its equation is given in the 3rd line of the program. Please note that we have truncated the domain of definition of $f$ because it isn't bounded in the vicinity of $(1,1)$.

Remark: One should note that function $\phi$ is conjugated to a function $\psi$ which is its own inverse :

$\phi=exp \circ \psi \circ exp^{-1}$ where $\psi(x)=\frac{s}{x}$

Therefore $\phi$ is its own conjugate also.

3
On

Area determination for two random real (0,1) by solving the the range intervall of the map

$$ x \to e^{1/(4 \log X)}) $$

$$ \text{Pr}\left[ (e^{\frac{1}{4 \ \log X }} \ \le \ x ,\ e^{\frac{1}{4\ \log Y }} \ \le \ y ) \right] = \text{Pr}\left[ 4 \log X \ \gt \ \frac{1}{\log x} , \ 4 \log Y \ \gt \ \frac{1}{\log y} \right]= \text{Pr}\left[ X \ \gt \ e^{\frac{1}{4 \log x}} , \ Y \ \gt \ e^{\frac{1}{4\log y} } \right] = (1-e^{\frac{1}{4 \log x}}) \ (1-e^{\frac{1}{4 \log y}}))$$