# Understanding Wavelets: A New Perspective on Data Analysis

Written on

## Chapter 1: The Data-Driven World

In today's world, data is increasingly abundant, leading scientists to encounter vast datasets. To effectively analyze this wealth of information, a diverse array of analytical tools is essential. One such tool that has gained prominence is the Fourier Transform. This method, introduced by Joseph Fourier in the early 1800s, revolutionized data analysis, particularly after the advent of the Fast Fourier Transform algorithm, which allows for rapid computations.

The Fourier Transform is a mathematical technique that enables the transition from time domain to frequency domain.

### Section 1.1: The Fourier Transform Explained

To perform a Fourier Transform, we assume that a time series can be expressed as an infinite sum of sine and cosine functions, each representing different frequencies. This assumption is generally effective for various time series. By identifying significant frequencies, we can understand the underlying periodicities present in the data. For instance, when analyzing surface temperature data, we would likely observe pronounced peaks corresponding to daily and seasonal cycles.

A comparison of sine functions in time space (left) and frequency space (right).

Despite its widespread use across scientific disciplines, the Fourier Transform has a significant limitation: it presumes that the time series remains stationary. A stationary series exhibits consistent properties over time. While this assumption holds for many signals, it poses challenges in fields like climate science, where understanding temporal evolution is crucial.

## Chapter 2: Enter Wavelets

To address the limitations of stationarity, we require a more localized approach. The groundwork for local functions was laid by mathematician Alfred Haar in the early 20th century, but it wasn’t until the 1980s that advancements in computational power catalyzed their application. Physicists Jean Morlet and Alex Grossman developed the computational Wavelet Transform, leading to significant contributions by mathematician Ingrid Daubechies. Her innovative wavelet designs earned her the prestigious Wolf Prize in mathematics in 2023.

*What Are Wavelets | Understanding Wavelets, Part 1*

This video introduces wavelets and discusses their applications in data analysis.

### Section 2.1: Defining Wavelets

Wavelets provide a solution to the stationarity issue by being localized in both time and frequency domains. Unlike sine and cosine functions, which have infinite time duration but are confined in frequency, wavelets offer a unique perspective. This locality allows us to identify not just the frequencies present in a dataset, but also the specific moments they occur, adding a powerful dimension to data analysis.

An illustration showing a Ricker Wavelet in both time and frequency space.

The image above displays a wavelet's behavior in time and frequency domains, highlighting its rapid decline. To conduct a Wavelet Transform, one selects a wavelet and sums over a finite range of frequencies relevant to the time of interest.

### Section 2.2: The Wavelet Transform Equation

The Wavelet Transform can be expressed mathematically as an alternative to the Fourier Transform. In this formulation, ψ represents various wavelet functions while f denotes the function of interest. The integration occurs over two variables, s and τ, which define the wavelet's center in frequency and time spaces, respectively. This approach allows us to discern the prevalence of different frequencies at specific times, thus enabling the analysis of non-stationary time series.

## Chapter 3: Wavelets in Climate Science

Wavelets play a critical role in climate dynamics. As Earth's climate undergoes changes, wavelets help us reveal the frequencies that manifest in various climatic systems. A significant phenomenon in this regard is the El Niño-Southern Oscillation (ENSO), a major climate pattern in the Pacific Ocean characterized by two primary phases: El Niño and La Niña. The oscillation period typically spans 2–7 years.

Scientists analyze ENSO by examining temperature anomalies in the Nino 3.4 region. The historical data from NOAA displays the variations in this index since 1950, where positive anomalies signify El Niño events and negative ones indicate La Niña.

An overview of the Nino 3.4 index from 1950 onwards.

A key focus for researchers is understanding how ENSO evolves. Are its oscillations becoming more frequent, or is the cycle diminishing? These inquiries cannot be adequately addressed using the Fourier Transform due to its inherent assumptions about stationarity. However, wavelet analysis offers valuable insights.

## Chapter 4: Visualizing Wavelet Transform Results

The following plot represents a wavelet transform of the Nino 3.4 index, displayed as a Scalogram. Scalograms can be complex to interpret, so let's break down the components. The x-axis represents time, mirroring the time series, while the y-axis illustrates the various periods detected. The color gradient indicates the strength of each period.

Scalogram of the Nino 3.4 index data over time.

For instance, around 1988, there was a notable peak corresponding to a 50-month oscillation, a typical ENSO cycle. This analysis illustrates that ENSO dynamics are more intricate than a single oscillation repeated over time. The greyed-out areas indicate where the analyzed periods exceed the data range, necessitating cautious interpretation due to potential "edge effects."

*Wavelets: A Mathematical Microscope*

This video provides a clear explanation of wavelets and their application in various fields.

### Section 4.1: Exploring Further Resources

This overview serves as an initial introduction to wavelets, but they encompass a much broader spectrum of applications. Both the Fourier and Wavelet Transforms can be challenging to grasp fully. For those interested in further exploration, I recommend the following resources for a deeper understanding.

For a user-friendly introduction to wavelets, check out this resource. For more in-depth insights, this article offers impressive visuals and interactive graphs related to Fourier Transform analysis. Additionally, I encourage viewing the recommended videos for comprehensive guides on both Fourier and Wavelet Transforms. For a complete resource, "The Illustrated Wavelet Transform Handbook" is an excellent choice, filled with applications.

I hope this exploration has provided clarity on wavelets! If you appreciate my work, consider supporting me by becoming a Medium member. Follow me for more weekly insights into math and science topics. The plots included were generated using PyleoClim, an excellent Python package for paleoclimate data analysis.