问:
Why does $^{-1}$ placed in front of many operations mean its inverse?
Is there a particular reason why functions, trigonometric operations, and matrices (e.g. $f^{-1}$, $\sin^{-1}$, $A^{-1}$) use a superscript negative-one to indicate the inverse? Trig operations can use alternatively an $a$ or longer version $\operatorname{arc}$  right before it to mean the same thing as the as $^{-1}$ right after it, but in the other cases I've only seen the superscript -1 used.  Is there is a logical, intuitive, historical, or otherwise sensical reason for it?

答: The idea is that, for example, $f^6(x)$ means $f(f(f(f(f(f(x)))))),$ so the superscript indicates how many times the operation is applied.


问:
Convergence of the logarithmic integral $\int_{0.5}^1\frac 1{\ln(x)} \,dx$
I computed the integral using Wolfram Alpha, and it gave me values in terms of the logarithmic integral, but I am unsure on how to prove convergence or divergence using analysis. So I want to prove that the following integral is convergent.     $$\int_{0.5}^1\frac 1{\ln(x)} \,dx$$
My approach was to first let $f(x)=-\frac1{\ln x}$ and $g(x)=-\ln x$ .

Since they are both positive on $[0.5, 1]$, by the Limit Comparison Test, we have that $$\lim_{x\to{\infty}}\frac fg= \lim_{x\to{\infty}}\frac {\frac{-1}{\ln x}}{{-\ln x}}= \lim_{x\to{\infty}}\frac{1}{\ln^2x} = 0$$

Since $\lim_{x\to{\infty}}\frac fg= 0$, we have that if $\int g$ converges implies $\int f$ converges. Since $\int_{0.5}^1-\ln x\,dx\approx 0.1535$ it is convergent, hence $\int f $ also convergent.

Finally, since $\frac1{\ln x}\lt \frac{-1}{\ln x}$ for $x\in [0.5, 1]$ then $\int_{0.5}^1\frac 1{\ln(x)} \,dx \lt \int_{0.5}^1\frac {-1}{\ln(x)} \,dx$

Ergo, $\int_{0.5}^1\frac 1{\ln(x)} \,dx$ is convergent.

答: Just put $u=\ln x\Rightarrow e^udu=dx\Rightarrow \int_{-\ln 2}^0 \frac{e^u}u du=\int_{1/2}^1\frac {dx}{\ln x}$. Since $e^u\ge 1/2$ over the integration range, we are essentially integrating $1/u$ close to $0$, so the integral diverges.

ContentLicense: CC BY-SA 4.0


答: To see that it does not converge, consider $1-\frac{1}{1-x}$. This function is greater than $\frac{1}{\ln(x)}$ for $x > 0$. And because $$\int_{\frac12}^1\left(1-\frac{1}{1-x}\right)dx$$ diverges to $-\infty$, so too does $$\int_{\frac12}^1\frac{1}{\ln(x)}dx$$

Title: Convergence of the logarithmic integral $\int_{0.5}^1\frac 1{\ln(x)} \,dx$

Body:
I computed the integral using Wolfram Alpha, and it gave me values in terms of the logarithmic integral, but I am unsure on how to prove convergence or divergence using analysis. So I want to prove that the following integral is convergent.     $$\int_{0.5}^1\frac 1{\ln(x)} \,dx$$
My approach was to first let $f(x)=-\frac1{\ln x}$ and $g(x)=-\ln x$ .

Since they are both positive on $[0.5, 1]$, by the Limit Comparison Test, we have that $$\lim_{x\to{\infty}}\frac fg= \lim_{x\to{\infty}}\frac {\frac{-1}{\ln x}}{{-\ln x}}= \lim_{x\to{\infty}}\frac{1}{\ln^2x} = 0$$

Since $\lim_{x\to{\infty}}\frac fg= 0$, we have that if $\int g$ converges implies $\int f$ converges. Since $\int_{0.5}^1-\ln x\,dx\approx 0.1535$ it is convergent, hence $\int f $ also convergent.

Finally, since $\frac1{\ln x}\lt \frac{-1}{\ln x}$ for $x\in [0.5, 1]$ then $\int_{0.5}^1\frac 1{\ln(x)} \,dx \lt \int_{0.5}^1\frac {-1}{\ln(x)} \,dx$

Ergo, $\int_{0.5}^1\frac 1{\ln(x)} \,dx$ is convergent.


问:
How do I sketch the following metrics:
In $\mathbb{R}^2$ sketch $B((1,2),3)$, the open ball of radius $3$ at the point $(1,2)$, with the following metrics:

a.) the post-office metric given by
$$d(x,y) = \left\{
  \begin{array}{l l}
     \sqrt{x_1^2+x_2^2}+\sqrt{y_1^2+y_2^2}, & \quad \text{if $x\neq y$}\\
     0, & \quad \text{if $x=y$}
   \end{array} \right.$$
for $x=(x_1,x_2), y=(y_1,y_2)\in\mathbb{R}^2$.

b.) the metric $$d(x,y)=\frac{5\| x-y\|_2}{1+\| x-y\|_2}.$$

答:
(a) circle of radius $\sqrt{0.58}$ centered at $(0,0)$

(b) circle of radius $\frac12$ centered at $(1,2)$

See here for the calculation in (b).

ContentLicense: CC BY-SA 3.0

Title: How do I sketch the following metrics:


答: I think it might also stem from the way we denote a multiplicative inverse in $\mathbb{R}.$ Heuristically, we may think of the composition of two functions as a sort of product, so if you have a function $f,$ you may simplify $f f^{-1} = f \frac{1}{f} = 1,$ where $1$ is the multiplicative identity of this product, i.e. the identity map. I hope this helps.

Title: Why does $^{-1}$ placed in front of many operations mean its inverse?

Body: Is there a particular reason why functions, trigonometric operations, and matrices (e.g. $f^{-1}$, $\sin^{-1}$, $A^{-1}$) use a superscript negative-one to indicate the inverse? Trig operations can use alternatively an $a$ or longer version $\operatorname{arc}$  right before it to mean the same thing as the as $^{-1}$ right after it, but in the other cases I've only seen the superscript -1 used.  Is there is a logical, intuitive, historical, or otherwise sensical reason for it?


问:
Counting dimension of hypersurfaces in $\mathbb{P}^3$ containing three disjoint lines
Assume $k$ is algebraically closed field of char zero.
Let $l_1,l_2,l_3$ be three disjoint lines in $\mathbb{P}^3_k $.
The dimension of the $k$-vector $\operatorname{Homog}_2
k[x_0, x_1, x_2, x_3]$ of degree $2$ homogeneous polynomials in
$4$ variables is $10$ by usual Stars and Bars trick. We can associate to every such homogeneuos
polynomial $P_2(x)$ of degree $2$ a hypersurface $H_{P_2} \subset
\mathbb{P}^3_k $ which equals on each affine chart $D(L)$ with linear polynomial $L= \sum a_i x_i$ the vanishing set
of points of the obtained polynomial after localization in $L$.

Question: Is there a combinatorical argument (in spirit of stars and bars trick) why
the subvector space of $\operatorname{Homog}_2
k[x_0, x_1, x_2, x_3]$ consisting of all homog polynomials of degree $2$ which have
associated hyperplanes containing all three disjoint lines
$l_1,l_2,l_3$ is non zero.

Can it be derived more cenceptionally?

Say we have an arbitrary point $p \in \mathbb{P}^3_k $ and a
line $l \subset \mathbb{P}^3_k $. What is the dimension of
subspace of $\operatorname{Homog}_2
k[x_0, x_1, x_2, x_3]$ which have associated hyperplanes
containing point $p$? Or the line $l$? Or both? If we know it how
to approach combinatorically this problem we can also ask the
natural question about the dimension of subspace of homog polynomials
which have hyperplanes contain two oder more points, lines
or more dimensional linear subspaces of $\mathbb{P}^3$?

Similary can such combinatorial argument be generalized to say $\mathbb{P}^n $, $\operatorname{Homog}_m
k[x_0, x_1, ..., x_n]$ with $m \le n$ and one asks what is the dimension of $k$-subspace of polynomials which have associated hyperplanes all containing certain linear subspace $L_1 \subset \mathbb{P}^n $ or some subspaces $L_1,..., L_r \subset \mathbb{P}^n $ simultaneously?

答:
This is a beautiful subject that gets hard very quickly. To answer your initial question: notice that if we fix a line $\ell \subset \mathbb P^3$, it meets every hyperplane; the intersection is either a point, or the entire line (obviously this latter case is when the line lies in the hyperplane). On the other hand, if we fix a point $p \in \mathbb P^3$, there is a codimension $1$ subspace of hyperplanes which contain $p$ (in the Grassmannian/dual projective space $\mathbb P^{3\vee} = \mathbb G(2,3) = G(2,4)$ of hyperplanes in $\mathbb P^3$). Since a different point $q$ determines a different codimension $1$ subspace, their intersection has codimension $2$. A third point results in a codimension $3$ linear space, which in $\mathbb P^3$ is a point: in other words, $3$ general points determine a $2$-plane, which you've known since high school.

The space of quadrics containing a given line $L$ can be computed by supposing that we have homogeneous coordinates $(W:X:Y:Z)$ on $\mathbb P^3$ such that $L$ is $W=X=0$. Then the equation for such a quadric has the form $Q = W\cdot L_1(W,X,Y,Z) + X \cdot L_2(W,X,Y,Z)$ where $L_1,L_2$ are linear forms. The (projective) space of linear forms is $3$-dimensional, so overall you have a $6$-dimensional space of quadrics containing $L$. This has codimension $3$ in the $9$-dimensional projective space of quadrics. Choosing two other general lines, you get two more codimension $3$ subspaces, so the intersection is codimension $9$ (codim. is additive over intersections of generic subspaces) a.k.a. dimension $0$, hence we get not just non-emptiness of the space of quadrics containing the three lines, but in fact that the quadric is unique.


问:
Formulating an if-and-only-if statement with linear programming
I'm trying to convert the following statement to a linear programming formulation.

$a=b$ if and only if $c=d$

All a, b, c and d are integers in the range 1..N.
Any help would be appreciated.

答:
Introduce binary variables $x_1,x_2,x_3,y_1,y_2,y_3$ and linear constraints:
\begin{align}
x_1 + x_2 + x_3 &= 1 \tag1 \\
(1-N)x_1 + 0x_2 + 1x_3 \le a - b &\le -1x_1 + 0x_2 + (N-1)x_3 \tag2 \\
y_1 + y_2 + y_3 &= 1 \tag3 \\
(1-N)y_1 + 0y_2 + 1y_3 \le c - d &\le -1y_1 + 0y_2 + (N-1)y_3 \tag4 \\
x_2 &= y_2 \tag5
\end{align}
Constraints $(1)$ and $(2)$ enforce $a=b \iff x_2 = 1$.
Constraints $(3)$ and $(4)$ enforce $c=d \iff y_2 = 1$.
Constraint $(5)$ enforces $x_2 = 1 \iff y_2 = 1$.


问:
Show that $(A, B) \text{ and } \left(\frac{X_1}{S_3}, \frac{X_1+X_2}{S_3}\right)$ have the same joint distribution.
We leet $X, X_1, X_2,...$ be iid with $\mathbb{P}(X>t) = e^{-t}$ for $t >0$. Let $S_n = X_1+\cdots+ X_n$. Now Let $U, V$ be independent uniform on $[0, 1]$ Let $A = \min(U, V)$ and $B = \max(U, V)$. Show that
\begin{equation}
        (A, B) \text{ and } \left(\frac{X_1}{S_3}, \frac{X_1+X_2}{S_3}\right)
    \end{equation}
have the same joint distribution.

My approach is that we have to verify for any constants $a, b \in [0, 1]$,

\begin{equation}
            P(A\leq a, B \leq b) = P\left(\frac{X_1}{S_3} \leq a, \frac{X_1+X_2}{S_3}\leq b\right)
 \end{equation}

Is there a simpler way to do this?

答:
The joint density of $(S_1,S_2,S_3)$ is
$$f(x,y,z)=e^{-x}e^{-(y-x)}e^{-(z-y)}=e^{-z}$$ for $0<x<y<z$ and zero elsewhere.
Integrating $dx dy$ we find the density of $S_3$ is $f_{S_3}(z)=z^2e^{-z}/2$ for $z>0$
(this is a $\Gamma(3,1)$ distribution, see [1]). Thus the conditional density of
$(S_1, S_2)$ given $S_3$  is the density ratio $2/z^2$ for $0<x<y<z$. In other words, given $S_3=z$, the pair $(S_1,S_2)$ is uniformly distributed  on the triangle
$\{(x,y): 0<x<y<z \}$. It follows that, given $S_3=z$, the pair
$(S_1/S_3,\, S_2/S_3)$ is uniformly distributed  on the triangle
$\{(x,y): 0<x<y<1\}$, with constant conditional density 2. Since this distribution does not depend on $z$, it is also the (unconditional) joint distribution of  $(S_1/S_3,\, S_2/S_3)$. Clearly, this is also the joint distribution of $(A,B)$. See also Theorem 6.6(d) in [2].

[1] https://en.wikipedia.org/wiki/Gamma_distribution

[2] https://www.stat.purdue.edu/~dasgupta/orderstats.pdf


问:
Equivalence of norms: existence of a global constant?
Any two norms $\|\cdot\|_p$ and $\|\cdot\|_q$ on a finite dimensional vector space $V$ are equivalent which means that there exist constants $C_1$ and $C_2$ such that
$$C_1\|\cdot\|_q \leq \|\cdot\|_p \leq C_2 \|\cdot\|_q$$
and vice versa
$$C_1'\|\cdot\|_p \leq \|\cdot\|_q \leq C_2' \|\cdot\|_p$$
for (potentially?) different constants $C_1'$ and $C_2'$.

Suppose I tell you that $\|v\|_p \leq K$ for some $v \in V$ and arbitrary choice of norm $\|\cdot\|_p$.

Does there exist a global constant $\mathcal{G}$ depending only on $V$ such that

$$\|v\|_r \leq  \mathcal{G}\, K$$
for all possible choices of norm $\|\cdot\|_r$ on $V$ ?

答: Given a norm $\|\cdot\|_p$ we can take any constant $G >0$ and define a norm $$\|w\|_{p’} =G\|w\|_p$$ So you can’t find such $\mathcal G.$


问:
Is my probability formula correct?

The Question

The response rate to telephone polls is around $2{\%}$. Of people who
respond to telephone polls, currently about $40{\%}$ approve of the
President. Suppose we perform a telephone poll by calling a random
sample of $50,000$ registered voters.

(a) Let $X$ be a binomial random variable representing the number of
people who respond to the telephone poll. What is the expected value
and standard deviation of $X$?

(b) Let $Y$ be a binomial random variable representing the number of
people who respond to the telephone poll and approve of the President.
What are the expected value and standard deviation of $Y$?

(c) Use R to find the probability that at least $420$ people respond
to the telephone poll and approve of the President. Give your R code.

My Understanding

This is my thought process:

For 1a, $X \sim \mathscr{B}(N, P)$, $N$ being the $50,000$ registered voters and $P$ being the $2\%$ (rate at which people are answering polls), so it would be $EV = 50000 * .02=1000$. The variance is $N * P *(1-P)$ so plugging in the numbers I would get $980$ and to get standard deviation it would just be the square-root of that so $31.3$

For 1b, it would be similar except replace $P$ with $40\% (.4)$, so the expected value would be $20,000$. The variance would be $50,000 * .4 * .6 = 12000$. Taking the square root would be $109.54$

Using R to find probability of at least $420$ people would just be dbinom(420, 50000, .02)

Please correct me if I am wrong, but I believe this is correct. Thank you in advance!

答:
The solution to 1a looks correct.

For 1b, you're right that its similar, but the proportion is not $40\%$. We're given that $Y$ represents the number of people who respond to the telephone poll and approve of the president. The probability that somebody responds and approves is

$$ P[\text{Respond} \cap \text{Approve}] = P[\text{Approve} | \text{Respond}]*P[\text{Respond}] $$
$$ = 0.40*0.02 $$
$$ = 0.008 . $$

So, we have $Y \sim \mathscr{B}(50000, 0.008)$. Then, the expected value is

$$ E[Y] = np = 50000*0.008 = 400 .$$

The variance is

$$ V[Y] = np(1-p) = 50000*.008*.992 = 396.8 , $$

which gives us a standard deviation of

$$ SD[Y] = \sqrt{V[Y]} = \sqrt{396.8} \approx 19.92 $$

For 1c, you don't want to use dbinom, it gives you the probability of a specific value of $Y$. If you used dbinom(420, 50000, .008), you'd end up calculating $P[Y = 420]$, but in this case, we want $P[Y \ge 420]$.

The more appropriate function in this case is pbinom (R documentation). Using that function, pbinom(k,n,p) results in the cumulative distribution up to and including the value of $k$. So, pbinom(k,50000,0.008) would be equal to $P[Y \le k]$. Then, since

$$ P[Y \ge 420] = 1 - P[Y < 420] = 1 - P[Y \le 419], $$

we have $k = 419$, and can calculate it with 1-pbinom(419,50000,0.008).

Title: Is my probability formula correct?


问:
Simple question on exact sequences.
I am just learning about abelian categories and I would like to hear some advice on how to think about the concepts of kernel, cokernel, image etc correctly; I am a bit confused. I am trying to prove the following, probably very easy result, but I am stuck.

Let $0\to A\to B\to C\to 0$ is a short exact sequence of complexes in an abelian category. Show that if two of the three complexes $A$, $B$, $C$ are exact, then so is the third.

Say $A$ and $C$ are exact, and denote the differentials of $B$ by $\beta_{n+1}:B_{n+1}\to B_n$. We need to prove that $\text{im}(\beta_{n+1})=\text{ker}(\beta_n)$. First of all, what does this equality mean? Does it mean we have to prove equivalence as subobjects (one factors through the other and vice versa)? Or do we need to just take the image and the kernel and prove they are equal as arrows (for example by a "pre-compositions with a monic are equal so the arrows are equal" argument)? - but then what is the domain of those arrows and is it the same for both the image and the kernel?

Or am I at a completely wrong path?

Any advice would be highly appreciated, thanks.

答: That equality between image and kernel means that if you consider the epi-mono factorization of $\beta_{n+1}$ then "the monic" part is a kernel for $\beta_{n}$, which we know to be unique only up to iso. Now just chase the diagrams as if you were in a category of modules over some ring (if this doesn't bother you) otherwise you simply need to check that the composition is the zero morphism and that you have the universal property of the kernel.</p>

Title: Simple question on exact sequences.


问:
Prove that $|S_A|=n!$
Let $ A $ be a finite set with $ n $ elements. Define $ S_A $ the set of all bijective functions from $ A $ to $ A $.

To prove that its cardinal is $ n! $ I will prove it by mathematical induction.

For $ n = 1 $, then $ A $ has only one element, therefore there is only one bijective function from $ A $ to $ A $. That is, $ | S_A | = 1 = 1! $.

Let $ A $ be a set with $ n $ elements such that $ | S_A | = n! $. Let $ B $ be a set with $ n + 1 $ elements. Let $ S_B $ be the set of all bijective functions from $ B $ to $ B $. Furthermore, we can represent $ B$ as follows: $$ B = \{b_1, \ldots, b_ {n + 1} \}. $$

We are going to classify the elements of $ S_B $ as follows, $$ (S_B) _i = \{f \in S_B \mid f (b_ {n + 1}) = b_i \} $$
for all $ 1 \leq i \leq n + 1 $. How could I prove that $ | (S_B) _i | = n! $ And $ S_B = \bigcup_ {i = 1} ^ {n + 1} (S_B) _i $? Someone could help me with those two incisions that I have left, and tell me if the demonstration is good or if I have a wrong step.

答: Your proof works perfectly so far and you are very close to getting your answer. First, note that $(S_B)_i$ has the same cardinal as the set $\{f: \{b_1, \dots, b_n\} \rightarrow B \setminus \{b_i\}: f \text{ bijective}\}.$ Thus $\# (S_B)_i$ is just the number of bijective functions from a set with $n$ elements to a set with $n$ elements, i.e. $n!$ by the induction hypothesis. Morever, we indeed have that $S_B = \bigcup_{1 \leq i \leq n} (S_B)_i$ (and this union is a disjoint union). Indeed, the reverse inclusion is immediate and the direct one is also immediate since any $f \in S_B$ is an element of $(S_B)_{j_f},$ where $j_f$ is defined by $b_{j_f} = f(b_{n + 1}).$ I hope this helps. :)

Title: Prove that $|S_A|=n!$


问:
How do I find the probability of getting an average when selecting from a normal distribution?
If I have that scores follow a normal distribution, I know that the probability of selecting any person at random and them getting a score between 1 and 2 sd's above the mean is 13.6%. If I randomly select 4 people what is the probability that their scores will average to a value between 1 and 2 sd's above the mean? I dont care where any of their individual scores are only that they average to a value between 1 and 2 sds above the mean.</p>

答:
Simulation: $n = 4,  \mu = 68,  \sigma = 4.$
Perhaps normally distributed heights in inches of four students.

```<code>set.seed(217)
n = 4;  mu = 68;  sg=4
a = replicate(10^6, mean(rnorm(n,mu,sg))) # 10^6 sample averages
mean((a > mu+sg) & (a < mu+2*sg))
[1] 0.022626
2*sd((a > mu+sg) & (a <= mu+2*sg))/1000
[1] 0.0002974161  # aprx 95% margin of simulation error
</code>```

With a million iterations, one can expect about three place
accuracy, so this result is in essential agreement with @trancelocation's result (+1) $\Phi(4) = \Phi(2) = 0.023.$

```<code>pnorm(4)-pnorm(2)
[1] 0.02271846
</code>```

Because the average of four $A = \bar X_4 \sim
\mathsf{Norm}(68, 2)$ we can get the same numerical
result directly (without standardizing) in R:

```<code>diff(pnorm(c(72,76), mu, sg/2))
[1] 0.02271846
</code>```

The histogram below shows simulated values of $A$ along
with its normal distribution (solid orange curve). Vertical dashed lines
mark the interval $(\mu + \sigma, \mu + 2\sigma) = (72, 76).$ The dotted density curve of $\mathsf{Norm}(68, 4)$  is for each individual observation.

R code for figure:

```<code>hdr = "n=4: Dist'n of Sample Means"
hist(a, prob=T, br=30, col="skyblue2", xlim=c(55,80), main=hdr)
 abline(v = c(mu+sg, mu+2*sg), lwd=2, col="darkgreen", lty="dotted")
 curve(dnorm(x, mu, sg/sqrt(n)), add=T, lwd=2, col="orange")
 curve(dnorm(x, mu, sg), add=T, lwd=2, lty="dotted")
 abline(v = c(mu+sg, mu+2*sg), lwd=2, col="darkgreen", lty="dashed")
</code>```

Body:
Simulation: $n = 4,  \mu = 68,  \sigma = 4.$
Perhaps normally distributed heights in inches of four students.

set.seed(217)
n = 4;  mu = 68;  sg=4
a = replicate(10^6, mean(rnorm(n,mu,sg))) # 10^6 sample averages
mean((a > mu+sg) & (a < mu+2*sg))
[1] 0.022626
2*sd((a > mu+sg) & (a <= mu+2*sg))/1000
[1] 0.0002974161  # aprx 95% margin of simulation error

With a million iterations, one can expect about three place
accuracy, so this result is in essential agreement with @trancelocation's result (+1) $\Phi(4) = \Phi(2) = 0.023.$

pnorm(4)-pnorm(2)
[1] 0.02271846

Because the average of four $A = \bar X_4 \sim
\mathsf{Norm}(68, 2)$ we can get the same numerical
result directly (without standardizing) in R:

diff(pnorm(c(72,76), mu, sg/2))
[1] 0.02271846

The histogram below shows simulated values of $A$ along
with its normal distribution (solid orange curve). Vertical dashed lines
mark the interval $(\mu + \sigma, \mu + 2\sigma) = (72, 76).$ The dotted density curve of $\mathsf{Norm}(68, 4)$  is for each individual observation.

R code for figure:

hdr = "n=4: Dist'n of Sample Means"
hist(a, prob=T, br=30, col="skyblue2", xlim=c(55,80), main=hdr)
 abline(v = c(mu+sg, mu+2*sg), lwd=2, col="darkgreen", lty="dotted")
 curve(dnorm(x, mu, sg/sqrt(n)), add=T, lwd=2, col="orange")
 curve(dnorm(x, mu, sg), add=T, lwd=2, lty="dotted")
 abline(v = c(mu+sg, mu+2*sg), lwd=2, col="darkgreen", lty="dashed")


答:
It is inconsistent. We write $\cos^2 x$ for $(\cos x)^2$ but $\cos^{-1} x$ is the inverse function, rather than $(\cos x)^{-1}.$

This is probably because we have a name $\sec x=(\cos x)^{-1}$ and we rarely ever need to apply $\cos\cos x.$

I’ve never seen anybody use $\cos^{-2}x,$ but if I did, and there was no specific meaning, I’d take it to mean $(\cos x)^{-2}.$

While in some cases $f^n=f\circ f\circ \cdots\circ f$ might make sense, in a lot of cases it does.

So this is a case where we use inconsistent notation because it is more convenient, and we have other notations if we want.

So $f^{-1}$ is the inverse function, and we write $1/f$ explicitly for the other meaning.

And $f^n(x)=(f(x))^n$ when that makes sense, so we are stuck writing $f^{\circ n}$ for repeated composition.

For linear transformations, and hence matrices, $A$, it doesn’t make sense to take $(Av)^n,$ in general, so $A^n$ is always defined as composition, so there is no inconsistency in that case.


问:
Intuitive understanding of the derivatives of $\sin x$ and $\cos x$
One of the first things ever taught in a differential calculus class:

The derivative of $\sin x$ is $\cos x$.

The derivative of $\cos x$ is $-\sin x$.

This leads to a rather neat (and convenient?) chain of derivatives:

```
sin(x)
cos(x)
-sin(x)
-cos(x)
sin(x)
...
```

An analysis of the shape of their graphs confirms some points; for example, when $\sin x$ is at a maximum, $\cos x$ is zero and moving downwards; when $\cos x$  is at a maximum, $\sin x$ is zero and moving upwards.  But these "matching points" only work for multiples of $\pi/4$.

Let us move back towards the original definition(s) of sine and cosine:

At the most basic level, $\sin x$ is defined as -- for a right triangle with internal angle $x$ -- the length of the side opposite of the angle divided by the hypotenuse of the triangle.

To generalize this to the domain of all real numbers, $\sin x$ was then defined as the Y-coordinate of a point on the unit circle that is an angle $x$ from the positive X-axis.

The definition of $\cos x$ was then made the same way, but with adj/hyp and the X-coordinate, as we all know.

Is there anything about this basic definition that allows someone to look at these definitions, alone, and think, "Hey, the derivative of the sine function with respect to angle is the cosine function!"

That is, from the unit circle definition alone.  Or, even more amazingly, the right triangle definition alone.  Ignoring graphical analysis of their plot.

In essence, I am asking, essentially, "Intuitively why is the derivative of the sine the cosine?"

答:
This interesting pattern of derivatives involving sine and cosine is related to the fact that e^x is its own derivative and that e^(ix) = cos(x) + i*sin(x) (Euler's Formula).

These two facts are in some sense the math hiding behind Justin L's more physical explanation, which you might well find more intuitive.

ContentLicense: CC BY-SA 2.5


问:
Which one result in mathematics has surprised you the most?
A large part of my fascination in mathematics is because of some very surprising results that I have seen there.

I remember one I found very hard to swallow when I first encountered it, was what is known as the Banach Tarski Paradox. It states that you can separate a ball $x^2+y^2+z^2 \le 1$ into finitely many disjoint parts, rotate and translate them and rejoin (by taking disjoint union), and you end up with exactly two complete balls of the same radius!

So I ask you which are your most surprising moments in maths?

Chances are you will have more than one. May I request post multiple answers in that case, so the voting system will bring the ones most people think as surprising up. Thanks!

答:
The fact that surface area is simply the derivative of volume!

Bear in mind that in mathematics, “volume” is a generic term (i.e., a convenient handle, no pun intended) for a “container” of arbitrary dimension. So, this holds not only for dimension 3 (i.e., a sphere), but also for dimension 2 (i.e., a circle, a circle being a 2-sphere, and perimeter of a 2-dimensional object corresponding to the surface area of a 3-dimensional object), and for dimension 1 (i.e., an interval, an interval being a 1-sphere, and the set of endpoints of a 1-dimensional object corresponding to the surface of a 3-dimensional object). So, we have:

Dimension 3: d(4/3)πr^3/dr = 4πr^2

Dimension 2: dπr^2/dr = 2πr

Dimension 1: d2r/dr = 2

Beautiful!

LastEditorDisplayName: anon


问:
Maximizing sum of strictly non-negative functions?
In an answer to this question, it was stated that if a function is the sum of two functions $f(x)=g(x)+h(x)$, and ${(\forall{x})(g(x)\ge0)}$ and $(\forall{x})(h(x)\ge0)$, the relative maxima of $f(x)$ can be found by finding the relative maxima of $g(x)$ and $h(x)$.

Intuitively I can somewhat grasp why this is the case, but analytically, what is the explanation for why this is true?

答:
That's not true, if I understand correctly.

For example, $[1+\sin(x)]+[1+\cos(x)]$ is a sum of two positive functions with maxima at $0,\pi/2$ (plus shifts) respectively where the whole function takes the value $3$.

However, at $x=\pi/4$ we get $1+\sqrt 2/2+1+\sqrt 2/2=2+\sqrt 2> 3$.

Draw the graph to check it out.

Looking at the other question quickly, it's possible that what you're interested in is the special case where $g,h$ have the same sign for their slopes at all points.

In this case, it is  true (at least for nice differentiable  functions) because of the following reasoning: let $x$ be not a maximum of $g,h$. Then both $g,h$ must increase away from $x$ in at least one direction, and that must be the same direction. Therefore $g+h$ increases in that direction too.

Note that the $g,h>0$ thing doesn't really tell you anything since you can always shift the whole graph up by a constant and smoothly kill away behaviour at infinity.


问:
Is there always a unique path between nodes of different lengths?
Think of this like a variation traveling salesman problem. You have a bunch of cities which are all connected with roads of unique arbitrary lengths (i.e. uncorrelated to the distance between the cities). Forget about their intersections (pretend that at every intersection one tunnels beneath the other). Now, is there a unique route (you can choose where you start) that goes to every city once which travels the shortest distance (disregard the reverse path as not making the route unique) or can there be multiple routes with the same shortest distance?</p>

答: There can certainly be multiple shortest paths.  A simple example is below.  The sides of the regular hexagon are all $1$.  The shortest path goes from $E$ to $C$ to $G$ to $C$ to $E$ where one $E$ to $C$ goes through $D$ and the other goes through $A$.  You can do the two $E$ to $C$s in either order as well as starting at $C$.  You can also start at other vertices.  We can play with the distances to make them all distinct without spoiling the situation if you prefer.


问:
Showing $a^2=b^2$ in a group with 8 elements isomorphic to Quaternion group
I am working in a group $G$ with 8 elements such that $a, b\in G$ and $ba=a^3b$. Moreover, I am given that both $b$ and $a$ have order 4 and $\langle a \rangle \neq \langle b \rangle$. I understand this group is isomorphic to Quaternion group, but this is not given and I am trying to prove this. I want to show $a^2=b^2$, but I am stuck.
Here is what I have done so far:

$$(ab)^2=abab=a(ba)b=aa^3bb=a^4b^2=b^2$$

Also from the equality $ba=a^3b$ I can derive many other equalities, but they do not seem to give me anything useful. For instance

$$aba=b \text{ or } a^3ba^3=b$$

Another observation I have made is that both $b^2$ and $a^2$ have order 2. But I am not sure if that is enough to conclude $a^2=b^2$. Please guide me in the right direction.

答: The main relation can be written as $ba=a^{-1}b$, which implies $ba^2=a^{-2}b$.  Since $a$ has order 4, this means $ba^2=a^2b$, so $a^2$ is central.  The main relation also says $bab^{-1}=a^{-1}$; inverting this yields $ba^{-1}b^{-1}=a$.  This in turn implies $b^2ab^{-2}=a$, so $b^2$ is also central. If $a^2\ne b^2$, then the center has at least 4 elements, and as no center can have index $2$, the group would have to be Abelian.  Since this isn't the case, we see $b^2=a^2$ is the only non-identity element of the center.  The OP already showed $(ab)^2$ is this same central element, so we have the quaternion group.


问:
Proving the class number of $\mathbb{Q}(\sqrt{-5})$ is 2 using Ireland-Rosen's bound
In this MO answer, Keith Conrad states that you can use the method of proof of the finiteness of the class number in Ireland & Rosen to prove that the class number $h_K=2$, when $K=\mathbb{Q}(\sqrt{-5})$. The point is to avoid using Minkowski's bound.

I would like to have some hints as to how to do this (since this is part of a homework question).

The outline of Ireland & Rosen's proof is the following (pp. 178-179):

Lemma: There exists a positive integer $M_K$ such that for all $\alpha,\beta\in \mathcal{O}_K$, $\beta\not=0$, there is an integer $t$, $1\leq t\leq M_K$ and an element $\omega \in \mathcal{O}_K$ such that $\lvert N(t\alpha-\omega \beta) \rvert < \lvert N(\beta)\rvert$.

If I understand the proof correctly, $M_K$ is as follows:

Let $\omega_1,\dots, \omega_n$ be an integral basis for $K$. Let $C=\prod_i \sum_j \lvert \sigma_i(\omega_j) \rvert$ where $\sigma_i$ are the $n$ $\mathbb{Q}$-monomorphisms $K\to \mathbb{C}$.

Let $m> \sqrt[n]{C}$ be an integer. Then we let $M_K=m^n$. $\square$

Now the finiteness of the class number follows, by proving that every non-zero ideal is equivalent to an ideal that contains $M_K!$. Since these ideals are in bijection with the ideals of $\mathcal{O}_K/M_K!\mathcal{O}_K$ which is a finite ring, there are finitely many ideal classes.

How to use this to prove that $h_K=2$ when $K=\mathbb{Q}(\sqrt{-5})$?

I'm getting $M_K=16$ by using the standard integral basis $\{1, \sqrt{-5}\}$: indeed, $C=(1+\sqrt{5})(1+\sqrt{5})\approx 10,4$, then $\sqrt{C}\approx 3,2$, thus we take $m=4$, whence $M_K=4^2=16$.

This $M_K$ does not seem useful...

答:
We can take $M_K=2$, solely using elementary means.

Using the multiplicativity of norm, rewrite $N(t\alpha - \omega \beta) < N(\beta)$ as $N(t \tfrac{\alpha}{\beta} - \omega)<1$. In other words, we want to show that, for all $\gamma \in K$, there is $1 \leq t \leq M_K$ and $\omega \in R_K$ such that $N(t \gamma-\omega)<1$. I claim that this holds for $M_K=2$, where $R_K$ is $\mathbb{Z}[\sqrt{-D}]$ for $D \in \{1,2,3,4,5,6 \}$ or $\mathbb{Z}\left[\tfrac{1}{2} + \sqrt{-D} \right]$ for $D \in \{ 0.75, 1.75, 2.75, 3.75, 4.75, 5.75 \}$. For shorthand, put $\zeta$ to be either $\sqrt{-D}$ or $\tfrac{1}{2} + \sqrt{-D}$ accordingly.

Let $\gamma = x+iy$. Subtracting off an integer multiple of $\zeta$, we may assume that $|y| < \tfrac{\sqrt{D}}{2}$. WLOG, we may assume $y \geq 0$.

Case 1: $0 \leq y <\tfrac{\sqrt{3}}{2}$. In this case, subtracting off integers, we may assume that $|x|<\tfrac{1}{2}$. So
$$N(x+iy) < \left(\tfrac{1}{2} \right)^2 + \left
(\tfrac{\sqrt{3}}{2} \right)^2 < 1.$$

Case 2: $\tfrac{\sqrt{3}}{2} \leq y < \tfrac{\sqrt{D}}{2}$. (Note that this case can only occur if $D \geq 3$.) Then $\sqrt{3} \leq 2 y < \sqrt{D}$ so $|2y - \sqrt{D}| < \sqrt{D}-\sqrt{3} \leq \sqrt{6} - \sqrt{3}$. In other words, the imaginary part of $2(x+iy) - \zeta$ is at most $\sqrt{6}-\sqrt{3}$. Subtracting off an appropriate integer, we get an number of the form $2(x+iy) - \omega$ with imaginary part at most $\sqrt{6} - \sqrt{3}$ and real part at most $1/2$. We compute
$$(1/2)^2 + (\sqrt{6} - \sqrt{3})^2 \approx 0.76 < 1$$
so we win. $\square$

I like this argument because not only can it do $\mathbb{Z}[\sqrt{-5}]$, it can also do $\mathbb{Z}\left[ \tfrac{1+\sqrt{-19}}{2} \right]$, which is a PID that is not Euclidean. (Note that this is the $D=4.75$ case, so it morally should be easier than the $D=5$ case.)


问:
Prove that $(ab,cd)=(a,c)(b,d)\left(\frac{a}{(a,c)},\frac{d}{(b,d)}\right)\left(\frac{c}{(a,c)},\frac{b}{(b,d)}\right)$
I'm working through Oystein Ore's Number Theory and its History.  On p. 109, I'm stuck on #2.

The question asks the reader to verify the following identity [Note: $(x,y)=\gcd(x,y)$]:

$$(ab,cd)=(a,c)(b,d)\left(\frac{a}{(a,c)},\frac{d}{(b,d)}\right)\left(\frac{c}{(a,c)},\frac{b}{(b,d)}\right)$$

I've tried numerous numeric examples and not found an exception.  I've tried a messy proof, substituting sample factors and exponents, but it's not very cohesive, clear, or robust.  Clearly, if $a,b,c,d$ are all relatively prime, the answer is clear.  I don't know how to concisely prove this if that's not the case though.

I've tried using the idea that $m(x,y)=(mx,my)$ to get rid of the denominators, but I still end up with some fractions.  I've tried to use the symmetry of the fractions to simplify things.
I also looked at this link without significant progress:
Is $\gcd(a,b)\gcd(c,d)=\gcd(ac,bd)$?

答:
$$(ab,cd)=(a,c)(b,d)\left(\frac{a}{(a,c)},\frac{d}{(b,d)}\right)\left(\frac{c}{(a,c)},\frac{b}{(b,d)}\right) \tag{T}$$

Using $\pi_p(n) = k \iff p^k \mid n \text{ and } p^{k+1} \not \mid n$ (that is, $\pi_p(n)$ is the largest power of $p$ that divides $n$), and using $A=\pi_p(a), B=\pi_p(b)\dots$

Then (T) is equivalent to, for all primes $p$,

$$\begin{array}{rcl}\min(A+B, C+D)
&=& \min(A,C)\\
&+& \min(B,D)\\
&+& \min(A-\min(A,C),D-\min(B,D)) \\
&+& \min(C-\min(A,C),B-\min(B,D)) \\
\end{array}$$

The $A>C,B>D$ (and the symmetric case) is trivial.  The remaining case, $A<C, B>D$ (and the symmetric case is equivalent):

$$\begin{array}{rcl}\min(A+B, C+D)
&=& A\\
&+& D\\
&+& \min(0,0) \\
&+& \min(C-A,B-D) \\ \\
&=& \min(A + D + C - A, A + D + B-D) \\ \\
&=& \min(D + C, A + B) \\
\end{array}$$

Due to the isomorphic relation of min/max, this proof also works for proving the theorem when $(x,y)$ is used to mean ${\rm lcm}(x,y)$.


问:
A σ-algebra may have no non-empty atoms at all?
How to prove the fact that a $\sigma-$algebra may have no non-empty atoms at all?

Definition: An atom of a $\sigma$-algebra $\mathscr{A}$ is a non-void set $\emptyset \neq A \in \mathscr{A}$ that contains no other set of
$\mathscr{A}$.

答:
I'm copying this very nice and elementary (but somewhat buried) answer from the following thread: https://mathoverflow.net/questions/22477/sigma-algebra-without-atoms

"A good source for results on atomless $\sigma$-algberas is chapter 3 of Borel Spaces (1981) by Rao and Rao (Diss. Math.). Here are two remarks, taken from this text:

There is no atomless countably generated $\sigma$-algebra.

Let $\mathcal{C}$ be a countable set of generators for a $\sigma$-algebra on $X$. W.l.o.g., we can assume that $\mathcal{C}$ is closed under complements. Then for every $x\in X$, the set  $A(x)=\bigcap \{C:x\in C,C\in\mathcal{C}\}$ is measurable in $\sigma(\mathcal{C})$ as a countable intersection of measurable sets. Since one cannot separate points by $\sigma(\mathcal{C})$ that one cannot separate by $\mathcal{C}$, for each $x$, $A(x)$ is an atom of $\sigma(\mathcal{C})$

On every uncountable set, there exists an atomless $\sigma$-algebra that separates points.

Let $X$ be an uncountable set. Clearly, it suffices to show that an atomless $\sigma$-algebra that separates points exists on a set with the same cardinality as $X$. The set $Y$ of all finite subsets of $X$ has the same cardinality as $X$, so we work with $Y$. We verify that the $\sigma$-algebra on $Y$ generated by elements of the form $G_x=\{F:x\in F\}$ for some $x\in X$ does the job.

It is obvious that this $\sigma$-algebra separates the elements of $Y$. So if there were any atom, it would be a singleton $\{F\}$ and it would be generated by countably many of the $G_x$. So let $C$ be a countable subset of $X$ such that $\{F\}\in\sigma\{G_c:c\in C\}$. For the reason pointed out in 1., $\{F\}$ would be the intersection of all elements in $\{G_c:c\in C\}\cup\{G_c^C:c\in C\}$ that contain $F$. Now $F\in G_c$ only if $c\in F$. So let $x\notin F\cup C$. Then $F\cup\{x\}\in G_c$ for all $c\in F$ and $F\cup\{x\}\in G_c^C$ for $c\notin F$. So the intersection doesn't contain only $F$, which is a contradiction."

Supplied by https://mathoverflow.net/users/35357/michael-greinecker


问:
Strictly Increasing Function, $x \leq f(x)$ on the naturals
Show that for a strictly increasing function $f: \mathbb{N} \rightarrow \mathbb{N}$, we have that $x \leq f(x)$ for all $x \in \mathbb{N}.$

I am trying to prove by induction, however, I am not sure if it is the right path.

答: We have that $f(n) \in \mathbb{N}$ for all $n \in \mathbb{N}$ and $f(n) < f(n + 1),$ (i.e. $f(n) + 1 \leq f(n + 1)$). In particular, $f(1) \geq 1.$ It follows that for $n > 1,$ $f(n) \geq f(n - 1) + 1 \geq f(n - 2) + 2 \geq \dots \geq f(1) + n - 1 \geq 1 + n - 1 = n,$ so $f(n) \geq n$ for all $n \in \mathbb{N}.$ I hope this helps. :)


答:
When $x=0$, because $f(x)\in\mathbb{N}$, $f(x)\geq0=x$, therefore $x\leq f(x)$.

If $i\leq f(i)$ for some $i\in\mathbb{N}$, then $f(i+1)>f(i)\geq i\implies f(i+1)>i;\quad\because f(i+1)\in\mathbb{N},\quad\therefore f(i+1)\geq i+1$.

Title: Strictly Increasing Function, $x \leq f(x)$ on the naturals

Body:
Show that for a strictly increasing function $f: \mathbb{N} \rightarrow \mathbb{N}$, we have that $x \leq f(x)$ for all $x \in \mathbb{N}.$

I am trying to prove by induction, however, I am not sure if it is the right path.


问:
For all integers $k$, $l$, $m$, $n$, if $k = nl + m$, then $n$ divides $k$ iff $n$ divides $m$
I have attempted to use the division theorem, but I am unsure exactly where to begin. Any hints/direction would be appreciated.</p>

答:
As a hint, consider why

if $n$ divides $m$ then $n$ divides $nl+m$

if $n$ divides $k$ then $n$ divides $k-nl$

To make things even easier in the first case, if $n$ divides $m$ then $a=\frac mn$ is an integer and $m=na$, so the question becomes:  why if $n$ divides $m$ then $n$ divides $nl+na$?  Similarly with the second case.


答:
Use the definitions directly:
$$
n \mid m
\quad\Longrightarrow\quad
m = nr \text{ for some } r \in \mathbb{Z}
\quad\Longrightarrow\quad
k = nl + nr = n(l + r)
\quad\Longrightarrow\quad
n \mid k
$$
since $l + r \in \mathbb{Z}$ if $l, r \in \mathbb{Z}$.

To prove the other direction, rewrite
$$
m = k - nl,
$$
and argue in an analogous manner.

Title: For all integers $k$, $l$, $m$, $n$, if $k = nl + m$, then $n$ divides $k$ iff $n$ divides $m$

Body: I have attempted to use the division theorem, but I am unsure exactly where to begin. Any hints/direction would be appreciated.</p>


答:
Consider the graph with $6$ vertices $u,v,w,x,y,z$ and $7$ edges with lengths $wx=1$, $xy=2$, $vx=3$, $wy=4$, $vw=5$, $uv=6$, $yz=7$. The two Hamiltonian paths are $uvwxyz$ and $uvxwyz$, both of length $21$.

If you wanted a complete graph, give the $8$ additional edges lengths $12$, $13$, $14$, $15$, $16$, $17$, $18$, $19$, so that none of them can be used in a Hamiltonian path of minimum length.

Title: Is there always a unique path between nodes of different lengths?

Body: Think of this like a variation traveling salesman problem. You have a bunch of cities which are all connected with roads of unique arbitrary lengths (i.e. uncorrelated to the distance between the cities). Forget about their intersections (pretend that at every intersection one tunnels beneath the other). Now, is there a unique route (you can choose where you start) that goes to every city once which travels the shortest distance (disregard the reverse path as not making the route unique) or can there be multiple routes with the same shortest distance?</p>


问:
Bayesian statistical inference problem continuous case
This question is about updating distribution of unknown random variable with observed data x. I took a photo of what I have done and my reasoning. I am newbie to probability and statistics and I do not know every term. My problem is with denominator of posterior pdf. I do not understand how to find it and incorporate realized value of X into it.

the problem

答:
Let $\Theta \sim \mathcal{U}[2,5]$ and assume the conditional distribution of $X_1,X_2$ given $\Theta=\theta$ is $\mathcal{U}[0,\theta]$. Let's derive an expression for your posterior pdf $f_{\Theta|X_1,X_2}(\theta|x_1,x_2)$ for arbitrary observations $x_1,x_2$. Set $m=\max\{x_1,x_2\}$. Then your likelihood $f_{X_1,X_2|\Theta}(x_1,x_2|\theta)$ is  \begin{equation*}
f_{X_1,X_2|\Theta}(x_1,x_2|\theta)=f_{X_1|\Theta}(x_1|\theta)f_{X_2|\Theta}(x_2|\theta)= \left\{
        \begin{array}{ll}
            1/\theta^2 & \quad \theta\in [m,\infty) \\
            0 & \quad \theta \in (-\infty,m)
        \end{array}
    \right.
\end{equation*} Notice that product $f_{X_1,X_2|\Theta}(x_1,x_2|\theta)f_{\Theta}(\theta)\neq 0$ only when $\theta \in [2,5] \cap [m,\infty)$ whose intersection is non$-$empty whenever $m \leq 5$. For our practical purposes let's assume $2<m<5$ so that $[2,5]\cap [m,\infty)=[m,5]$. Then your posterior pdf $f_{\Theta|X_1,X_2}(\theta|x_1,x_2)$ equals \begin{equation*}
f_{\Theta|X_1,X_2}(\theta|x_1,x_2)=\frac{f_{X_1,X_2|\Theta}(x_1,x_2|\theta)f_{\Theta}(\theta)}{\int_{m}^{5}f_{X_1,X_2|\Theta}(x_1,x_2|\theta)f_{\Theta}(\theta)d\theta}= \left\{
        \begin{array}{ll}
            \frac{5m}{(5-m)\theta^2} & \quad \theta\in [m,5] \\
            0 & \quad \theta \notin [m,5]
        \end{array}
    \right.
\end{equation*} If we take $m \rightarrow 5^{-}$ then this posterior pdf  becomes $\delta(\theta -5)$ where $\delta$ is the dirac$-$delta function. This is what you get when your observations are $x_1=3,x_2=5$.


问:
Why do we need to calculate this as a conditional probability?
I am trying to solve this problem:

A motorist just had an accident. The accident is minor with probability $0.75$ and is otherwise major. Let $b$ be a positive constant. If the accident is minor, then the loss amount follows a uniform distribution on the interval $[0,b]$. If the accident is major, then the loss amount follows a uniform distribution on the interval $[b,3b]$. The median loss amount due to this accident is $672$. Calculate $b$.

From my point of view, we knew that
$$ P(X \leq b) = 0.75 $$
Hence, the median is lies in $[0, b]$. The cumulative function for values in this range is $$\frac{x}{b}$$ Then, to find $b$, we just need to solve
$$ \frac{x}{b} = 0.5.$$

However, as the answer given, to find the value of $b$, we need to solve
$$ P(X \leq x \mid x < b) = 0.5, $$
which is
$$ \frac{1}{0.75b} = 0.5. $$

May I know why do we need this conditional probability? Thank you.

答:
If $X$ is the amount of the loss, then $F(x)$ should only reach 0.75 at b, not 1.
The median is the value of x where $F(x) = 0.5$.
You are correct that it climbs linearly from 0 at X=0. The area is $\frac{bh}{2} = 0.5$. The slope is $\frac{0.75}{b}$, so at x, the height is $\frac{0.75x}{b}$, giving
$$\frac{1}{2}x\cdot\frac{0.75x}{b} = 0.5
$$
The median x is given as 672.  Solve for b.


问:
Number of Comparisons Binary Insertion Sort and the Ceiling Function
I found that the number of comparisons for binary insertion sort is:

First Pass: 1 comparison as we compare the first two elements.

Second Pass: 2 comparisonss as we compare the third elements with the first two elements.

$k^{th}$ Pass: $\left\lceil\log_2(n)\right\rceil$ comparisonss.

Question: Why the ceil function was used here instead of the floor function? I saw this is the case for a lot log-based algorithms, where the ceiling function is used to estimate operation numbers instead of floor functions.

答:
Two reasons:

$\lceil \log_2 n\rceil$ is the correct exact count, assuming that with $k$ comparisons you can binary search an array of size at most $2^k$. For example, $\log_25$ is between 2 and 3, but with 2 comparisons we can only binary search an array of size $2^2=4$, so we need $\lceil \log_25\rceil=3$ comparisons to binary search a 5-element array.

If the goal is to prove an upper bound on an algorithm's runtime, then rounding down would be unsound, but rounding up is acceptable.


问:
Can anyone help me with partial derivatives using the following data?
We know that $x=r\cos\theta$ and $y=r\sin\theta$, then find the derivative $\frac{\partial f}{\partial r}$ if $f=\frac{1}{x^2+y^2}$.

Body:
Given $x=r\cos\theta$, $y=r\sin\theta$, and $f=\frac{1}{x^2+y^2}$:

$$ \frac{df}{dr} = \frac{d}{dr}\frac{1}{x^2+y^2} $$

$$ = \frac{d}{dr}\frac{1}{(r\cos\theta)^2+(r\sin\theta)^2} $$

$$ = \frac{d}{dr}\frac{1}{r^2(\cos^2\theta+\sin^2\theta)} $$

$$ = \frac{d}{dr}\frac{1}{r^2} $$

$$ = -\frac{2}{r^3} . $$

If you need the solution in terms of $x$ and $y$, we have

$$ \frac{df}{dr} = -\frac{2}{r^3} $$

$$ = -\frac{2}{(r^2)^{\frac{3}{2}}} $$

$$ = -\frac{2}{(x^2+y^2)^{\frac{3}{2}}} .$$


问:
With any function, sum all the values up to $f(n)$.
Say you have the function: $y = x^{n}$ where $x$ is a Natural Number. Is there a simpler way to get the sum of $y_0, y_1, y_2, \ldots, y_n$ without having to calculate $y$ for every $n$?

If not, are there cases where with certain rules we can do so?

答:
If I'm not mistaken you want to calculate
$$\sum_{k=0}^{n}x^k.$$
This is a geometric sequence. The general formula for a GS is
$$\sum_{k=m}^{n}ax^k=\frac{a(x^m-x^{n+1})}{1-x},$$
where $r\neq1$. If $r=1$ then the GS is $a(n-m+1)$. So in your example we have $a=1$ and $m=0$. If $x\neq1$, the solution is
$$1+x+x^2+x^3+... = \frac{1-x^{n+1}}{1-x}$$
and if $x=1$ this sequence obviously is equal to $n+1$.


问:
A/B Test: t-test vs. chi-squared test
I am working on a marketing campaign analysis between treatment-A and treatment-B. The goal is to find which treatment yields more clicks. Say, I have one month of experiment duration and at the end I want to determine if one treatment is statistically better than the other. I can formulate the problem in two ways:

t-test: I find the average daily click rates of A and B, and then perform a t-test.

chi2 test: I find the total clicks of these A/B treatments at the end, and perform a chi2 test.

Can someone comment on the differences of these two approaches?

答:
I'll start with the chi-squared test. You said you want to compare the total clicks at the end. But wouldn't this depend on how many people visit the sites that were using treatment A versus treatment B? If treatment A only had 250 visitors and all of them clicked, it would probably be better than if treatment B had 1000 visitors and 500 clicked. So you might be interested in comparing the proportion of clicks. Say you have the following data after one month:

```<code>clicked   A    B
yes       500  500
no        600  650
</code>```

Would you say that A is the same as B? Probably not, because more people visited the site under treatment B and it had less of a click rate. At this point, you can do a 2-proportion test or a chi-square test to compare if there is a difference between treatment A and treatment B in terms of getting people to click. They are the same test. Here is how you would do it using a 2-proportion test.

Hand-calculating the z test statistic

```<code>AY=500
BY=500
AN=600
BN=610

#prop test calculation
p1=AY/(AY+AN)
p2=BY/(BY+BN)
phat=p1-p2
ppooled=((AY+AN)*p1+(BY+BN)*p2)/(AY+AN+BY+BN)
zstatistic=phat/sqrt(ppooled*(1-ppooled)*(1/(AY+AN)+1/(BY+BN)))
zstatistic^2
pnorm(zstatistic, lower.tail=FALSE)*2
</code>```

-out

```<code>> zstatistic^2
[1] 0.03739652
> pnorm(zstatistic, lower.tail=FALSE)*2
[1] 0.84666
</code>```

So we get a p-value of 84%, suggesting there is no difference between the two proportions. (This is not too surprising, because I constructed the proportions to be quite close together.) The square of the z-statistic that we just computed is actually the chi-squared statistic, as we will see later on.

Using the prop.test command
We can also directly use the built-in prop.test command.

```<code>prop.test(c(AY, BY), c(AY+AN, BY+BN), correct=FALSE)
</code>```

-out

```<code>    2-sample test for equality of proportions without continuity correction

data:  c(AY, BY) out of c(AY + AN, BY + BN)
X-squared = 0.037397, df = 1, p-value = 0.8467
alternative hypothesis: two.sided
95 percent confidence interval:
 -0.03740849  0.04559850
sample estimates:
   prop 1    prop 2
0.4545455 0.4504505
</code>```

From the third line, you can see that the chi-sq test-statistic (which is the square of the z-test statistic) and p-value both match from previously.

Chi-squared by hand
Now here is how to do the chi-square test by hand. Note that it is exactly the same test as we have just previously done. The effect of it is to compare the observed data to what we would have expected if there is no difference in treatments. That is, it compares the first table with the following table, called the expected table.

```<code>Expected
clicked  A          B
yes      497.7376   502.2624
no       602.2624   607.7376
</code>```

The code is as follows

```<code>#chi-squared test calculation
tab=data.frame(clicked=c("yes", "no"), A=c(AY, AN), B=c(BY, BN))
rate=(AY+BY)/(AY+BY+AN+BN)
AYE=rate*(AY+AN)
ANE=AY+AN-AYE
BYE=rate*(BY+BN)
BNE=BY+BN-BYE
chisqstatistic=(AYE-AY)^2/AYE+(ANE-AN)^2/ANE+(BYE-BY)^2/BYE+(BNE-BN)^2/BNE
chisqstatistic
df=1
pchisq(chisqstatistic, df, lower.tail=FALSE)
</code>```

-out

```<code>> pchisq(chisqstatistic, df, lower.tail=FALSE)
[1] 0.84666
> chisqstatistic
[1] 0.03739652
</code>```

Chi square test command
Or, using the built-in command, we get

```<code>> test=chisq.test(tab[,2:3], correct=FALSE)
> test

    Pearson's Chi-squared test

data:  tab[, 2:3]
X-squared = 0.037397, df = 1, p-value = 0.8467

> pchisq(test$statistic, df, lower.tail=FALSE)
X-squared
  0.84666
</code>```

The difference between the preceding chi squared test and the prop test is the for the prop test, you can specify a one-sided hypothesis. So you could test if the proportion for B is greater than A or vice versa.

You also say conduct a t-test for average daily click rates. So I presume you mean you would take the sum of the click rates and then divide by 30, giving you the average clicks per day? Again, I'm not sure this is a good idea because the visits to the sites for treatment A and treatment B may not have the same traffic and be directly comparable. However, if we were to assume that they have exactly the same traffic, it is conceivable you would be able to conduct a t test to test the difference in means for any measurable quantity, such as clicks per day. So you would have a sample of clicks per day under treatment A and treatment B and compare the means of those samples. This is conceivable, again, if treatment A and treatment B experience the same traffic.

Conclusion

The two methods you propose are fundamentally different. One tests if there is an overall difference in the proportion of clicks garnered by treatment A versus treatment B and can be conducted if there is a difference in number of sites visited under treatment A and B. The other method requires that the number of sites visited under treatment A and treatment B are the same and then compares the clicks per day of the two treatments.

Title: A/B Test: t-test vs. chi-squared test

Body:
I'll start with the chi-squared test. You said you want to compare the total clicks at the end. But wouldn't this depend on how many people visit the sites that were using treatment A versus treatment B? If treatment A only had 250 visitors and all of them clicked, it would probably be better than if treatment B had 1000 visitors and 500 clicked. So you might be interested in comparing the proportion of clicks. Say you have the following data after one month:

clicked   A    B
yes       500  500
no        600  650

Would you say that A is the same as B? Probably not, because more people visited the site under treatment B and it had less of a click rate. At this point, you can do a 2-proportion test or a chi-square test to compare if there is a difference between treatment A and treatment B in terms of getting people to click. They are the same test. Here is how you would do it using a 2-proportion test.

Hand-calculating the z test statistic

AY=500
BY=500
AN=600
BN=610

#prop test calculation
p1=AY/(AY+AN)
p2=BY/(BY+BN)
phat=p1-p2
ppooled=((AY+AN)*p1+(BY+BN)*p2)/(AY+AN+BY+BN)
zstatistic=phat/sqrt(ppooled*(1-ppooled)*(1/(AY+AN)+1/(BY+BN)))
zstatistic^2
pnorm(zstatistic, lower.tail=FALSE)*2

-out

> zstatistic^2
[1] 0.03739652
> pnorm(zstatistic, lower.tail=FALSE)*2
[1] 0.84666

So we get a p-value of 84%, suggesting there is no difference between the two proportions. (This is not too surprising, because I constructed the proportions to be quite close together.) The square of the z-statistic that we just computed is actually the chi-squared statistic, as we will see later on.

Using the prop.test command
We can also directly use the built-in prop.test command.

prop.test(c(AY, BY), c(AY+AN, BY+BN), correct=FALSE)

-out

    2-sample test for equality of proportions without continuity correction

data:  c(AY, BY) out of c(AY + AN, BY + BN)
X-squared = 0.037397, df = 1, p-value = 0.8467
alternative hypothesis: two.sided
95 percent confidence interval:
 -0.03740849  0.04559850
sample estimates:
   prop 1    prop 2
0.4545455 0.4504505

From the third line, you can see that the chi-sq test-statistic (which is the square of the z-test statistic) and p-value both match from previously.

Chi-squared by hand
Now here is how to do the chi-square test by hand. Note that it is exactly the same test as we have just previously done. The effect of it is to compare the observed data to what we would have expected if there is no difference in treatments. That is, it compares the first table with the following table, called the expected table.

Expected
clicked  A          B
yes      497.7376   502.2624
no       602.2624   607.7376

The code is as follows

#chi-squared test calculation
tab=data.frame(clicked=c("yes", "no"), A=c(AY, AN), B=c(BY, BN))
rate=(AY+BY)/(AY+BY+AN+BN)
AYE=rate*(AY+AN)
ANE=AY+AN-AYE
BYE=rate*(BY+BN)
BNE=BY+BN-BYE
chisqstatistic=(AYE-AY)^2/AYE+(ANE-AN)^2/ANE+(BYE-BY)^2/BYE+(BNE-BN)^2/BNE
chisqstatistic
df=1
pchisq(chisqstatistic, df, lower.tail=FALSE)

-out

> pchisq(chisqstatistic, df, lower.tail=FALSE)
[1] 0.84666
> chisqstatistic
[1] 0.03739652

Chi square test command
Or, using the built-in command, we get

> test=chisq.test(tab[,2:3], correct=FALSE)
> test

    Pearson's Chi-squared test

data:  tab[, 2:3]
X-squared = 0.037397, df = 1, p-value = 0.8467

> pchisq(test$statistic, df, lower.tail=FALSE)
X-squared
  0.84666

The difference between the preceding chi squared test and the prop test is the for the prop test, you can specify a one-sided hypothesis. So you could test if the proportion for B is greater than A or vice versa.

You also say conduct a t-test for average daily click rates. So I presume you mean you would take the sum of the click rates and then divide by 30, giving you the average clicks per day? Again, I'm not sure this is a good idea because the visits to the sites for treatment A and treatment B may not have the same traffic and be directly comparable. However, if we were to assume that they have exactly the same traffic, it is conceivable you would be able to conduct a t test to test the difference in means for any measurable quantity, such as clicks per day. So you would have a sample of clicks per day under treatment A and treatment B and compare the means of those samples. This is conceivable, again, if treatment A and treatment B experience the same traffic.

Conclusion

The two methods you propose are fundamentally different. One tests if there is an overall difference in the proportion of clicks garnered by treatment A versus treatment B and can be conducted if there is a difference in number of sites visited under treatment A and B. The other method requires that the number of sites visited under treatment A and treatment B are the same and then compares the clicks per day of the two treatments.


答:
To get an estimate,
approximate the sum
by the integral:

$\sum_{k=0}^n f(k)
\approx \int_0^n f(x) dx
$.

To make this more rigorous,
you can use,
if $f(x)$ is increasing,
$f(n) \le \int_n^{n+1} f(x) dx
\le f(n+1)$
(with the reverse inequality
if $f(x)$ is decreasing)
and sum these terms.

This may eventually
lead to the Euler-Maclaurin
sum/integration formula.

Title: With any function, sum all the values up to $f(n)$.

Body:
Say you have the function: $y = x^{n}$ where $x$ is a Natural Number. Is there a simpler way to get the sum of $y_0, y_1, y_2, \ldots, y_n$ without having to calculate $y$ for every $n$?

If not, are there cases where with certain rules we can do so?


问:
Range of: $\sqrt{\sin(\cos x)}+\sqrt{\cos(\sin x)}$
Range of:
$$\sqrt{\sin(\cos x)}+\sqrt{\cos(\sin x)}$$

Any help will be appreciated.

答:
The given expression $f(x)$ is even and $2\pi$-periodic. Therefore it is enough to consider the interval $[0,\pi]$.

When ${\pi\over2}<x\leq\pi$ then $0>\cos x\geq-1>-{\pi\over2}$; so $\sqrt{\sin(\cos x)}$ is not defined in this interval.

When $0\leq x\leq{\pi\over2}$ then both $\cos x$ and $\sin x$ are in $[0,1]\subset\bigl[0,{\pi\over2}\bigr]$. It follows that in this $x$-interval both compositions $\sqrt{\phantom{i}} \circ\sin\circ\cos\ $ and $\ \sqrt{\phantom{i}}\circ\cos\circ\sin$ are decreasing, and so is  $f(x)$.

Therefore the range of $f(x)$ is the interval $\left[f\bigl({\pi\over2}\bigr), f(0)\right]=\bigl[\sqrt{\cos 1}, 1+\sqrt{\sin 1}\bigr]$.


问:
Can there exist a unique solution to an initial value problem if the hypotheses of the existence and uniqueness theorem are not satisfied?
I have been thinking about this question for a while. I haven't found a definite answer, but I am led to believe that there can be a unique solution to an IVP outside of interval of validity. I just fail to prove it.</p>

答:
For example, let
$$ f(x,y) = \cases{1 & if $xy < 0$\cr -1 & if $xy > 0$\cr 0 & if $xy = 0$\cr}$$
and consider the initial value problem
$$ \eqalign{ \dfrac{dy}{dx} &= f(x,y) \cr
                  y(0) &= 0\cr} $$
The hypotheses of the Existence and Uniqueness Theorem are not satisfied because $f(x,y)$ is not continuous in a neighbourhood of $(0,0)$, but there is a unique
solution, namely $y=0$.


问:
maximum likelihood estimator of variance for multiple linear regression
I'm trying to derive the maximum likelihood estimator of $\sigma^2$ for multiple linear regression with $y \sim N(X\beta, \sigma^2I)$ and $\epsilon \sim N(0, \sigma^2)$. I'm stuck getting $\hat{\beta}$'s in place of my $\beta$'s.

I know I need to find $\frac{\partial}{\partial\sigma}$ from the log likelihood function, which I've boiled down to:

$$\frac{\partial}{\partial\sigma}\left[-n\ln\sigma-\frac{1}{2\sigma^2}\left(y-X\beta\right)^T\left(y-X\beta\right)\right] = -\frac{n}{\sigma}+\frac{1}{\sigma^3}\left(y-X\beta\right)^T\left(y-X\beta\right)$$

Solving for $\sigma^2$:

$$\sigma^2 = \frac{\left(y-X\beta\right)^T\left(y-X\beta\right)}{n} = \frac{\epsilon^T\epsilon}{n}$$.

From there, though, I don't see how to get to the final answer $\frac{\left(y-X\hat{\beta}\right)^T\left(y-X\hat{\beta}\right)}{n}$. Any help or nudge in the right direction is appreciated.

答:
You can just plug in $\hat{\beta} = (X^TX)^{-1}X^T y$ in place of $\beta$. The idea is that you want to maximize the log-likelihood, $\ell(\beta,\sigma^2)$ with respect to both $\beta$ and $\sigma^2$, so you compute the partial derivatives and equate to zero, which gives you the following system of equations:
$$
\frac{\partial \ell}{\partial \beta} \ell(\beta, \sigma^2)=0, \quad \frac{\partial \ell}{\partial \sigma^2} \ell(\beta, \sigma^2)=0
$$
This is just like any other system of equations, you can solve one and then plug the answer into the second one to get the final result.


问:
What conditions ensure that a functor has a left / right inverse.
A functor $F : C \to D$ has a left inverse $G : D \to C$ if $G \circ F : C \to C$ is naturally isomorphic to $\mathrm{id}_C$ and ditto for a right inverse. Are there nice criteria for when a functor admits a left inverse or a right inverse?

I know that a functor is an equivalence of categories (i.e. admits both a left and a right inverse) if and only if it is fully faithful and essentially surjective.

Is it true that a functor admits a left inverse if and only if it is faithful and a right inverse if and only if it is full and essentially surjective?

It is clear that if $G \circ F \simeq \mathrm{id}_{\mathrm{C}}$ then $G$ must be full and essentially surjective and $F$ must be faithful.

However, I can't show that these conditions are sufficient.

答:
Neither are sufficient.

If $F$ is faithful, it need not admit a left inverse.
For example, $F:\varnothing\to\mathbf1$ is faithful, but no functor $\mathbf1\to\varnothing$ exists!

Even if we are mapping between nonempty categories, faithfulness is insufficient: just take $F$ to be the natural inclusion $\{\bullet\phantom\to\bullet\}\hookrightarrow\{\bullet\to\bullet\}$.

If $G:\def\cD{\mathcal D}\cD\to\def\cC{\mathcal C}\cC$ is essentially surjective and full, then it need not have an inverse either.
For example, let $\cD := \mathbf B\mathbb N_0$ be the one-object category with a morphism $\phi_n$ for every $n\geq0$ such that $\phi_n\phi_m=\phi_{n+m}$, and let $\cC$ be a one-object category with a non-identity endomorphism $\psi$ where $\psi\psi=\psi$.
Then, we have a functor $G:\cD\to\cC$ sending
$$
\phi_n \mapsto \begin{cases} \def\id{\operatorname{id}}\id, & n = 0 \\ \psi, & n > 0 \end{cases}
$$
This is full and surjective. However, it does not have a left inverse: if $GF\simeq\id_\cC$, then $GF=\id_\cC$ because the only isomorphism in $\cC$ is the identity.
In particular, $GF\psi=\psi$ means that $F\psi=\phi_n$ for some $n>0$. This is impossible because this would mean $\phi_n=F\psi=F(\psi\psi)=\phi_{2n}$ and thus $n=2n$, which is impossible.

You could say that the "problem" in both cases is the lack of faithfulness (hence @fosco's answer): being fully faithful helps control any of the regularity issues you might have when managing functors on the level of morphisms, since handling objects is mostly already fine (one way to see this is to just retrace the proof that a fully faithful and essentially surjective functor has a weak inverse and note where full and faithfulness are used).

Without being fully faithful, I am not sure if there is a "nice" way to describe when a functor has a weak left/right inverse besides just providing such an inverse.


问:
Number of ways $x_{n+1} \lor (x_1 \land x_2 \land \cdots\land x_n)$ where $n \geq 2$ results in $F$
I'm trying to find the number of distinct assignments for each of the $x$ variables exist such that $x_{n+1} \lor (x_1 \land x_2 \land \cdots\land x_n)$ where $n \geq 2$ results in $F$

I know $x_{n+1}$ has to be $F,$ so that's one choice.

I know that $(x_1 \land x_2 \land \cdots\land x_n)$ must be $F$ which means at least one of the terms inside has to be F. So that's $1 \cdot 2^{n - 1}$ choices.

I'm getting the answer to be $2^{n - 1}$ choices but if I try $n = 2$ and draw a truth table I get $3$ choices (as opposed to 2 from my answer). If $n = 3,$ I get $7$ choices (as opposed to $4$ from my answer).

What am I doing wrong?

答: As you said, you need at least one of the $n$ propositions $x_k$ to be false. Thus, there is one such assigment for every non-empty subset of $\{x_1,\ldots,x_n\}$. This set has $2^n$ subsets, only one of which is empty, so it has $2^n-1$ non-empty subsets, not $2^{n-1}$, and there are therefore $2^n-1$ assigments making the compound proposition false. For $n=2$ this is $2^2-1=3$, exactly as you discovered from your truth tables.


问:
What does a vector in $\mathbb{R}^{n}$ mean? What is the difference between $\mathbb{R}^{n}$ and a vector in $\mathbb{R}^{n}$?
I keep seeing that $\mathbb{R}^{n}$ is the set of all $n$ sized 'ordered' tuples or whatever.

And then it says that a vector in $\mathbb{R}^{n}$ is a list of ordered $n$ elements. What is the difference? They sound exactly the same?

And can someone explain the difference between the $0$ vector and $0$ matrix and additive identity?

答:
As you say, $\mathbb R^n$ is the set of all ordered $n$-tuples of real numbers.

A vector in $\mathbb R^n$ is just one ordered $n$-tuple of real numbers.


问:
ideal and ideal classes in the ring of integers.

(I'm studying Pierre Samuel's Algebraic theory of numbers.) Let $K$ be
  a number field of degree $n$, $d$ the absolute discriminant of $K$,
  and $\mathfrak{a}$ a nonzero integral ideal of $K$. Then
  $\mathfrak{a}$ contains a nonzero element $x$ such that $$|N_{K/Q}(x)|
 \le \left(\frac4{\pi}\right)^{r_2}\frac{n!}{n^n}|d|^{1/2}N(\mathfrak{a})$$ and
  every ideal class of $K$ contains an integral ideal $\mathfrak{b}$
  such that $$N(\mathfrak{b}) \le
 \left(\frac4{\pi}\right)^{r_2}\frac{n!}{n^n}|d|^{1/2}$$

Let $A$ be the ring of integers(elements of $K$ which are integral over $\mathbb{Z}$). But is it possible to show that the above theorems also holds for any ideal of $A$, and any ideal class of $A$? In other words for the first theorem, given an ideal $I$ of $A$ is it possible to show that $I$ is also an ideal of $K$ and a nonzero element $x$ can be found to be in $A$? and for the second one, given any ideal class of $A$ is it possible to show that it is in ideal class of $K$ and the integral ideal can be found in $A$?

答:
This is called Minkowski's bound. I personally don't think that it makes much sense to talk about the ideals of a number field (a field's only ideals are the zero ideal and itself), and even less sense to talk about its ideals as separate from its ring of integers' given the context: here the integral ideals of $K$ are precisely the integral ideals of $\mathcal{O}_K$, its ring of integers, so your first statement is true.

As to your second statement, again, it doesn't really make much sense to talk about the ideal classes of $K$ and $\mathcal{O}_K$ as different things. The ideal class group is defined as the quotient of the fractional ideals of $\mathcal{O}_K$ by the principal fractional ideals of $\mathcal{O}_K$. But what you are essentially asking is true: every ideal class in $\text{Cl}(\mathcal{O}_K)$ is represented by an integral ideal of $\mathcal{O}_K$ with norm at most $\mu_K=\left(\frac{4}{\pi}\right)^{r_2}\frac{n!}{n^n}\sqrt{|d|}$.


问:
Finding the MLE estimate from a log function
If I have the following function:

$$\ln L(\mu,\sigma^2)= -n \ln (\sqrt{2 \pi \sigma^2})+\sum_{i=1}^n \frac{-(x_i-\mu)^2}{2\sigma^2}$$

How can I find the MLE estimate $σ^2_\text{MLE}$?

I have already shown that $\mu = \bar{x}$

答:
Take the derivative wrt $\sigma^2$:

$$-\frac n {\sqrt{2\pi\sigma^2}}\cdot \frac{2\pi}{2\sqrt{2\pi\sigma^2}}+\frac{\sum -(x-\mu)^2}{2}\cdot \frac{-1}{(\sigma^2)^2}=0\\
=\frac{-2n\pi}{4\pi\sigma^2}+\frac{\sum(x-\mu)^2}{2(\sigma^2)^2}\\
\frac{n}{2\sigma^2}=\frac{\sum(x-\mu)^2}{2(\sigma^2)^2}\\
\sigma^2=\frac{\sum(x-\mu)^2}{n}$$

Elaborate verification

To be rigorous, we need to show that this value of $\sigma^2$ maximizes the density. The first derivative is $$\frac{-n}{2\sigma^2}+\frac{\sum(x-\mu)^2}{(\sigma^2)^2}?0\\
-\sigma^2+\frac{\sum(x-\mu)^2}{n}?0$$

where the question mark  represents an unknown relationship. We can see that the derivative is 0 at $\sum(x-\mu)^2/n$. When $\sigma^2$ is greater than this, the first derivative is negative, and when it is less than this, the first derivative is positive. So we can conclude that $\sigma^2$ is a global maximum. For fun, I also take the second derivative.

$$\frac{\partial^2}{(\partial \sigma^2)^2}\log l(\sigma^2|\mathbf x)=\frac{n}{2(\sigma^2)^2}-\frac{\sum(x-\mu)^2}{(\sigma^2)^3}\\
\sigma^2-\frac{2\sum(x-\mu)^2}{n}?0$$

This is zero when $\sigma^2$ is $\frac{2\sum(x-\mu)^2}{n}$, positive when it is greater than that, and negative when it is less than that. So there is an inflection point at $\frac{2\sum(x-\mu)^2}{n}$, the log likelihood is concave up when $\sigma^2$ is greater than that, and concave down when it is less than that.

Conclusion

$\sigma^2_{MLE}=\frac{\sum(x-\bar x)^2}{n}$


问:
Determine if $x^3+y^3+z^3+t^3 = 10^{2021}$ has a solution
I want to know if the equation $x^3+y^3+z^3+t^3=10^{2021}$ has distinct positive integer solutions
PowersRepresentations[10^2021, 4, 3]

return

PowersRepresentations::ovfl: Overflow occurred in computation.

```<code>FindInstance[{x^3 + y^3 + z^3 + t^3 == 10^2021, 0 < x < y < z < t}, {x,y,z,t}, Integers]
</code>```

My computer runs too long. How can I reduce timing to solve this equation?

OwnerDisplayName: expression

Body:
Easy, notice that $10^{2021}=100\times 10^{3\times 673}$. Next use your code, but for the factor 100.

FindInstance[{x^3 + y^3 + z^3 + t^3 == 100, 0<x<y<z<t}, {x,y,z,t}, Integers]

yielding a single result

(*{{x -> 1, y -> 2, z -> 3, t -> 4}}*)

Now verify the solution

(x^3 + y^3 + z^3 + t^3 /. {x -> 1 10^673,y -> 2 10^673,z -> 3 10^673,t -> 4 10^673}) == 10^2021
(* True*)

OwnerDisplayName: yarchik


问:
Rewrite $\min _{z \in \mathbb{R}^{n}}\|z\|_{1}$ s.t. $B z=d$ as an equivalent standard LP problem.
I want to rewrite the following problem

$$ \min _{z \in \mathbb{R}^{n}}\|z\|_{1} s.t. B z=d \ where\ \boldsymbol{B} \in \mathbb{R}^{\boldsymbol{m} \times \boldsymbol{n}} and \ \boldsymbol{d} \in \mathbb{R}^{\boldsymbol{m} \times \mathbf{1}}$$
into an equivalent LP problem in the form of

$$
\begin{array}{c}
\min c^{T} x \\
A x=b \\
x \geq 0
\end{array}
$$
$\|z\|_{1}$ is the norm 1 of vectors. The issue here is how to express this norm and how to find A,b, and c. I cannot think of a way to linearise and find these parameters.
Any suggestions??

答: Hint: Write $z_j=z_j^+-z_j^-$, where $z_j^+\ge 0$ and $z_j^-\ge 0$. Then replace $|z_j|$ with $z_j^++z_j^-$ in the objective.


问:
How do you get hyperbola by squaring a bell?
This is a Gaussian bell (aka normal distribution).

Its square, I belive looks the same. Yet, I see that chi-square distribution, which is a sum of k such bell squares, looks like

Take a look at yellow chi-squared, with k=1. It should be just single bell squared. But, it looks like a hyperbola instead of Gaussian. Why?

PS I read that normally-distributed signal generates a uniformly distributed power. Is it the same kind of magic?

答:
Consider a random variable $X$ with density $f$, say $X$ gaussian, and $Y=X^2$. Then $Y\geqslant0$ almost surely and, for every $y\geqslant0$, $[Y\leqslant y]=[-\sqrt{y}\leqslant X\leqslant\sqrt{y}]$ hence
$$
P[Y\leqslant y]=\int_{-\sqrt{y}}^{\sqrt{y}}f(x)\mathrm dx.
$$
Differentiating this yields the density of $Y$, namely, for every $y\geqslant0$,
$$
g(y)=\frac{f(\sqrt{y})+f(-\sqrt{y})}{2\sqrt{y}}.
$$
When $X$ is normal (centered or not), $f$ is continuous at $0$ hence the behaviour of $g$ at $0$ is
$$
g(y)\sim\frac{f(0)}{\sqrt{y}}.
$$
Note finally that $f^2$ is rarely a density function.

Edit: Recall that an integral depending on a parameter, say
$$
J(y)=\int_{u(y)}^{v(y)}w(x)\mathrm dx,
$$
has derivative
$$
J'(y)=w(v(y))v'(y)-w(u(y))u'(y).
$$


答:
Vectors can be added and be multiplied by scalars.  $R^n$ consists of points in an n-dimensional coordinate system, without any arithmetic involved.

Two-d example: vector $\overrightarrow{(1,2)}$ can be any place.  You could place the tail at (5,3) and the head will be at (6,5).  This different from the point (1,2).

Title: What does a vector in $\mathbb{R}^{n}$ mean? What is the difference between $\mathbb{R}^{n}$ and a vector in $\mathbb{R}^{n}$?

Body:
I keep seeing that $\mathbb{R}^{n}$ is the set of all $n$ sized 'ordered' tuples or whatever.

And then it says that a vector in $\mathbb{R}^{n}$ is a list of ordered $n$ elements. What is the difference? They sound exactly the same?

And can someone explain the difference between the $0$ vector and $0$ matrix and additive identity?


问:
Is my probability formula correct?

The Question

The response rate to telephone polls is around $2{\%}$. Of people who
respond to telephone polls, currently about $40{\%}$ approve of the
President. Suppose we perform a telephone poll by calling a random
sample of $50,000$ registered voters.

(a) Let $X$ be a binomial random variable representing the number of
people who respond to the telephone poll. What is the expected value
and standard deviation of $X$?

(b) Let $Y$ be a binomial random variable representing the number of
people who respond to the telephone poll and approve of the President.
What are the expected value and standard deviation of $Y$?

(c) Use R to find the probability that at least $420$ people respond
to the telephone poll and approve of the President. Give your R code.

My Understanding

This is my thought process:

For 1a, $X \sim \mathscr{B}(N, P)$, $N$ being the $50,000$ registered voters and $P$ being the $2\%$ (rate at which people are answering polls), so it would be $EV = 50000 * .02=1000$. The variance is $N * P *(1-P)$ so plugging in the numbers I would get $980$ and to get standard deviation it would just be the square-root of that so $31.3$

For 1b, it would be similar except replace $P$ with $40\% (.4)$, so the expected value would be $20,000$. The variance would be $50,000 * .4 * .6 = 12000$. Taking the square root would be $109.54$

Using R to find probability of at least $420$ people would just be dbinom(420, 50000, .02)

Please correct me if I am wrong, but I believe this is correct. Thank you in advance!

答:
Answer Key

(a) $X\sim \mathscr B (50000,.02)$ so that $E(X)=50000(.02)=1000$, $\sigma_X=\sqrt{50000(.02)(.98)}=31.30495$. Yup yours looks right.

(b) You want $Y\sim\mathscr B(50000, .02*.4)=\mathscr B(50000,.008)$. It says that of the people who respond, 40% are in favor. So not 40% of the whole population is in favor. This is a conditional probability, but you don't really need to know the term to be able to multiply the two numbers. Repeating the calculation in (a), you get $E(Y)=50000(.008)=400$ and $\sigma_Y=\sqrt{50000*.008*.992}=19.91984$

(c) The correct commands are either of the following. Subtracting the lower tail from 1 is the same as getting the upper tail. You don't want to use dbinom, because if you do, you will have to type it hundreds of times, e.g. 1-[dbinom(0,50000,.008)+dbinom(1,50000,.008)+...+dbinom(419,50000,.008)].

```<code>> pbinom(419,50000,.008,lower.tail=FALSE)
[1] 0.1637013
> 1-pbinom(419,50000,.008,lower.tail=TRUE)
[1] 0.1637013
</code>```

Title: Is my probability formula correct?

Body:
Answer Key

(a) $X\sim \mathscr B (50000,.02)$ so that $E(X)=50000(.02)=1000$, $\sigma_X=\sqrt{50000(.02)(.98)}=31.30495$. Yup yours looks right.

(b) You want $Y\sim\mathscr B(50000, .02*.4)=\mathscr B(50000,.008)$. It says that of the people who respond, 40% are in favor. So not 40% of the whole population is in favor. This is a conditional probability, but you don't really need to know the term to be able to multiply the two numbers. Repeating the calculation in (a), you get $E(Y)=50000(.008)=400$ and $\sigma_Y=\sqrt{50000*.008*.992}=19.91984$

(c) The correct commands are either of the following. Subtracting the lower tail from 1 is the same as getting the upper tail. You don't want to use dbinom, because if you do, you will have to type it hundreds of times, e.g. 1-[dbinom(0,50000,.008)+dbinom(1,50000,.008)+...+dbinom(419,50000,.008)].

> pbinom(419,50000,.008,lower.tail=FALSE)
[1] 0.1637013
> 1-pbinom(419,50000,.008,lower.tail=TRUE)
[1] 0.1637013


问:
Is this a probability measure on the cantor set?
$c$ is the Cantor function, $C$ the Cantor set, and $\rho$ the Lebesgue measure

We consider $\mu$ as $\mu(A) = \rho(c(A \cap C))$ for each each element of the tribute

Is $\mu$ currently defining probability measure on the Cantor set (means the support of $\mu$ is C) ?

I have issue showing the sigma-additivity...

答:
I assume you want to define $\mu$ on the Borel (or Lebesgue) $\sigma$-algebra in $\Bbb R$.

Let $c$ be the Cantor function, $C$ the Cantor set, and $\rho$ the Lebesgue measure. Let $\mathcal{B}$ be the Borel $\sigma$-algebra in $\Bbb R$.

Let $\mu(A) = \rho(c(A \cap C))$ for each each element $A \in \mathcal{B}$.

First, we must prove that  $\mu$ is well-defined. It means, we must prove that if $A \subseteq \Bbb R$ is Borel measurable then $c(A\cap C)$ is Borel (or Lebesgue) measurable, so we can have $\rho(c(A \cap C))$.

Let $\Sigma =\{A \subseteq \Bbb R: \exists E \subseteq [0,1] \textrm{ Borel measurable, such that } A\cap C=c^{-1}(E) \}$. It is easy to prove that $\Sigma$ is a $\sigma$-algebra and that, since $c$ is monotone, every open interval is in $\Sigma$. So $\mathcal{B} \subseteq \Sigma$.  So, if $A \subseteq \Bbb R$ is Borel measurable, there is $E$ Borel measurable such that $A\cap C=c^{-1}(E)$, so, since $c: C \rightarrow [0,1]$ is surjective, we have that $c(A\cap C)=E$ is Borel measurable. So $\mu$ is well-defined.

Let us now prove $\mu$ is a measure. We have
$$\mu(\emptyset) = \rho(c(\emptyset \cap C)) =\rho(c(\emptyset )) = \rho(\emptyset) =0$$

Now, let $\Gamma =\{ y\in [0,1] : \exists a,b \in C, a\neq b \textrm{ and } y=c(a)=c(b)\}  $. It is easy to prove that $\Gamma$ is countable and so $\rho(\Gamma)=0$.

Now let $A$ and $B$ be disjoint measurable subsets of $\Bbb R$. Then, $A \cap C$ and $B \cap C$ are disjoint measurable subsets of $C$. Note that $c(A \cap C)$ and $c(B \cap C)$ may not be disjoint, because $c$ (even restricted to $C$) is not injective, but $c(A \cap C) \cap c(B \cap C) \subseteq \Gamma$. So, $\rho(c(A \cap C) \cap c(B \cap C))=0$.
So we have
\begin{align*}
\mu(A \cup B) & = \rho(c((A \cup B)\cap C)) =\\
& =  \rho(c((A\cap C) \cup ( B \cap C))) = \\
&=\rho(c(A\cap C) \cup c(B\cap C)) = \\
& = \rho(c(A\cap C)) + \rho(c(B\cap C)) - \rho(c(A\cap C) \cap c(B\cap C)) = \\
& = \rho(c(A\cap C)) + \rho(c(B\cap C)) = \\
& = \mu(A) + \mu(B)
\end{align*}

Now to prove that $\mu$ is $\sigma$-additive, it is enough  to prove that $\mu$ is continuous from below.

Suppose $\{A_i\}_i$ is a non-decreasing monotonic family of measurable subsets of $\Bbb R$. Then $\{A_i \cap C\}_i$ is a  non-decreasing monotonic family of measurable subsets of $C$. Then $\{c(A_i \cap C)\}_i$ is a  non-decreasing monotonic family of measurable subsets of $[0,1]$. So, wee have

\begin{align*}
\mu \left (\bigcup_i A_i \right )& = \rho \left (c \left ( \left ( \bigcup_i A_i \right )\cap C \right ) \right ) = \\
&= \rho \left ( \bigcup_i c(A_i \cap C)   \right) = \\
&= \lim_i \rho(c(A_i \cap C)) = \\
& =  \lim_i \mu(A_i)
\end{align*}

So $\mu$ is $\sigma$-additive.

It is immediate that $\mu(\Bbb R)= \rho(c(\Bbb R \cap C))=\rho(c(C))=\rho([0,1])=1$. So $\mu$ is a probability.  It is also immediate that if $A\cap C=\emptyset$ then $\mu(A)= \rho(c(A\cap C)) =\rho(c(\emptyset))=\rho(\emptyset) = 0$. So, a support of $\mu$ is $C$.


问:
Is it true that infinite product of infinitesimals may not be an infinitesimal?
Is it true that infinite product of infinitesimals may not be an infinitesimal?

Here's my attempt.

Using ultraproduct construction,
 $$\epsilon_1=[\langle 1, \frac{1}{2}, \frac{1}{3},\frac{1}{4},\ldots\rangle]$$

$$\epsilon_2=[\langle 1, 2, \frac{1}{3},\frac{1}{4},\ldots\rangle]$$

$$\epsilon_3=[\langle 1, 1, 9,\frac{1}{4},\ldots\rangle]$$

$$\ldots$$

In general, $\epsilon_n=[\langle a_k\rangle_{k \in \Bbb N}]$ such that : $$a_k =
\begin{cases}
1,  & \text{if $k < n-1$ } \\
n^{n-1}, & \text{if $k=n-1$ }  \\
\frac {1}{n+1}, & \text{if $k > n-1$ }  \\
\end{cases}$$

So $\prod_{i \in {\Bbb Z}_{+}}{\epsilon_i} = 1$. I think it's true, but it's counterintuitive. Is there something wrong? Or is there something subtle that prevent it hehaving like the limit of a standard Cauchy sequence? Is there an standard example?

Added: As pointed out in  Brian M. Scott's comment, the problem is that "componentwise products cannot be right", different representatives of a hyperreal will give different answers. So is there a correct definition of infinite product of hyperreals?

答:
I do not think your example is an infinite product of infinitesimals.

For example,
$$
\begin{align}
S=&\lim_{n\to\infty}\sum_{k=1}^n\frac k{n^2}\\
=&\lim_{n\to\infty}\left(\frac1{n^2}+\frac2{n^2}+\cdots+\frac{n-1}{n^2}+\frac n{n^2}\right)\\
=&\lim_{n\to\infty}\frac{\frac12n(n+1)}{n^2}=\frac12
\end{align}
$$
is a widely accepted infinite sum of infinitesimals. We can see that any term in the sum is an infinitesimal, including $\frac n{n^2}$.

Set $a_k(n)=\frac{k}{n^2}$, the example satisfies
$$
\lim_{n=\infty}a_1(n)=\lim_{n=\infty}a_2(n)=\cdots=\lim_{n=\infty}a_{n-1}(n)=\lim_{n=\infty}a_n(n)=0
$$
and
$$
S=\lim_{n\to\infty}\sum_{k=1}^n a_k(n).
$$

Similarly, I call such
$$
P=\lim_{n\to\infty}\prod_{k=1}^n a_k(n)
$$
as an infinite product of infinitesimals.

Obviously, your example does not satisfy this requirement. $n^{n-1}$ is always a term in the product, but it is not an infinitesimal, which is counterintuitive as you said.

However, I cannot provide an example that $P\ne0$, and I cannot either prove that $P$ must be $0$. I guess $P$ must be $0$.


问:
Prove that the unit ball in $L^{p}([0,1]),$ where $1 \leq p \leq \infty,$ is not strongly compact.
Prove that the unit ball in $L^{p}([0,1]),$ where $1 \leq p \leq \infty,$ is not strongly compact. Give an example of a bounded sequence in $L^{1}([0,1])$ that does not have a weakly convergent subsequence. Why doesn't this contradict the Banach Alaoglu theorem?

I was not able to progress because I'm not able to understand strong compactness.

答:
Just for convinience, let me consider $L^1([-1,1])$. Take $f_n(x) = 0$ if $\lvert x \rvert >1/2n$, otherwise put $f_n(x) = n$. It is clear that $\int_{[-1,1]} \lvert f_n(x) \rvert \ dx = 1 \ \forall n$, and hence the sequence is bounded. Now remember that the dual space of $L^1$ is $L^{\infty}$ in the sense that if $T \in (L^1)^*$ then there is a function $\varphi \in L^{\infty}$ such that

$$T(f) = \int_{[-1,1]} f(t)\varphi(t) \ dt$$

Considering this, a sequence $f_n$ is weakly convergent iff there is a function $f \in L^1$ such that

$$\int_{[-1,1]} f_n(t)\varphi(t) \ dt \to \int_{[-1,1]} f(t)\varphi(t) \ dt \ \ \ \ \forall \varphi \in L^{\infty}$$

But this can't happen with any subsequence of $f_n$. For this observe that if $\varphi$ is continuous then

$$\int_{[-1,1]} f_n(t)\varphi(t) \ dt \to \varphi(0)$$

and clearly $\varphi(0)$ can't be written as $\int_{[-1,1]} f(t)\varphi(t) \ dt$ for any $f$, because we can modify our $\varphi$ changing the value of the integral but not the value of $\varphi(0)$.

To see why $\int_{[-1,1]} f_n(t)\varphi(t) \ dt \to \varphi(0)$

$$\Biggl\lvert \varphi(0) - \int_{[-1,1]} f_n(t)\varphi(t) \ dt \Biggr\rvert = \Biggl\lvert \int_{[-1,1]} f_n(t)(\varphi(0)-\varphi(t)) \ dt \Biggr\rvert = \Biggl\lvert \int_{-1/2n}^{1/2n} n(\varphi(0)-\varphi(t)) \ dt  \Biggr\rvert $$

since $\varphi$ is continuous $\lvert \varphi(t)-\varphi(0)\rvert \leq \epsilon$ if $t$ belongs to $[-1/2n,1/2n]$ for $n$ great enough. Then, applying triangular inequality

$$\Biggl\lvert \int_{-1/2n}^{1/2n} n(\varphi(0)-\varphi(t)) \ dt  \Biggr\rvert \leq \epsilon \int_{-1/2n}^{1/2n} n\ dt = \epsilon$$

This example doesn't contradict the Banach Alaoglú theorem since this theorem applies to $X^*$. What happens is that $L^1$ is not the dual space of any $X$.

With respect to the question about the unit ball of $L^p$, the answer is given here  en.wikipedia.org/wiki/Riesz%27s_lemma, where the Riesz lemma is used. This lemma tells you that in a banach space the unit ball is compact iff the space has finite dimension.


问:
Symbol for "if and only if": $\implies$ or $\iff$?
I was wondering about the iff sign in maths.
I've never learned about it in school & see it a lot online. Usually the sign looks like this: $\implies$, but in math.stackexchange I always see this: $\iff$.

Does that sign means iff?

Am I using iff right here:

$$8x + 2x - 44 = 220 + 4 - x \implies 11x = 268 \implies x = 24.36$$

答:
When it comes to "if-then", always draw circles

In math, you have Necessary and Sufficient conditions. Sufficient implies the necessary. This implication is denoted by S => N. When you are inside S, then, for sure you are inside N. When A is sufficient for B, you say "if A then B" and write A => B. When both imply each other, you say "iff A then B" or "iff B then A" because implication is bidirectional and you write equivalence instead of implication, A <=> B.

I think saying that things are equivalent is less confusing than iff.

In

$$8x + 2x - 44 = 220 + 4 - x \implies 11x = 268 \implies x = 24.36$$

It is legal to use $\implies$ despite of equivalence because you show the direction of your derivation. But, I am not mathematician. And I really find your question interesting. I think that professional proofs use turnstile, ⊢, for your implication instead:

$$8x + 2x - 44 = 220 + 4 - x ⊢ 11x = 268 ⊢ x = 24.36$$

to show how first truth implies the other.


问:
Find the sum $|\cos \frac{2\pi}{7} + \cos \frac{ 4\pi}{7} +...\cos \frac{12\pi}{7}|$
The expression can be reduced as
$$|\cos \frac{2\pi}{7} -\cos \frac {\pi}{7} +\cos \frac{4\pi}{7} -\cos \frac{3\pi}{7}....|$$
$$=|2\sin \frac{\pi}{14}|| \sin \frac{3\pi}{14} + \sin \frac{7\pi}{14} +\sin \frac {11\pi}{14}|$$
$$ =2\sin \frac{\pi}{14} | 1 + 2\sin \frac{\pi}{2} \cos \frac{8\pi}{14}|$$
$$=2[\sin \frac {9\pi}{14} + \sin \frac {\pi}{14}]$$

I don’t think it’s reducible any further, but the given answer is 1. Where am I going wrong?

答:
The error is that $\sin \frac{3\pi}{14} + \sin \frac{7\pi}{14} +\sin \frac {11\pi}{14} \ne 1 + 2\sin \frac{\pi}{2} \cos \frac{8\pi}{14}$.

$\frac{3+11}{2} = 7$ instead of $8$, thus $\sin \frac{3 \pi}{14} + \sin \frac{11 \pi}{14} = 2 \sin \frac{7 \pi}{14} \cos \frac{4 \pi}{14}$, so the whole thing should equal $1 + 2 \cos \frac{2 \pi}{7}$ instead.


问:
Is there a difference between $\mathbb R^\infty$, $\mathbb{R^N}$, and $\mathbb R^\omega$?
I've seen these three notations and I'd like to know the difference:

$\mathbb{R}^\infty$

$\mathbb{R}^\mathbb{N}$

$\mathbb{R}^\omega$

答:
Hints : A basic open set of $\mathbb{R}^{\omega}$ is of the form
$$
U = U_1\times U_2\times \cdots \times U_n \times \mathbb{R} \times \mathbb{R} \times \cdots
$$
where $U_i$ are open sets in $\mathbb{R}$

similarly  for $\mathbb{R}^\infty$ and  $\mathbb{R}^\mathbb{N}$


问:
Lebesgue measure of difference of two translations of a set
Let $C$ be a bounded measurable set on $\mathbb{R}$ and $m$ be Lebesgue measure.
Compute  $\lim\limits_{a\to b} m[(C + a )\setminus(C + b)]$, where $C+a=\{c+a| c\in C\}$ is a translation of $C$.

I got the result with $C$ is an interval $(x,y)$ whose result is $\lim\limits_{a\to b} m[(C + a )\setminus(C + b)]=0$, but not in general case $C$ is bounded. I guess it should be zero also.

How could I deal with the general case? Could you give me a hint? Thanks in advanced.

答: Hint: For any $\epsilon >0$ there exist disjoint intervals $(a_i,b_i]$ such that $m (C \Delta (\cup_i (a_i,b_i])) <\epsilon$. A proof of this basic approximation thoerem can be found in Halmos's Measure Theory book. [See Theorem D page 56].  Hence,  the required limit is $0$. [Note that $((a_i,b_i]+a)\setminus ((a_i,b_i]+b)$ are disjoint].


答:
$$
\ln L(\mu,\sigma^2)= -n \ln \sqrt{2 \pi \sigma^2} - \frac 1 {2\sigma^2} \sum_{i=1}^n (x_i-\mu)^2
$$

You report that you have shown that the value of $\mu$ that maximizes this is $\overline x = (x_1+\cdots+x_n)/n.$

One could say that this is with $\sigma$ fixed, but more to the point, this result is the same regardless of $\sigma.$ And for any here who have not noticed this before, it is of interest to note that this is just the value of $\mu$ that minimizes $\sum_{i=1}^n (x_i-\mu)^2,$ and that the best way to see that is via the identity in algebra that says
$$
\sum_{i=1}^n (x_i-\mu)^2 = n(\mu-\overline x)^2 + \sum_{i=1}^n (x_i-\overline x)^2.
$$

What is sought is the pair $(\mu,\sigma^2)$ that maximizes $L(\mu,\sigma^2),$ and that is the same as the pair that maximizes $\ln L(\mu,\sigma^2),$ and that expression is used because it requires less work to get to the answer.

The maximizing value of $\mu$ with $\sigma^2$ fixed is the same regardless of $\sigma^2,$ and consequently we can just find the value of $\sigma^2$ that maximizes $L(\overline x,\sigma^2)$.

\begin{align}
\ln L(\overline x,\sigma^2) & = -n \ln \sqrt{2 \pi \sigma^2} - \frac 1 {2\sigma^2} \sum_{i=1}^n (x_i-\overline x)^2 \\[8pt]
& = -n\ln \sqrt{2\pi \sigma^2} - \frac{ns^2}{2\sigma^2} \\[8pt]
& = \text{constant} -\frac n 2 \ln (\sigma^2) - \frac{ns^2}{2\sigma^2}. \tag 1
\end{align}
I prefer to write that last line as $\text{constant}-n\ln\sigma - \dfrac{ns^2}{2\sigma^2}$ and differentiate with respect to $\sigma,$ but I've noticed various authorities preferring to treat $\sigma^2$ as a simple thing, so here I will do it that way.

The derivative of $(1)$ with respect to $\sigma^2$ is
$$
- \frac n {2\sigma^2} + \frac{ns^2}{2(\sigma^2)^2} = n\cdot\frac{s^2-\sigma^2}{\sigma^4} \quad \begin{cases} >0 & \text{if } 0<\sigma^2<s^2 \\ =0 & \text{if } \sigma^2=s^2, \\ <0 & \text{if } \sigma^2 > s^2. \end{cases}
$$
So this function of $\sigma^2$ increases on the interval $(0,\sigma^2]$ and decreases on the interval $[\sigma^2,+\infty).$ Therefore it has a glabal maximum at $\sigma^2 = s^2.$

Title: Finding the MLE estimate from a log function

Body:
If I have the following function:

$$\ln L(\mu,\sigma^2)= -n \ln (\sqrt{2 \pi \sigma^2})+\sum_{i=1}^n \frac{-(x_i-\mu)^2}{2\sigma^2}$$

How can I find the MLE estimate $σ^2_\text{MLE}$?

I have already shown that $\mu = \bar{x}$


答:
$\mathbb{R}^{\mathbb{N}}$ and $\mathbb{R}^{\omega}$ are almost always synonyms, and both refer to the set of functions $\mathbb{N}\to\mathbb{R}$ (aka sequences of real numbers indexed by $\mathbb{N}$).  The symbol $\omega$ is an alternate name for the set of natural numbers (or more specifically, for one particular set-theoretic construction of the natural numbers) which is commonly used in set theory.  Conceivably someone might distinguish $\mathbb{R}^\mathbb{N}$ and $\mathbb{R}^\omega$ as, for instance, $\omega$ is always taken to include $0$ but some authors exclude $0$ from $\mathbb{N}$.  I've never seen anyone actually intentionally make such a distinction, though.

$\mathbb{R}^\infty$ is sometimes a synonym for $\mathbb{R}^\mathbb{N}$, but sometimes it instead refers to the subset of $\mathbb{R}^\mathbb{N}$ consisting of those functions $\mathbb{N}\to\mathbb{R}$ that are $0$ on all but finitely many inputs.

Title: Is there a difference between $\mathbb R^\infty$, $\mathbb{R^N}$, and $\mathbb R^\omega$?

Body:
I've seen these three notations and I'd like to know the difference:

$\mathbb{R}^\infty$

$\mathbb{R}^\mathbb{N}$

$\mathbb{R}^\omega$


问:
Can it be argued that most choices of $f:M^{\rm2} \mapsto \mathbf{\mathbb{R}^{\mathrm{3}}}$ will be mostly injective?
It seems intuitively that if $f:M^{\rm2} \looparrowright \mathbf{\mathbb{R}^{\mathrm{3}}}$ for some choice of function(s), then most functions that are in some sense “well behaved” should produce a surface in $\mathbf{\mathbb{R}^{\mathrm{3}}}$ that is mostly injective.

Is this intuition sensible?

答:
This seems like a soft question, and my initial response is that you're intuition is correct.

First (please forgive me if this is all familiar): Surfaces (even different patches of the same surface) intersect generically in curves. These are called transverse intersections, where the tangent spaces of the surface patches together span the tangent space of the ambient $\mathbb{R}^3$.

A nice way to keep this straight in your head is to think in terms of codimension instead of dimension. If $L_1$ and $L_2$ are submanifolds of dimensions $\ell_1$ and $\ell_2$, respectively, immersed in $M$ of dimension $m$. Say that $L_1$ and $L_2$ intersect transversely to form submanifold $N$ of dimension $n$. Then the codimensions add:
$$
(m - n) = (m - \ell_1) + (m - \ell_2)
\qquad\Longleftrightarrow\qquad
n = \ell_1 + \ell_2 - m
$$

So, for example in $\mathbb{R}^3$ $(m = 3)$ with surfaces $(\ell_1 = \ell_2 = 2)$. Transverse intersection will be in dimension
$$
n = 2 + 2 - 3 = 1,
$$
i.e., curves.

Now questions of what happens "generically" or "usually" can sometimes be made precise by using measure theory. See, e.g., Sard's Theorem which shows that the set of critical values of a smooth function between manifolds is a null set (measure zero). So, if you're picking values in the image of the function, you have probability $0$ of picking a critical value.

Perhaps you can frame your question in terms of self-intersections of a generic immersion in a mapping space (space of all such immersions)?


问:
Proving two countably infinite sets have a one-to-one correspondence.
Let $A$ and $B$ be two sets. Suppose that $A$ and $B$ are both countably infinite sets. Prove that there is a one-to-one correspondence between $A$ & $B$.

Here is the proof I have. I tried going about the proof by first show $f: A \rightarrow N$ has a one-to-one correspondence and $g: B \rightarrow N$ as a one-to-one correspondence as well. Not sure if this was the right thing to do. Then I did theta: $A \rightarrow B$. Not sure if I defined theta right and accurately showed that there is a one-to-one correspondence between $A$ and $B$.

Proof: Suppose that $A$ and $B$ are both countably infinite sets. As a result of the two sets being countably infinite, we know set $A$ and $B$ can be put in a one-to-one correspondence with the set of positive integers. Thus we need to find a one-to-one correspondence between $N$ to $A$ and $N$ to $B$.

Lets define $$f: A \rightarrow N \,|\, f(n)= 2n, \,\, \forall n\in \{A\}$$

Then suppose there is a a,b in the set $A$ such that $f(a)=f(b)$ $\rightarrow$ $2a = 2b$ $\rightarrow a=b$.
Therefore, there is a one-to-one correspondence.

Similarly, define
$$g: B \rightarrow N \,|\, f(m) = 2m-1, \,\, \forall m \in \{B\}$$

Then suppose there is a $c,d$ in the $B$ such that $g(c)=g(d)$ $\rightarrow 2c-1 =2d-1$ $\rightarrow 2c=2d$ $\rightarrow c=d$

Therefore, there is a one-to-one correspondence.

The $|A|=|B|=|N|$ $(N \in \{\mathbb{N}\})$

Now, let $\theta: A \rightarrow B$ via $\theta(2n)=2n-1$ for all $n$ in the set $N$

Suppose $x,y$ in the set $N$ such that $\theta(x)=\theta(y)$.
$\theta(x) = \theta(y)$ $\rightarrow 2x-1 =2y-1 \rightarrow 2x=2y \rightarrow x=y$

Hence there is a one-to-one correspondence between the two countably infinite sets $A$ & $B$.

答:
This problem is asking for an abstract proof. The first step is to state your givens and your goal:

The set $A$ is countably infinite. The set $B$ is countably infinite.

We want to prove the at $A$ and $B$ are the same size.

Doing this may seem trivial, but it helps to clarify what you have and what you want.

Then we figure out what definitions are relevant. In this case, there are two:

A set $S$ is "countably infinite" if there is a bijection from $S$ to $\mathbb{N}$, the set of natural numbers.

Two sets $S$ and $T$ are "the same size" if there exists a bijection from $S$ to $T$.

The definition of bijection is only important insofar as the next step, looking over what we have already proven, and can thus use in this proof.

Have you (or your book) proven that bijections are invertible? That the inverse of a bijection is also a bijection? That the composition of two bijections is itself a bijection? If not, try to prove them now. All of these facts are vital to this proof.

With all that out of the way, we can begin with the actual proof:

We know $A$ is countably infinite, which in turn means there is a bijection from $A$ to $\mathbb{N}$. Call this bijection $a$.

Note that we do not define $a(x)$. This is because we have no idea what $x$ looks like other than "an element of $A$". $x$ could be an integer, a real number, a complex number, a color, a person, the empty set, whatever! All we know, and need to know, is that a bijection from $A$ to $\mathbb{N}$ exists, and we are calling it $a$.

Moving on: We also know that that $B$ is countably infinite, so there is a bijection from $B$ to $\mathbb{N}$. Call it $b$; again, we do not define $b(y)$, for the same reasons as above. We know a bijection from $B$ to $\mathbb{N}$ exists, and we are calling it $b$.

Now we need to show that there is a bijection from $A$ to $B$. Unfortunately, we only have bijections from $A$ to $\mathbb{N}$ (the function $a$) and from $B$ to $\mathbb{N}$ (the function $b$). What to do?

First, we invert $b$, giving us $b^{-1}$. How? Since $b$ is a bijection, $b^{-1}$ exists and is a function from $\mathbb{N}$ to $B$. In fact, it is a bijection from $\mathbb{N}$ to $B$.

Second, we compose $a$ and $b^{-1}$ to produce $b^{-1} a$. How? Since $a$ is a bijection from $A$ to $\mathbb{N}$ and $b^{-1}$ is a bijection from $\mathbb{N}$ to $B$, they can be composed (in the order given) to form a function from $A$ to $B$. In fact, it is a bijection from $A$ to $B$.

And thus, we have a bijection from $A$ to $B$, and thus, $A$ and $B$ are the same size. QED.

As a follow up, can you prove that $B$ and $A$ are the same size?