--- myst: substitutions: sentence: "" bloc: python: 3-8 cpp: 4,7-10 bloc2: python: 10-16 cpp: 12-17 --- ```{include} /../core/dataserver/statistics/quantile_computation/wilks_quantile_computation.md ``` In the following a quantile estimation of 95% will be considered with a requested confidence level of 95% (for more details on this method, see {{metho}}). If the sample does not exist yet, a possible solution is to estimate the minimum requested number of computations (which leads in our particular case to a sample of 59 events). Otherwise, one can ask {{uranie}} the index of the quantile value for a given sample size, as such: {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/dataserver/statistics/" + language + "/compute_quantile_wilks." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc[language] + "\n" + "```" }} The previous lines are purely informative, and not compulsory: the method implemented in {{uranie}} to deal with the Wilks quantile estimation will start by calling these lines and complains if the minimum numbers of points is not available. In any case, the bigger the sample is, the more accurate the estimated value is. This value is finally determined using the method: {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/dataserver/statistics/" + language + "/compute_quantile_wilks." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc2[language] + "\n" + "```" }} As stated previously, this is illustrated in a use-case macro which results in {numref}`usecases_dataserverComputeQuantile`. There one can see results from two classical estimations of the 95% quantile. The distribution of their results is centered around the theoretical value. The bigger the sample is, the closer the average is to the theoretical value and the smaller the standard deviation is. But in any case, there is always 50% of estimation below and 50% above the theoretical value. Looking at the Wilks estimation, one can see that only 5% and 1% of the estimations are below the theoretical value respectively for the 95% and 99% confidence level distributions (at the price of smaller sample). With a larger sample, the standard deviation of the estimated value distribution for a 95% confidence level is getting smaller.