Data analysis is the process of studying past data to understand how and why things occurred. There are four main types of data analysis: descriptive analysis identifies what happened in the past; diagnostic analysis finds the reasons for past events; predictive analysis forecasts what may happen in the future based on historical patterns; and prescriptive analysis determines the optimal actions for the future based on insights from the other three analyses. Common tools for data analysis include regression analysis and machine learning algorithms.