mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Display median interval in Stats instead of mean
Median is better suited than mean for reporting skewed data.
This commit is contained in:
parent
ccab18b7ba
commit
595c255ca3
1 changed files with 4 additions and 4 deletions
|
@ -168,12 +168,12 @@ export function prepareIntervalData(
|
||||||
dispatch("search", { query });
|
dispatch("search", { query });
|
||||||
}
|
}
|
||||||
|
|
||||||
const meanInterval = Math.round(mean(allIntervals) ?? 0);
|
const medianInterval = Math.round(quantile(allIntervals, 0.5) ?? 0);
|
||||||
const meanIntervalString = timeSpan(meanInterval * 86400, false);
|
const medianIntervalString = timeSpan(medianInterval * 86400, false);
|
||||||
const tableData = [
|
const tableData = [
|
||||||
{
|
{
|
||||||
label: fsrs ? tr.statisticsAverageStability() : tr.statisticsAverageInterval(),
|
label: fsrs ? tr.statisticsMedianStability() : tr.statisticsMedianInterval(),
|
||||||
value: meanIntervalString,
|
value: medianIntervalString,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue