Calculating Partial Sums For Data Analysis