### a problem of moments

We would like to prove the following fact:

For any non-negative random variable $$X$$ having finite first and second moments, $$\mathbb P(X>0) \ge (\mathbb EX)^2/\mathbb EX^2$$.

The proof isn’t difficult. Here are three different ones.

### problem of strings

This is a problem via fakalin.

You have 10 pieces of string, each with two ends. You randomly pick two ends of string (possibly from the same string, possibly from different ones) and tie them together, creating either a longer piece of string or a loop. You keep doing this until you run out of free ends.

What is the expected number of loops you end up with?

### tensors

This has been a confusing topic, with half a dozen Wikipedia pages on the subject. Here I took some notes.

Tensors are sums of “products” of vectors. There are different kinds of vector products. The one used to build tensors is, naturally, the tensor product. In the Cartesian product of vector spaces $$V\times W$$, the set elements are tuples like $$(v,w)$$ where $$v\in V, w\in W$$. A tensor product $$v\otimes w$$ is obtained by tupling the component bases rather than the component elements. If $$V$$ has basis $$\{e_i\}_{i\in\{1,…,M\}}$$ and $$W$$ has basis $$\{f_j\}_{j\in\{1,…,N\}}$$, then take $$\{(e_i,f_j)\}_{i\in\{1,…,M\},j\in\{1,…,N\}}$$ as the basis of the tensor product space $$V\otimes W$$. Then define the tensor product $$v\otimes w$$ as

(1) $$\sum_{i,j} v_i w_j (e_i,f_j) \in V\otimes W$$,

if $$v=\sum_i v_i e_i$$ and $$w=\sum_j w_j f_j$$. The entire tensor product space $$V\otimes W$$ is defined as sums of these tensor products

(2) $$\{\sum_k v_k\otimes w_k | v_k\in V, w_k\in W\}$$.

So tensors in a given basis can be represented as multidimensional arrays.

$$V\otimes W$$ is also a vector space, with $$MN$$ basis dimensions (c.f. $$V\times W$$ with $$M+N$$ basis dimensions). But additionally, it has internal multilinear structure due to the fact that it is made of component vector spaces, namely:

$$(v_1+v_2)\otimes w = v_1\otimes w + v_2\otimes w$$
$$v\otimes (w_1+w_2) = v\otimes w_1 + v\otimes w_2$$
$$\alpha (v\otimes w) = (\alpha v)\otimes w = v\otimes (\alpha w)$$

### t-mobile prepaid optimization

t-Mobile has these tiered refill cards for their prepaid mobile phones. The pricing table is here and reproduced below:

$10 for 30 minutes, expires in 90 days$25 for 130 minutes, expires in 90 days
$40 for 208 minutes, expires in 90 days$50 for 400 minutes, expires in 90 days
$100 for 1000 minutes, expires in 365 days So which card should you buy? You could calculate a per minute cost and conclude that$100 for 1000 minutes is the most economical (plus it doesn’t expire for the longest time). Wrong!

It depends on how much you use the phone. The fact that the minutes expire makes the prepaid plan a virtual monthly plan in the regime where you do not use 1000 or more minutes per year, which is highly likely for people who choose prepaid phones to begin with (e.g. temporary visitors, odd occasions, emergencies, etc.). The constraint in that case is the expiration, not the number of minutes. If you blindly purchased $100 refills one after another, you’d have more and more unused minutes piling up. Sure, you could still use them, but even at$0.10/min. it is expensive compared to a straight monthly plan if you really mean to call that much. Of course you don’t, so now what?

### different kind of coupon collector’s problem

The classic coupon collector’s problem asks for the number of samples it takes to collect all coupon types from a sequence of coupons in which each of the $$k$$ types of coupons has an unlimited number of copies.

Here is a different kind of problem: if there are limited copies of each of the $$k$$ coupon types (say, $$d$$ copies), how many samples does it take to collect $$t$$ coupon types?

### red-blue cross problem

Here is a problem described to me by fakalin. Given n red points and n blue points, no three of which are collinear, prove that there exists a pairing of red and blue points such that the line segments connecting each pair do not intersect.