1. A sample analyzer comprising: a preparation unit that mixes a sample with a reagent to prepare a measurement specimen; a measurement unit that irradiates the measurement specimen with light to acquire optical time series data; a controller that divides the time series data acquired by the measurement unit into data segments, determines first regression lines respectively of the data segments, select the first regression line with the highest matching degree with the time series data, sets as an analysis target region a region of the time series data matching with the selected first regression line among the time series data acquired by the measurement unit, determines a second regression line using the time series data included in the set analysis target region, and analyzes using the second regression line.