Logo
Overview
v1.5.0(00734247): "Testing"

v1.5.0(00734247): "Testing"

November 18, 2025
2 min read

Test

Testing

More testing

Definition (Continuous function)

A function f:XYf: X \rightarrow Y between topological spaces is continuous if for every open set VYV \subseteq Y, the preimage f1(V)Xf^{-1}(V) \subseteq X is open in XX.

Explanation (Equivalent formulations)

For metric spaces, continuity can be characterized by: ε>0,δ>0\forall \varepsilon > 0, \exists \delta > 0 such that dX(x,y)<δ    dY(f(x),f(y))<εd_X(x,y) < \delta \implies d_Y(f(x),f(y)) < \varepsilon. This captures the intuition that points close to each other in XX map to points close to each other in YY.

Theorem (Law of Large Numbers)

Let X1,X2,X_1, X_2, \ldots be a sequence of independent and identically distributed random variables with expected value E[Xi]=μ<\mathbb{E}[X_i] = \mu < \infty. Then for any ε>0\varepsilon > 0:

limnP(1ni=1nXiμ>ε)=0 \lim_{n \to \infty} P\left(\left|\frac{1}{n}\sum_{i=1}^{n}X_i - \mu\right| > \varepsilon\right) = 0
Proof (Proof)

We’ll prove this using Chebyshev’s inequality. Let Sn=i=1nXiS_n = \sum_{i=1}^{n}X_i and σ2=Var(Xi)\sigma^2 = \text{Var}(X_i). By Chebyshev’s inequality:

P(Snnμε)Var(Sn/n)ε2 P\left(\left|\frac{S_n}{n} - \mu\right| \geq \varepsilon\right) \leq \frac{\text{Var}(S_n/n)}{\varepsilon^2}

Since the variables are independent, we have:

Var(Sn/n)=Var(Sn)n2=nσ2n2=σ2n \text{Var}(S_n/n) = \frac{\text{Var}(S_n)}{n^2} = \frac{n\sigma^2}{n^2} = \frac{\sigma^2}{n}

Substituting this into our inequality:

P(Snnμε)σ2nε2 P\left(\left|\frac{S_n}{n} - \mu\right| \geq \varepsilon\right) \leq \frac{\sigma^2}{n\varepsilon^2}

As nn \to \infty, the right side approaches 0, which proves the theorem.

Lemma (Monotone Convergence Theorem)

Let (fn)(f_n) be a sequence of non-negative measurable functions such that fn(x)fn+1(x)f_n(x) \leq f_{n+1}(x) for all nNn \in \mathbb{N} and almost all xx. Define f(x)=limnfn(x)f(x) = \lim_{n \to \infty} f_n(x). Then:

limnfndμ=fdμ \lim_{n \to \infty} \int f_n \, d\mu = \int f \, d\mu
Proof (Proof)

Let gn=fnχEg_n = f_n \cdot \chi_E where E={x:f(x)<}E = \{x : f(x) < \infty\}. By Fatou’s lemma:

fdμ=limngndμlim infngndμ=lim infnfndμ \int f \, d\mu = \int \lim_{n \to \infty} g_n \, d\mu \leq \liminf_{n \to \infty} \int g_n \, d\mu = \liminf_{n \to \infty} \int f_n \, d\mu

For the reverse inequality, note that fnff_n \leq f for all nn, so fndμfdμ\int f_n \, d\mu \leq \int f \, d\mu. Taking the limit:

lim supnfndμfdμ \limsup_{n \to \infty} \int f_n \, d\mu \leq \int f \, d\mu

Combining these inequalities:

fdμlim infnfndμlim supnfndμfdμ \int f \, d\mu \leq \liminf_{n \to \infty} \int f_n \, d\mu \leq \limsup_{n \to \infty} \int f_n \, d\mu \leq \int f \, d\mu

Therefore, limnfndμ=fdμ\lim_{n \to \infty} \int f_n \, d\mu = \int f \, d\mu.

Super testing

Exercise (Finding the derivative of a product function)

Calculate the derivative of f(x)=x3sin(x)f(x) = x^3 \sin(x) using the product rule.

Answer
ddx[x3sin(x)]=3x2sin(x)+x3cos(x) \frac{d}{dx}[x^3 \sin(x)] = 3x^2 \sin(x) + x^3 \cos(x)
Problem (Convergence of arithmetic means)

Prove that if a sequence (an)(a_n) converges to LL, then the sequence of arithmetic means (a1+a2++ann)(\frac{a_1 + a_2 + \ldots + a_n}{n}) also converges to LL.

Solution (Detailed proof)

Let ε>0\varepsilon > 0 be given. Since (an)(a_n) converges to LL, there exists NNN \in \mathbb{N} such that anL<ε2|a_n - L| < \frac{\varepsilon}{2} for all nNn \geq N. Let Sn=a1+a2++annS_n = \frac{a_1 + a_2 + \ldots + a_n}{n} be the sequence of arithmetic means.

We can split SnS_n as follows:

Sn=a1+a2++aN+aN+1++annS_n = \frac{a_1 + a_2 + \ldots + a_N + a_{N+1} + \ldots + a_n}{n}

For n>Nn > N, we have:

SnL=a1+a2++annL=a1+a2++annLn=(a1L)+(a2L)++(anL)na1L+a2L++aNL+aN+1L++anLn\begin{align*} |S_n - L| &= \left|\frac{a_1 + a_2 + \ldots + a_n}{n} - L\right| \\ &= \left|\frac{a_1 + a_2 + \ldots + a_n - nL}{n}\right| \\ &= \left|\frac{(a_1 - L) + (a_2 - L) + \ldots + (a_n - L)}{n}\right| \\ &\leq \frac{|a_1 - L| + |a_2 - L| + \ldots + |a_N - L| + |a_{N+1} - L| + \ldots + |a_n - L|}{n} \end{align*}

Let M=max{a1L,a2L,,aNL}M = \max\{|a_1 - L|, |a_2 - L|, \ldots, |a_N - L|\}. Then:

SnLNM+(nN)ε2n=NMn+nNnε2 |S_n - L| \leq \frac{NM + (n-N)\frac{\varepsilon}{2}}{n} = \frac{NM}{n} + \frac{n-N}{n} \cdot \frac{\varepsilon}{2}

As nn \to \infty, NMn0\frac{NM}{n} \to 0 and nNn1\frac{n-N}{n} \to 1. So for sufficiently large nn, we have:

SnL<ε |S_n - L| < \varepsilon

Therefore, the sequence of arithmetic means converges to LL.