# Upper and lower bounds

**URL:** <https://discuss.elastic.co/t/upper-and-lower-bounds/357866>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [April 21, 2024, 3:35pm UTC](https://discuss.elastic.co/t/upper-and-lower-bounds/357866 "2024-04-21T15:35:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zi\_ninja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zi_ninja/32/133702_2.png) [@zi\_ninja](https://discuss.elastic.co/u/zi_ninja)\
**Post date:** [April 21, 2024, 3:35pm UTC](https://discuss.elastic.co/t/upper-and-lower-bounds/357866/1 "2024-04-21T15:35:40Z")

</div>

I created a job in machine learning anomaly detection elastic, I used the sum function, I looked at the results in the single metric viewer and I saw some points as follows:  
- On what basis to calculate upper and lower bounds?  
- I have also read blogs talking about multi\_bucket\_impact due to one bucket and multiple buckets, but I still don't understand why it is like that

- Can I set an average to identify outliers? If so, how?

---

<div class="post-metadata">

**Author:** ![valeriy42](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/valeriy42/32/82758_2.png) [@valeriy42](https://discuss.elastic.co/u/valeriy42)\
**Post date:** [April 22, 2024, 8:35am UTC](https://discuss.elastic.co/t/upper-and-lower-bounds/357866/2 "2024-04-22T08:35:25Z")

</div>

Hello @zi_ninja,

First of all, welcome to the community!

The upper and lower bounds show the 95% confidence interval of the underlying probabilistic model.

Regarding mutli\_bucket\_impact, please formulate a specific question. It is difficult to answer "I don't understand why it is like that" question on Discuss.

Regarding setting the average to identify outliers, please be more specific. What average do you want to set? You can use [alerting rules](https://www.elastic.co/guide/en/kibana/current/alerting-getting-started.html) to specify deterministic rules when you want to be notified about deviation from a threshold.

Best regards,  
Valeriy

---

<div class="post-metadata">

**Author:** ![zi\_ninja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zi_ninja/32/133702_2.png) [@zi\_ninja](https://discuss.elastic.co/u/zi_ninja)\
**Post date:** [April 23, 2024, 2:39pm UTC](https://discuss.elastic.co/t/upper-and-lower-bounds/357866/3 "2024-04-23T14:39:49Z")

</div>

Hi @valeriy42 ,  
Thank you for responding  
Regarding the lower and upper bounds, I don't know what criteria I am using to determine those two limits. I would like to understand clearly how you define the lower and upper bounds.  
You say: "The upper and lower bounds show the 95% confidence interval of the underlying probabilistic model." I understand this idea, but what I want to ask is: How do you determine the limits of the model.  
Regarding multi\_bucket\_impact and averaging outliers, I will create a separate page for discussion

---

<div class="post-metadata">

**Author:** ![valeriy42](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/valeriy42/32/82758_2.png) [@valeriy42](https://discuss.elastic.co/u/valeriy42)\
**Post date:** [May 6, 2024, 3:16pm UTC](https://discuss.elastic.co/t/upper-and-lower-bounds/357866/4 "2024-05-06T15:16:39Z")

</div>

Hello @zi_ninja ,

The [confidence interval](https://en.wikipedia.org/wiki/Confidence_interval) is a generally established statistical concept. If one has a probabilistic distribution and can compute quantiles, it is straightforward to calculate the 5th and 95th percentiles.

This is how we also would determine the confidence interval.

I hope this answers your question.
