Mixpanel Community Icon

How to Achieve Precise Averages in Mixpanel Charts and Tables

·
·

Hi, is there a way to get a more precise average in Mixpanel charts’ tables? I have 3 groups in this chart, all with an average of the metric as 0.2. But their distributions are very different, so the rounding up & down to 0.2 loses a lot of precision. For example:

  • If the top row has a 2dp average of 0.24

  • And the bottom row has a 2dp average of 0.15

  • The top row’s average would be 60% higher, but they both show as 1dp averages of 0.2, so you don’t see that large difference.

I’ve tried things like changing the decimals precision in the UI but that doesn’t make a difference…

  • Avatar of Mark F.
    Mark F.
    ·
    ·

    💡 It would be neat if the decimals precision we set for the chart could be consistent with the overall aggregation column (Average in this case), for Line charts at least. If you’re looking at a metric like I am in this case where there is seasonality, I need to see the breakdown over time, so I need to see a precise average AND the change over time. A Metric chart that has more precision isn’t a work around for me, if I need to account for the seasonality in context. What I am doing right now is making my own mental arithmetic on what a more precise average would be from the Line chart, but that’s an approximation so that’s not great and is a pain point for me.

  • Avatar of Johannes K.
    Johannes K.
    ·
    ·

    Can you write your own formula? That will show additional decimals (and keep dividing it if you need more)

  • Avatar of Mark F.
    Mark F.
    ·
    ·

    The metric in the table is a formula as it happens. The precision I get for this metric, which is in the 0-1 range from how the formula is designed, is:

    • 4dp on tooltips in the line chart

    • 2dp in the table itself

    But the aggregation on the side of the table, in this case the average, is 1dp.

  • Avatar of Mark F.
    Mark F.
    ·
    ·

    This makes me wonder if those levels of precision are defaults in the Mixpanel UI. Even for metrics with values >1, say in the 1000s, the average I see for Line charts will show 1dp precision. 🤔

  • Avatar of Johannes K.
    Johannes K.
    ·
    ·

    What's your formula?

  • Avatar of Mark F.
    Mark F.
    ·
    ·

    The formula in that chart is (B - A) / (D - C) All the input metrics in that formula are integer values in the 1,000s per day

  • Avatar of Mark F.
    Mark F.
    ·
    ·

    This is another example of why I think the 1dp precision for the average column in the table is something in the Mixpanel UI by default, as I’m seeing it for “Average of <event_property>” aggregations of event metrics too, not just formulas.

  • Avatar of Johannes K.
    Johannes K.
    ·
    ·

    what happens if you do ((B - A) / (D - C)) / 100? doesn't that give you additional dp in the table? You are right on the point you are making btw. This is very inconsistently handled

  • Avatar of Mark F.
    Mark F.
    ·
    ·

    Yes it looks like the table shows 4dp by doing a division by a large number. I divided by 10000 and found something interesting, which makes me think significant figures is being used rather than decimal places…

  • Avatar of Mark F.
    Mark F.
    ·
    ·

    ((B - A) / (D - C)) / 10,000:

    • In the averages column now, I even get some 5dp values and all the numbers are going to 1 significant figure, e.g. 0.00003 and 0.0001.

    • The table shows 4dp values

    • The line chart tooltips have values go to 0 if they round down to 0 (e.g. 0.00003 becomes 0 in the chart as it seems to support 4dp but not more precision)

    Going one step further to divide by 100,000, all the values display as zero: averages are 0.0 and table values are 0.

  • Avatar of Mark F.
    Mark F.
    ·
    ·

    What I conclude from this is:

    • Chart tooltips display 4dp, regardless of small values <1 or large values in the millions from what I’ve tried

    • Table values can display up to 4dp, but it looks like the UI reduces the precision by displaying only 2 significant figures for values lower than 1 (e.g. 0.31 will show but not 0.312), yet for numbers larger than 10 you get up to 4 significant figures (3.12, 31.23, 312.3, 3123, 31.23K, 312.3K) ✳️. 🤷‍♂️

    • Average column in tables appear to support up to 5dp. Though I think the main logic for it is to show 1dp by default (e.g. 3.0, 30.0, 300.0), unless you have values below 1.0 in which case it seems to be showing 1 significant figure (e.g. 0.00003, 0.0003, 0.003, 0.03, 0.3).

    ✳️ There must be some complexity in the logic here. 😄 I’d prefer 4 significant figures myself as the default for the UI elements rather than what the current implementation is, but clip the value to 4dp in table values and average column if the UI doesn’t want long “0.00…” values. It just seems like there are some transformations being done to avoid the table getting cluttered, but there are these UI inconsistencies that affect insight.