From 3a5cf84317197cdac88196cda76c6a7e08943f20 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Fri, 26 Jun 2015 17:02:09 +0100 Subject: 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 --- lib/tests/igt_stats.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/tests') diff --git a/lib/tests/igt_stats.c b/lib/tests/igt_stats.c index f76d3344..59097c8d 100644 --- a/lib/tests/igt_stats.c +++ b/lib/tests/igt_stats.c @@ -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); -- cgit v1.2.3