Time series analysis is used to create statistical models that analyze the trends and patterns of time-varying data.