[igt-dev] [i-g-t] tests/kms_setmode: basic Improve accuracy with using of confidence interval

Ram Moon, AnandX anandx.ram.moon at intel.com
Tue Nov 3 17:58:26 UTC 2020


Hi Chris,

Thanks for your review comment.

-----Original Message-----
From: Chris Wilson <chris at chris-wilson.co.uk> 
Sent: Tuesday, November 3, 2020 4:19 PM
To: Ram Moon, AnandX <anandx.ram.moon at intel.com>; igt-dev at lists.freedesktop.org
Cc: Ram Moon, AnandX <anandx.ram.moon at intel.com>
Subject: Re: [igt-dev] [i-g-t] tests/kms_setmode: basic Improve accuracy with using of confidence interval

Quoting Anand Moon (2020-11-02 09:08:36)
> 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.
> 
> Signed-off-by: Anand Moon <anandx.ram.moon at intel.com>
> ---
> See below link.
> https://en.wikipedia.org/wiki/68%E2%80%9395%E2%80%9399.7_rule#Cumulati
> ve_distribution_function
> ---
>  tests/kms_setmode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c index 
> 92f3ead2..58814a13 100644
> --- a/tests/kms_setmode.c
> +++ b/tests/kms_setmode.c
> @@ -494,7 +494,7 @@ static void check_timings(int crtc_idx, const drmModeModeInfo *kmode)
>          * which depend on timing, giving the lowest acceptable MTBF of 5.6s
>          * for 60Hz sampling rate.
>          */
> -       accuracy = 3. * stddev;
> +       accuracy = 3. * stddev / sqrt(CALIBRATE_TS_STEPS);

Oops, yes, this should be standard error rather than deviation. Could you add igt_stats_get_std_error() so we don't hardcode N?
-Chris

Do you want me to rename accuracy to std_error and use stats.n_values instead of CALIBRATE_TS_STEPS 
I could not find the definition of igt_stats_get_std_error function. 

-Anand




More information about the igt-dev mailing list