import 4.code.about;

class Header {

public void title() {

String fullTitle = '/sci/';
}

public void menu();

public void board();

public void goToBottom();

}
class Thread extends Board {
public void Convolution of distributions(OP Anonymous) {

String fullTitle = 'Convolution of distributions';
int postNumber = 16143488;
String image = '1713946282106870.png';
String date = '04/24/24(Wed)04:11:22';
String comment = '1/2
Hello /sci/.
I was hit with an uncomplicated yet strangely unsolvable problem. I was doing other cotangent work when I found myself having to calculate the convolution of a product of 2 distributions for other later purposes.

[math] \theta_1 [/math] is a random variable uniformly distributed on [math] \left[ 0, 2 \pi \right] [/math] and so is [math] \theta_2 [/math].
[math] cos ( \theta ) [/math] would follow a distribution of the sort :
[eq] pr \left( X = cos ( \theta ) \right) = \frac{2}{\pi \sqrt{1-X^2}} [/eq]
given by the property : [math] pr \left( X = cos ( \theta \right) \vert d cos ( \theta ) \vert = pr \left( \theta_1 = \theta \right) \vert d \theta \vert [/math]

Now, let [math] \alpha [/math] be the random variable taking the values of [math] \frac{cos ( \theta_1 ) }{cos ( \theta_2 )} [/math].
My intuition, in order to find the adequate distribution, was to use convolution the way we usually do when we are met with variables of the sort [math] X = X_1 + X_2 [/math]. So I applied the following equation :

[eq]pr \left( \alpha = y \right) = \int pr \left( X_1 = x \right) pr \left( X_2 = \frac{x}{y} \right) dx [/eq]

The intergration bounds are determined according to the values of y. The primary condition is to set [math] \vert \frac{x}{y} \vert \in[0,1] \implies \vert x \vert \in[0,\vert y \vert] [/math]. Given than x sets already in the [math] [0,1] [/math] interval. The integration bounds are thus determined in such a way that :

[eq]pr \left( \alpha = y \right) = \int_{-\vert y \vert}^{\vert y \vert } pr \left( X_1 = x \right) pr \left( X_2 = \frac{x}{y} \right) dx \; \left( y \in[-1,1] \right)[/eq]
[eq]pr \left( \alpha = y \right) = \int_{-1}^{1} pr \left( X_1 = x \right) pr \left( X_2 = \frac{x}{y} \right) dx \; \left( y \notin[-1,1] \right)[/eq]

Picrel is the obtained function from the above calculations. A problem already arises here the function does not seem to converge to zero around infinity.'
;

}
public void comments() {
if(Anonymous && title=='undefined' && postNumber==16143494 && dateTime=='04/24/24(Wed)04:16:45'  && image=='actual_graph.png') {

'2/2

I run a small python program in order to find out the aspect of the distribution being searched. The program calls for [math]N[/math] number of iterations for two uniformly distributed variables, compute their cosines, the result of their division then bins the obtained values. Picrel is the new graph thrown out by the algorithm.
As you can see, it is substantially different and actually converges to zero around infinity without any singularity.

What would explain such a difference between the theoretical distribution and the actual one ?'
;

}

if(Anonymous && title=='undefined' && postNumber==16143496 && dateTime=='04/24/24(Wed)04:19:37') {

'>>16143488
Recitfying the original post since the [eq] environement does not seem to work.

eq1 : [math]pr \left( X = cos ( \theta ) \right) = \frac{2}{\pi \sqrt{1-X^2}} [/math]

eq2 : [math] pr \left( \alpha = y \right) = \int pr \left( X_1 = x \right) pr \left( X_2 = \frac{x}{y} \right) dx [/math]

eq3 : [math] pr \left( \alpha = y \right) = \int_{-\vert y \vert}^{\vert y \vert } pr \left( X_1 = x \right) pr \left( X_2 = \frac{x}{y} \right) dx \; \left( y \in[-1,1] \right) [/math]

eq4 : [math] pr \left( \alpha = y \right) = \int_{-1}^{1} pr \left( X_1 = x \right) pr \left( X_2 = \frac{x}{y} \right) dx \; \left( y \notin[-1,1] \right) [/math]'
;

}

if(Anonymous && title=='undefined' && postNumber==16143639 && dateTime=='04/24/24(Wed)07:06:26') {

'bump before nuke';

}

}
}