# Field statistics - sampling

**URL:** <https://discuss.elastic.co/t/field-statistics-sampling/27343>\
**Category:** Kibana\
**Created:** [August 13, 2015, 6:39pm UTC](https://discuss.elastic.co/t/field-statistics-sampling/27343 "2015-08-13T18:39:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![secsubs](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@secsubs](https://discuss.elastic.co/u/secsubs)\
**Post date:** [August 13, 2015, 6:39pm UTC](https://discuss.elastic.co/t/field-statistics-sampling/27343/1 "2015-08-13T18:39:02Z")

</div>

Hi,

As I understand, in Kibana4, the field statistics are done on the _n_ records/documents that are returned to the browser (set under Advanced settings -\> sampleSize). If this is correct, then how does Kibana select _n_ records/docs out of the total query result population? Are there any attempts made to make sure it is a truly representative sample? Random sample?

Thanks

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [August 14, 2015, 5:23pm UTC](https://discuss.elastic.co/t/field-statistics-sampling/27343/2 "2015-08-14T17:23:54Z")

</div>

I assume you're referring to top-values by field in the Discover pane? If so, those statistics are based on the 500 documents that appear in Discover. By default, for time-series data, those are the latest documents, but that also changes depending on what searches and filters you've applies in Discover.

---

<div class="post-metadata">

**Author:** ![secsubs](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@secsubs](https://discuss.elastic.co/u/secsubs)\
**Post date:** [August 14, 2015, 5:56pm UTC](https://discuss.elastic.co/t/field-statistics-sampling/27343/3 "2015-08-14T17:56:43Z")

</div>

Thanks for that clarification, Tanya. But sounds like the field statistics are highly misleading since they aren't a true sample of the query results.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:14pm UTC](https://discuss.elastic.co/t/field-statistics-sampling/27343/4 "2017-07-06T14:14:47Z")

</div>


