Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Approximate median calculation

Updated on July 5, 2022

Use the approximate median to calculate the center value of a data group in which strong outliers might distort the outcome.

In Pega Platform, you determine median by using the low-storage and low-latency approximate calculation method.


Consider the following points when selecting the approximate median as your aggregation calculation method:

  • Event strategy windows calculate median on the fly, constantly converging toward or oscillating around the actual median value.
  • If the event strategy window consistently aggregates values above or below the current median, the median value increases or decreases accordingly. The speed with which the median moves up or down the value range depends on the distribution of values that the window aggregates.
  • The size or type of the window does not affect the calculation outcome.
  • The approximate median is always calculated from the start of the data flow that references the event strategy.
  • The calculated median value is meaningful only when you aggregate unsorted or randomized values.

Replacement for exact median calculation

The approximate calculation method replaces the exact median calculation because it requires fewer system resources for storing or sorting incoming values. The median calculation method for event strategies that you created prior to Pega Platform 8.4 does not change until you edit and save the aggregation calculation options. The approximate calculation is the only method available for median in release 8.4 and later.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us