Tasks

Visualizing Convergence in Probability vs. Almost Sure Convergence

Instructions

Theory Overview

A sequence of random variables \(X_n\) converges to \(X=0\) in probability if, for any small number \(\epsilon > 0\), the probability that \(X_n\) is different from 0 by more than \(\epsilon\) shrinks to nothing as \(n\) gets larger. Formally:

\( \lim_{n \to \infty} P(|X_n - 0| > \epsilon) = 0 \)

For this specific experiment where \(X_n\) can only be 0 or 1, this simplifies to observing that the total probability of \(X_n\) being 1 approaches zero: \( \lim_{n \to \infty} P(X_n = 1) = 0 \).

This is different from almost sure convergence, which would require that for any given outcome \(\omega\), the sequence of values \(X_n(\omega)\) eventually becomes 0 and *stays* 0 forever. As you will see, this is not the case in this experiment, providing a classic example of a sequence that converges in probability but not almost surely.

Procedure

  • Use the top slider to select a specific outcome value, \(\omega\). This is your point of observation.
  • Enter a block number `k` to define how far the animation should run.
  • Click "Start Animation" and observe all three plots simultaneously. The animation speed will adjust automatically based on 'k'.
  • Plot 1 (Top): Watch the blue rectangle move and shrink. The dashed line is your chosen \(\omega\). It will turn green on a "hit" (\(X_n(\omega)=1\)) and red on a "miss" (\(X_n(\omega)=0\)).
  • Plot 2 (Middle): This shows the overall probability \(P(X_n=1)\), which is just the width of the blue rectangle. Notice how this green line trends decisively towards the zero line.
  • Plot 3 (Bottom): This tracks the value of \(X_n\) *only at your chosen \(\omega\)*. It will show intermittent "hits" (value 1). While for the limited duration of the animation it may end at 0, it's crucial to understand that for any given \(\omega\), a "hit" will always occur again if you increase 'n' enough. This demonstrates why the sequence does not converge almost surely.
  • Once the animation is complete, review the Experiment Results & Observations panel that appears below the charts for a summary.

Experiment Setting: The Moving, Shrinking Rectangles

The sequence of random variables \(X_n\) is defined such that the width of the interval where \(X_n=1\) gets smaller for larger \(n\). This width is exactly the probability \(P(X_n=1)\). The animation below demonstrates that this probability approaches zero.