question about the values in critical_runs array

邹林志08963 <[email protected]> Tue, 25 Jun 2024 01:47:27 +0000
Newsgroups gmane.comp.time.chrony.user
Message-ID <ZQ0PR01MB0951F2058EB2E3559C10ABA3B6D52@ZQ0PR01MB0951.CHNPR01.prod.partner.outlook.cn>
Hi all,

    in function RGR_FindBestRegression, after get the value of a and b for formula y(estimated)= a + b * x( measured ),
    it counts how many times for every two contiguous sample points cross over the estimated line in n_runs_from_residuals function.

    where are the values in array critical_runs come from ?
    for example, when there are total 50 sample points, if the total runs value is larger than 19, then the value of a and b is reliable.

    the comment is "Critical value for number of runs of residuals with same sign. 5% critical region for now."
    what is the formula or method to get the runs value of 19 for 50 samples?

thanks