stats: Add a way to specify if the data set is a population or a sample

This changes how we compute the variance. We want an unbiased variance
when reasoning about a sample.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
Damien Lespiau
2015-06-26 17:02:09 +01:00
parent a2f6fd3725
commit 3a5cf84317
4 changed files with 38 additions and 1 deletions
+1
View File
@@ -89,6 +89,7 @@ static void test_std_deviation(void)
double mean, variance, std_deviation;
igt_stats_init(&stats, 8);
igt_stats_set_population(&stats, true);
igt_stats_push(&stats, 2);
igt_stats_push(&stats, 4);