<jupyter_start><jupyter_text>Descriptive statisticsThe term [descriptive statistics](https://en.wikipedia.org/wiki/Descriptive_statistics) refers to methods that allow summarizing collections of data. To demonstrate the most important methods, we start by defining a dataset first.<jupyter_code>measurements = [5, 2, 6, 4, 8, 6, 2, 5, 1, 3, 3, 6]<jupyter_output><empty_output><jupyter_text>Measurements of central tendencyWe can measure the _location_ of our `measurement` in space using [numpy's statistics functions](https://numpy.org/doc/stable/reference/routines.statistics.html) and Python's [statistics module](https://docs.python.org/3/library/statistics.html).<jupyter_code>import numpy as np
import statistics as st
np.mean(measurements)
np.median(measurements)
st.mode(measurements)<jupyter_output><empty_output><jupyter_text>Measurements of spreadNumpy also allows measuring the spread of `measurements`.<jupyter_code>np.std(measurements)
np.var(measurements)
np.min(measurements), np.max(measurements)
np.percentile(measurements, [25, 50, 75])<jupyter_output><empty_output><jupyter_text>ExerciseFind out if the median of a sample dataset is always a number within the sample. Use these three examples to elaborate on this:<jupyter_code>example1 = [3, 4, 5]
example2 = [3, 4, 4, 5]
example3 = [3, 4, 5, 6]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10846953937592868, 'fraction_numerical': 0.02451708766716196, 'mean_word_length': 7.366459627329193, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '637914', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 458, 'n_tokens_neox': 425, 'n_words': 121, 'path': 'docs/41_descriptive_statistics/basic_descriptive_statistics.ipynb', 'repo_name': 'haesleinhuepf/BioImageAnalysisNotebooks', 'size': '1346'}