Skip to main content

Calculation method logic

Last updated 10/03/2026

When you configure the analysis metrics in Events Analysis, or the Also Show metrics in Retention Analysis or Distribution Analysis, you need to choose an appropriate calculation method based on what you're analyzing. This section explains the logic of some of these methods.

Preset calculation methods​

  • Event total: How many times the event was triggered
  • Uniques: How many distinct users triggered the event
  • Times per user: Event total / Uniques, that is, the average number of times each user who triggered the event triggered it

Numeric properties​

Calculation methodLogic
AverageSum of property values / number of property values
Per UserSum of property values / Uniques, that is, the average sum of property values per user who triggered the event
MedianThe middle value after sorting property values from largest to smallest; if the number of property values is even, the median is the average of the two middle values

The average reflects the overall level of the data, but when some property values are significantly higher or lower than the others, the median represents the overall situation better than the average. Suppose 4 users triggered the payment event 7 times in total:

UserAmount per payment
A6、648
B30、30、30
C128
D6
  • Average = 125.43
  • Per User = 219.5
  • Median = 30
Calculation methodLogic
Nth PercentileThe property value at the Nth percentile; the median is the 50th percentile

Besides the median, the Nth percentile is also commonly used to better measure data distribution. For example, you can observe how the Nth percentile of core resource stock changes to decide whether to release new items that consume those resources.

Calculation methodLogic
VarianceCalculate the average first, then the square of the difference between each property value and the average, and finally take the average of these squares
Std DevThe square root of the variance

Variance and standard deviation measure how much the data fluctuates. Suppose the Experiment Group and the Control Group have similar per-user payment amounts, but the standard deviation of the Experiment Group is significantly higher than that of the Control Group. This means the metric data of the Experiment Group is more strongly affected by large top-up orders.

List properties​

Calculation methodLogic
Deduplication of arrayTreats each list as a whole and counts the number of distinct lists
Deduplication of setDeduplicates and sorts the elements in each list to get a set, then counts the number of distinct sets
Deduplication of elementTakes all elements from all lists, then counts the number of distinct elements

In games, the IDs of the heroes deployed in a lineup are often recorded in a list property. To analyze how many heroes have been deployed, use Deduplication of element. You can also use Deduplication of array or Deduplication of set to analyze how many distinct lineups there are; the latter does not distinguish the order of heroes in the list or whether a hero appears more than once.

Suppose there are 4 list property values: [a,b,c], [a,b,c,c], [c,b,a], and [a,b,c,d]:

  • Deduplication of array = 4
  • Deduplication of set = 2
  • Deduplication of element = 4

Boolean properties​

Calculation methodLogic
True totals, False totalsNumber of events whose property value is True/False
Null totals, Not null totalsNumber of events whose property value is null/not null
Was this page helpful?