Does almost sure convergence of random variables depend on their function representation? I am reasonably comfortable with probability but the course I am currently taking is approaching it much more formally and I am struggling with the definition of almost sure convergence.
I have been given the definition: $X_n \rightarrow X$ almost surely if $P(X_n \rightarrow X \text{ as } n \rightarrow \infty) = 1$ where $\{ X_n \rightarrow X \text{ as } n \rightarrow \infty \}$ is the event $\{\omega \in \Omega: X_n(\omega) \rightarrow X(\omega) \text{ as } n \rightarrow \infty \}$ in the probability space $(\Omega, F, P)$.
If we let $\Omega = [0,1]$ and define $P([a,b]) = b-a$, then the random variables $X_n(\omega) = 1$ if $\omega \in [0,1/n]$, $0$ otherwise are a sequence of random variables with $P(X_n = 1) = 1/n, P(X_n = 0) = (n-1)/n$.
$\forall \omega \in (0,1], X_n(\omega) \rightarrow 0.$
$P((0,1]) = 1$, and so $X_n \rightarrow 0$ almost surely.
But if we define $X_n = 1$ if $\omega \in [1 + 1/2 + \cdots + 1/(n-1), 1+1/2+\cdots+1/n]$ where the interval is considered modulo $1$ (so $[3/4,5/4] = [0,1/2] \cup [3/4,1]$), then $$P(X_n = 1) = 1/n, P(X_n = 0) = (n-1)/n$$ but $\forall \omega \in \Omega, X_n(\omega) \not \rightarrow 0$ and so $X_n \not \rightarrow 0$ almost surely.
This is clearly a contradiction?
It has been shown in my lecture notes that a sequence of random variables $X_n$ with $P(X_n = 1) = 1/n, P(X_n = 0) = (n-1)/n$ does NOT almost surely converge to $0$, but then I don't understand why my first example is wrong.
 A: In your first example, the random variables $X_1,X_2,\ldots$ are "very" dependent. That is, if $X_n(\omega)=0$, $X_{n+k}(\omega)=0$ for all $k\ge 1$. On the other hand, when $X_n$'s are independent and their marginals are equal to those in the first example, the BC lemma tells that $X_n=1$ i.o. with probability 1.
A: The (joint) distribution of the sequence $(X_n)$ is not fully specified by saying that $P(X_n=1) = \frac1n$ and $P(X_n = 0) = 1 - \frac1n$. That only tells you the marginal distribution of each random variable.
The two examples you've described, where the sequence $(X_n)$ is realized in some probability space, are two different distributions of $(X_n)$, that simply happen to have the same marginal distribution of each individual $X_n$. In one case, $X_n \to 0$ almost surely; in the other case, that's not true.
The result from your lecture notes is probably that $(X_n)$ does not almost surely converge to $0$ when $P(X_n=1) = \frac1n$, $P(X_n = 0) = 1 - \frac1n$, and the random variables in the sequence are all independent. This is yet a third way to specify the joint distribution.

The answer to the title question is: no, almost sure convergence does not depend on the function representation. It only depends on the joint distribution. However, you do have to specify the joint distribution before you can ask about almost sure convergence.
