{"cells": [{"cell_type": "markdown", "metadata": {}, "source": ["# Exercise 4.4: Understanding and building ECDFs\n", "\n", "
"]}, {"cell_type": "markdown", "metadata": {}, "source": ["\n", "\n", "As a reminder, the empirical cumulative distribution function for a set of data point evaluated at x is \n", "\n", ">ECDF(x) = fraction of data points \u2264 x.\n", "\n", "Write a function with call signature\n", "\n", "```python\n", "ecdf_vals(data)\n", "```\n", "\n", "which takes a one-dimensional NumPy array of data and returns the `x` and `y` values for plotting a \"dot-style\" ECDF. That is, each dot has a `y` value given by the ECDF evaluated at `x`.\n", "\n", "When writing a function, you should have detailed doc strings and checking of input. However, here the focus is on your understanding of ECDFs and developing skills with NumPy, so you do not need to have a very descriptive doc string nor lots of input checking.\n", "\n", "*Hint*: The functions `np.sort()` and `np.arange()` may be useful."]}, {"cell_type": "markdown", "metadata": {}, "source": [" "]}], "metadata": {"anaconda-cloud": {}, "kernelspec": {"display_name": "default", "language": "python", "name": "python3"}, "language_info": {"codemirror_mode": {"name": "ipython", "version": 3}, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.5"}}, "nbformat": 4, "nbformat_minor": 4}