Consider the unit disk: $D=\{(x,y)\in\mathbb{R}^{2}:x^2+y^2\leq 1\}$ and the lines $x=0$ and $y=0$. We want to find the probability to draw a line which intersect the first two with intersection points which are inside the disk. Of course a random line is chosen from the set of all the lines that intersect the disk and that the probability to choose a line is equal to the probability to choose a different line.
The initial situation is something like:
For example, the line $x=1$ does not even intersect the line $x=0$. On the other hand the line $y=3x+2$ intersects each of the 2 other lines but the intersection point between $x=0$ and $y=3x+2$ is $(-\frac{2}{3},2)\not\in D$. An example of a line which intersects the other 2 is $y=3(x-\frac{1}{10})$ as you can see in the figure below:
$y=3(x-\frac{1}{10})$" />
MY APPROACH:
I fixed $k\in[0,1]$ and I have considered the family of lines: $\{y=m(x-k):m\in\mathbb{R}\}$. The intersection between a generic line in the family and $x$-axis is $(k,0)$ while the intersection with $y$-axis is $(0,-mk)$. Of course we want $-1\leq -mk\leq 1$. Now we can call $\theta$ the angle between the generic line of the family and $x$-axis and we can note that we are interested in the case when $-\arctan(\frac{1}{k})\leq\theta\leq\arctan(\frac{1}{k}))$; for example if k = 1 the range for the angle is $-\frac{\pi}{4}\leq\theta\leq\frac{\pi}{4}$:
.
$\theta$ can takes values in $[-\pi,\pi]$ so the probability $P_k$ of drawing a line which passes through $x=k$ and intersect $x=0$ inside the disk $D$ is:
$P_k =\frac{2\arctan(\frac{1}{k})}{2\pi} = \frac{1}{\pi}\arctan(\frac{1}{k})$. Then integrating from $k=0$ to $k=1$ we have:
$$
P_{0\leq k\leq 1} = \int_{0}^{1} \frac{1}{\pi}\arctan(\frac{1}{k}) dk = \frac{\pi+\ln(4)}{4\pi}.
$$
And since the probabilities $P_{0\leq k\leq 1}$ and $P_{-1\leq k\leq 0}$ are the same, then:
$$
P = 2\int_{0}^{1} \frac{1}{\pi}\arctan(\frac{1}{k}) dk = \frac{\pi+\ln(4)}{2\pi} \approx 72\%.
$$
Since the result is somehow strange and since I'm following my first probability course I would like to know if this process is correct. Thank you in advance.
First, you have two errors in your calculation that cancel out. It should be obvious that $P_0 = 1$, that is, every line through $(k,0)$ when $k = 0$ is a line through $(0,0)$, which intersects both axes. But you have
$$ P_0 \stackrel?= \frac1\pi \arctan\left(\frac11\right) = \frac12. $$
There is a similar error for $P_1,$ which should be $\frac12$ but comes out to $\frac14$ according to your formula for $P_k.$ The source of this error appears to be that you considered $\theta$ as an angle that ranges from $-\pi$ to $\pi,$ which produces every possible slope $m$ twice (once for $\arctan m$, and once also for either $\pi + \arctan m$ or $-\pi + \arctan m$), but you counted each such slope only once when computing $P_k.$
The second error is that you compute the case $P_{0\leq k\leq1}$ as if it were a certainty that $0\leq k\leq1$; actually there is only $\frac12$ probability that $0\leq k\leq1,$ so you should multiply by $\frac12$ when adding $P_{0\leq k\leq1}$ and $P_{-1\leq k\leq0}$. Since one error gives you half as large a result as it should, and the other gives you twice as large a result as it should, the errors cancel out.
One way to avoid the error that doubles the probability is to compute the probability assuming that $0\leq k \leq 1$ and simply return that as your answer. In general, when you have $n$ equally likely cases for one of your parameters, and in each case the probability you are trying to calculate comes out the same by symmetry, then that probability is your total probability:
$$ P = \frac1n P_1 + \frac1n P_2 + \cdots + \frac1n P_n = \frac1n P_1 + \frac1n P_1 + \cdots + \frac1n P_1 = P_1.$$
The other flaw in your approach is that you do not actually allow all lines through the circle to be selected. For example, it is not possible to select any of the lines with slope $1$ between $y = x + \sqrt2$ and $y = x + 1,$ even though all of those lines intersect the circle.
Specifically, your construction rules out any line that passes through the circle but intersects the $x$ axis outside the circle.
So, two things:
A uniform distribution of angles makes good intuitive sense, but it is sufficient to distribute the angles uniformly over $\left(-\frac\pi2,\frac\pi2\right],$ because every line can be selected by exactly one angle in that interval, which is often a lot less confusing (and never more confusing) than selecting every line twice.
In order to choose a line "from the set of all the lines that intersect the disk", you should make sure that your construction actually can produce any line that intersects the disk.
One way to make sure you allow any line that intersects the disk to be selected is to choose the angle first and then set $k$ to the distance along a diameter perpendicular to the chosen angle. If you do that, you can calculate $P_\theta$ for any angle $\theta$; for $0 \leq \theta \leq \frac\pi4$ the probability that you intersect both axes within the circle is the probability that you intersect the $x$ axis there (because if such a line intersects the $x$ axis inside the circle then it also intersects the $y$ axis inside the circle). That probability is $$ P_\theta = \sin \theta. $$
Given that $0 \leq \theta \leq \frac\pi4$, therefore, the probability that your line intersects both axes within the circle is
$$ P = \frac{1}{\pi/4} \int_0^{\pi/4} \sin\theta \,\mathrm d\theta = \frac4\pi \left(1 - \frac1{\sqrt2}\right) \approx 0.372923. $$
But there are other ways you could choose a line from among all lines with angle $\theta$ passing through the circle. You could choose a point on the circle's circumference uniformly at random and take a line through that point, in which case the probability is $\frac14,$ or you could choose a point uniformly at random inside the circle, in which case the probability is approximately $0.45264.$
For a point chosen uniformly inside the circle, let $\theta$ be the angle between the line and the $x$ axis. For $0 \leq \theta \leq \frac\pi4$, the probability that the line intersects both axes within the circle is the probability that it intersects the $x$ axis, which is $1$ minus the probability it does not intersect the $x$ axis, which is the area of the portion of the circle between $y=-\sin\theta$ and $y=\sin\theta$ divided by the area of the whole circle. That is,
two circular segments of angle $2\theta$ divided by the area of the circle. That is,
$$ P_\theta = \frac{2\theta + \sin(2\theta)}{\pi}. $$
Following the same symmetry argument as for a point distributed uniformly over a perpendicular diameter,
$$ P = \frac{1}{\pi/4} \int_0^{\pi/4} \frac{2\theta + \sin(2\theta)}{\pi} \,\mathrm d\theta = \frac14 + \frac{2}{\pi^2} \approx 0.45264. $$