gauguin icon indicating copy to clipboard operation
gauguin copied to clipboard

Fix calculation of average value in statistics

Open mccartney opened this issue 2 years ago • 9 comments

I fail to understand what does phi (Φ) is supposed to mean in the Statistics page. Screenshot_20240218-222431.jpg

mccartney avatar Feb 18 '24 21:02 mccartney

It means 'average value'. In German, this is a usual sign for this. Is it unsuitable in English?

meikpiep avatar Feb 18 '24 22:02 meikpiep

Well, this was my first thought. But how come average is 4 if min is 24?

mccartney avatar Feb 18 '24 22:02 mccartney

Also re English - I don't think the symbol is used that widely for average, at least in non technical contexts. But I am not a native speaker.

In such contexts I saw three letters "avg" being used.

mccartney avatar Feb 18 '24 22:02 mccartney

"avg" should be fine.

Nevertheless, I didn't even read the values of the screenshot, sorry for that. Will investigate the numbers.

meikpiep avatar Feb 18 '24 22:02 meikpiep

Will investigate the numbers

Could it be that the actual logic of calculations is fine on paper, but it's based on incomplete data?

A random thought looking at: https://github.com/meikpiep/gauguin/blob/02245da9dc05b715a7ff8d5ab4a7a9faca1cb57c/gauguin-app/src/main/kotlin/org/piepmeyer/gauguin/ui/statistics/StatisticsActivity.kt#L146

  • maybe the solvedDurationSum has data starting the moment the statistics were introduced (recently)
  • and overall.gamesSolved has a longer history?

mccartney avatar Feb 22 '24 19:02 mccartney

Maybe use solvedDuration.size() instead of overall.gamesSolved as the denominator?

mccartney avatar Feb 22 '24 19:02 mccartney

Sorry for the delay, I'm kind of busy to calculate game difficulties on Azure, using a limited offer from Microsoft.

solvedDuration and other lists get cut to have a maximum of 50 values, so we can't use them as a source for all games played. Maybe, the data have to be restructured to enable proper calculations like this. That would lead to every installation being forced to reset their statistics...

meikpiep avatar Mar 08 '24 08:03 meikpiep

Feel free to add your ideas!

meikpiep avatar Mar 08 '24 08:03 meikpiep

FYI: The label got corrected.

meikpiep avatar Mar 10 '24 20:03 meikpiep

@mccartney I had a look at the code mentioned by you - you are right that the statistics of your installation are not consistent, but I think that is caused by the migration of the statistics values some months ago. This should not occur in new installations which d not hold migrated statistics data.

Sadly, you'd have to reset your statistics to fix this in your installation, as I do not find any stable fix regarding the old migrated data.

meikpiep avatar Jun 12 '24 14:06 meikpiep