diff options
author | Anand Moon <anandx.ram.moon@intel.com> | 2020-11-02 09:02:43 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-11-03 16:31:33 +0000 |
commit | b6247cc06d76b48ec2a3a0b13ffbd25aec8a42ff (patch) | |
tree | 1f98524a2803394167cc21e33531ec6fde7afce3 /lib/igt_stats.c | |
parent | 12d370cb57e0cfcb781c87ad9e15e68b17a1f41f (diff) |
tests/kms_setmode: basic Improve accuracy with using of confidence interval
Using confidence interval formula accuracy is estimates approximately
at 95% when {X} is the average of a sample of size n.
Use this confidence interval formula as used in statistics
to estimate the accuracy.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/31
Cc: Dorota Czaplejewicz <dorota.czaplejewicz@collabora.co.uk>
Signed-off-by: Anand Moon <anandx.ram.moon@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_stats.c')
-rw-r--r-- | lib/igt_stats.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/igt_stats.c b/lib/igt_stats.c index 0fbf712c..e0859a03 100644 --- a/lib/igt_stats.c +++ b/lib/igt_stats.c @@ -550,6 +550,17 @@ double igt_stats_get_std_deviation(igt_stats_t *stats) } /** + * igt_stats_get_std_error: + * @stats: An #igt_stats_t instance + * + * Retrieves the standard error of the mean from the @stats dataset. + */ +double igt_stats_get_std_error(igt_stats_t *stats) +{ + return igt_stats_get_std_deviation(stats) / sqrt(stats->n_values); +} + +/** * igt_stats_get_iqm: * @stats: An #igt_stats_t instance * |