TITLE: Find $P[2X > Y]$, normal distribution
QUESTION [1 upvotes]: As I am learning normal distribution, i encountered this problem..

Let $X,Y$ be independent normal $N(0,1), N(1,2)$ random variables, respectively. Find $P[2X > Y]$

what got me confusing is that there is a constant in front of $X$ like for instance, if this question asked $P[X > Y]$, I could easily have $P[X-Y > 0]$ and my new normal distribution would be $N(0-1,1+2) = N(-1,3)$ but with a constant in front of $X$ i don't know what my new normal distribution is going to be Any help would be great thanks!

REPLY [1 votes]: Comment. It seems to me the normal density in your Comment (of an hour ago) is not right. And you answer will disagree with @Did's hint (in my experience, not a good thing). I guess you are you using the notation in which the second argument of $N(\cdot, \cdot)$ is the variance.
Consider the following simulation of a million realizations of $Z$ in
R statistical software (where the second argument of norm is the SD). Perhaps it will help you check your work. Simulated results should be accurate to a couple of decimal places.
m = 10^6;  x = rnorm(m, 0, 1);  y = rnorm(m, 1, sqrt(2))
mean(2*x > y)
## 0.341477    # aprx P(2X > Y)
z = 2*x - y
mean(z);  var(z);  mean(z > 0)
## -0.9986545  # consistent with E(Z) = -1
## 6.00205     # consistent with V(Z) = 6
## 0.341477    # aprx P(Z > 0) = P(2X > Y)
pnorm(-1/sqrt(6))
## 0.3415457   # exact answ per @Did

Below is a histogram of the simulated distribution of Z. The PDF of
$N(\mu = -1, \sigma^2 = 6)$ is superimposed.
Your answer is the area to the right of the vertical dashed line.


TITLE: Boolean Simplification
QUESTION [1 upvotes]: I've been trying to simplify this equation:

$Y = (¬AB + ¬C)(¬A + ¬D)$

.. into this equation.

$Y  = ¬A¬C + ¬C¬D + ¬AB$

Unfortunately I keep going in circles with expanding and minimizing the booleans. Any tips or advice? Thanks.

REPLY [2 votes]: Use the following simplification:
$\neg AB(\neg A + \neg D) = \neg AB\neg A + \neg AB\neg D = \neg AB + \neg AB\neg D = \neg AB$.


TITLE: Probability of crossing between a line on a circle and a line segment inside the circle
QUESTION [4 upvotes]: Say that we have a circle centered in $(0,0)$ with a radius $R$. Inside the circle, we have a vertical line segment of length $2d$ in the center of the circle ($x_1=-d,x_2=d,y_1=y_2=0$). Now let's take two points on the circumference of the circle with angle $\theta_1,\theta_2$ and draw a line between them. You can see it better by the figure below.
My question will be what is the probability of having these two lines (the one at the origin and the random one). My first idea is to take $\theta_1,\theta_2$ from a uniform distribution and so I'll just need to find the condition for the crossing and I can then just integrate $\int\int d\theta_1 d\theta_2$ and this will be some function of $d/R$. Starting from this I could write that for this crossing to happen we should have $-d<y(0)<d$ where $y(x)$ is the line equation for the random line. I can then rewrite this condition as: $|\cos(\theta_1) \cot(\frac{\theta_1 + \theta_2}{2}) + \sin(\theta_1) |\leq \frac{d}{R}$.
Numerically, I can find this probability (I did two things, first I would take a large amount of random line about 10 million and see how many cross on average and change $d/R$ and see how it changes and the other was just to check with the condition above for all values of $\theta_1,\theta_2 \in [0,2\pi]$ and also average and both methods gives the same results). But I'm trying to find an analytical expression and I'm stuck here. My idea is to first fix $\theta_1$ then find a condition for $\theta_2$ and then integrate $\theta_2$ and afterwards integrate $\theta_1$ between $0,2\pi$ and this should in principle give me the probability, but I can't seem to find a way to express the integration condition for $\theta_2$, I tried doing it with Mathematica as well but it's not working out. Any help will be appreciated.
Also, if needed, here's the results that I got from numerics for the probability.

REPLY [3 votes]: A partial answer.
Let me first fix an arbitrary point $A$ on the circle. Let the two endpoints of the vertical segment be called $P$ (for $y=d$) and $Q$ (for $y=-d$). Extending the lines $AP$ and $AQ$ until they intersect the circle again I obtain the points $A_1$ and $A_2$ respectively. Note that for an arbitrary point $B$ on the circle, the line $AB$ will intersect $PQ$ if and only if $B$ is on the small arc $A_1 A_2$. Let me also denote the center of the circle by $O$.
We first assume that $0\leq \theta\leq\frac{\pi}{2}$ is the argument of the point $A$, i.e., that $A$ is in the first quadrant.
Now time for some geometry. Let me denote the angle $\widehat{PAO}$ by $\alpha$ and the angle $\widehat{QAO}$ by $\beta$ and $\phi:=\alpha+\beta$ will be the measure of the angle $\widehat{PAQ}$. Note that the triangle $\triangle A_1 OA$ is isosceles, so $\mu(\widehat{OA_1 A})=\alpha$. Similarly $\mu(\widehat{OA_2 A})=\beta$. By summing up the angles around the origin, it follows that $\mu(\widehat{A_1 OA_2})=2(\alpha+\beta)=2\phi$.
We are left to understand the function $\phi(\theta)$. We can restrict to the case $R=1$ by simultaneously scaling down $d:=\frac{d}{R}$. Consider the triangle $\triangle PAQ$. Clearly
\begin{equation*}
AP=\sqrt{cos^2(\theta)+(sin(\theta)-d)^2}=\sqrt{1+d^2-2dsin(\theta)}
\end{equation*}
and similarly
\begin{equation*}
AQ=\sqrt{1+d^2+2dsin(\theta)}.
\end{equation*}
Applying the cosine law in $\triangle PAQ$ we get $4d^2=2+2d^2-2\sqrt{(1+d^2)^2-4d^2sin^2(\theta)}cos(\phi)$ which after simplification implies
\begin{equation*}
\phi(\theta)=arccos\Big( \frac{1-d^2}{\sqrt{(1+d^2)^2-4d^2 sin^2(\theta)}} \Big),
\end{equation*}
assuming my computations are correct. Note that since $d\leq 1$, $0\leq\mu(\phi)\leq\frac{\pi}{2}$, so we are in the bijective domain of $cos$.
So, given a point $A(\theta)$ in the first quadrant, the probability of choosing $B$ such that $AB$ intersects $PQ$ will be $\frac{\mu(\widehat{A_1 O A_2})}{2\pi}=\frac{\phi(\theta)}{\pi}$. Note that by symmetry, we have the same probability whenever $A$ is in any of the other quadrants as well. Therefore the requested probability should be
\begin{equation*}
\frac{2}{\pi^2}\int_0^{\frac{\pi}{2}} \phi(\theta) d\theta.
\end{equation*}
I am not sure how easy it is to integrate this off the top of my head, but at least numerical methods should work for the relatively simple dependency.


TITLE: Prove that the following set is dense
QUESTION [6 upvotes]: It is hard for me to show that the set $\{\sqrt{m}-\sqrt{n}; m,n\in \Bbb N\}$ is dense in $\Bbb R$. Please help me.

REPLY [3 votes]: Hint: $\sqrt{k^2n+k^2}-\sqrt{k^2n}=\frac{k}{\sqrt{n}+\sqrt{n+1}}=\frac{k}{2\sqrt{n}+\sqrt{n+1}-\sqrt{n}}=\frac{k}{2\sqrt{n}+\frac{1}{\sqrt{n}+\sqrt{n+1}}}$

$$\sqrt{k^2n+k^2}-\sqrt{k^2n}=\frac{k}{2\sqrt{n}+\frac{1}{\sqrt{n}+\sqrt{n+1}}}$$

To show that the set is dense in $\mathbb{R}$, it suffices to estimate all rationals. To estimate the rational $\frac{p}{q}$:

Get a large natural number $m$. Now we consider the rational number $\frac{2pm}{2qm}$
Set $k=2pm$ and $n=(qm)^2$. It follows that $2\sqrt{n}=2qm$. Since $m$ is large, therefore $n$ would be large. Thus, the fraction $\frac{1}{\sqrt{n}+\sqrt{n+1}}$ that appears in the denominator would be negligible.


TITLE: Derivative of a vector with constant magnitude
QUESTION [1 upvotes]: I was reading the definition of work done in terms of a kinetic energy.
It read that when a force is applied to a particle moving with constant velocity v, its kinetic energy changes as follows:-
$$\frac{dK}{dt} = \frac{1}{2}\frac{d(m\vec v.\vec v)}{dt} = \frac{1}{2}\frac{d(mv^2)}{dt} = m\vec v\frac{d\vec v}{dt}$$
The speed of a particle does not change when the force applied on it is perpendicular to the velocity and as a result, the kinetic energy of the particle also doesn't change.
Hence the force acting on the particle must have a tangential component.
Therefore:-
$$\frac{dK}{dt} = \vec F.\vec v$$
My query:
I know that the symbol $\vec v$ represents velocity(which is a vector) and $v^2$ or $\vec v.\vec v$ is a scalar. But then why is $\frac{d\vec v}{dt}$ equal to zero when the force applied on a particle is perpendicular since the velocity clearly is changing,at least its direction is.

REPLY [0 votes]: \begin{equation}
\frac{d\tilde{v}}{dt} \neq 0.
\end{equation}
It is not necessary that the vector change in velocity be zero to prove constant Kinetic energy. If the Force is perpendicular to the velocity direction, then $\tilde{F} \cdot \tilde{v} = 0$, but $\tilde{F} \neq 0,$ in general. The other way to see this is
\begin{equation}
\frac{dK}{dt} = \tilde{F} \cdot \tilde{v} = \frac{1}{2} \frac{d}{dt} (v^2) = 0,
\end{equation}
if the speed is constant. Thus it's a matter of force being perpendicular to the motion, not zero.