Akuna Easy Hire

Dishwasher Method

image-20220907005024444

derivative of $x^x$

Denote $y=x^x$, and take $\log$ on both sides. The derivative we need is $\frac{dy}{dx}$. And the answer is $x^x(\log{x}+1)$.

Second Largest Uniform

Three uniform random numbers between (0,1). What is the probability that the second largest number is smaller than 2/3?
import numpy as np
N = 10_000_000
sample = np.random.uniform(0, 1, (N, 3))
sample.sort(axis=1)
ans = sample[:,-2]
np.sum(ans < 2/3) / N

The simulation gives an answer of $0.740627$. How about the exact solution?

This is a type of order statistic problem. In the case of uniform random variables, suppose we have $U_1,U_2,\dots U_{(k)}$ uniforms from $0-1$ from low to high. Then,

$$ f_{U_{(k)}}(u)=\frac{n !}{(k-1) !(n-k) !} u^{k-1}(1-u)^{n-k} $$

In the problem set up, we have $n=3$ and $k=2$, therefore,

$$ \mathbb{P}\left(X_{(2)} \leq \frac{2}{3}\right)=\int_0^\frac{2}{3} \frac{3 !}{(3-2) !(2-1) !} x^{3-2}(1-x)^{3-2} d x=\frac{20}{27} $$

MGF of normal

$\mathbb{E}\left(e^{tX}\right)=e^{t^2}$, what is $\mathbb{E}\left(X^2\right)$?

Two ways to solve this.

  1. The first expectation is just the definition of MGF, use the standard way to solve by deriving $M’’(t)$ and set $t=0$.
  2. Notice that for a normal variable, it’s MGF is $\exp \left(\mu t+\sigma^2 t^2 / 2\right)$. Thus, $X\sim \mathcal{N}(0, \sigma^2=2)$, then the $\mathbb{E}(X^2)$ is just the variance, which is $2$.

Matrix Dimension

V, M are subspaces of X (7-dimensional). Also know that V and M are both 4-dimensional, what are possible dimensions of $V \cap M$?
$$ \begin{aligned} \operatorname{dim}(V \cap M) &=\operatorname{dim}(V)+\operatorname{dim}(M)-\operatorname{dim}(V \cup M) \\ &=8-\operatorname{dim}(V \cup M) \\ & \geqslant 8-\operatorname{dim}(X)=1 \end{aligned} $$

Normal Distribution

X and Y are two independent standard normals.
  1. $X+Y$ and $X-Y$ are independent also. (correct) Please check the covariance of them, which is $0$.
  2. $\mathbb{E}({\frac{X}{Y}})=1$ (incorrect) I think it should be $0$.

Idempotent Matrix

https://en.wikipedia.org/wiki/Idempotent_matrix

Carefully read the “properties” section.

Jensen’s Inequality

https://en.wikipedia.org/wiki/Jensen%27s_inequality

Taylor’s Series

https://en.wikipedia.org/wiki/Taylor_series

MGF

https://en.wikipedia.org/wiki/Moment-generating_function

Previous
Next