In nature the noisy signal representing a physical observable is in many cases unpredictable, though the long time average of the signal converges in statistical sense to the ensemble average (ergodicity). Observations of dynamics of single particles, e.g. blinking quantum dots, and mRNA sub-diffusing in a cell, revealed non-ergodic processes. Such processes are analyzed within the statistical framework of weak ergodicity breaking. Foundations of the theory are discussed based on random walk models, systems with Lévy distributed partition functions (e.g. the quenched trap model), and time permitting dynamical systems with zero Lyapunov exponent.