{
    "nbformat": 4,
    "nbformat_minor": 5,
    "metadata": {
        "kernelspec": {
            "display_name": "Python",
            "language": "python",
            "name": "python"
        },
        "language_info": {
            "name": "python"
        }
    },
    "cells": [
        {
            "id": "8bc64ef1",
            "cell_type": "markdown",
            "source": "<div class='alert alert-warning'>\n\nSciPy's interactive examples with Jupyterlite are experimental and may not always work as expected. Execution of cells containing imports may result in large downloads (up to 60MB of content for the first import from SciPy). Load times when importing from SciPy may take roughly 10-20 seconds. If you notice any problems, feel free to open an [issue](https://github.com/scipy/scipy/issues/new/choose).\n\n</div>",
            "metadata": {}
        },
        {
            "id": "414b5f99",
            "cell_type": "markdown",
            "source": "Test the null hypothesis that a random sample was drawn from a normal\ndistribution (with unspecified mean and standard deviation).\n",
            "metadata": {}
        },
        {
            "id": "8c7c5be2",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "import numpy as np\nfrom scipy.stats import anderson\nrng = np.random.default_rng()\ndata = rng.random(size=35)\nres = anderson(data)\nres.statistic",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "0.8398018749744764"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "e7129c40",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "res.critical_values",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([0.527, 0.6  , 0.719, 0.839, 0.998])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "86d4d1f6",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "res.significance_level",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([15. , 10. ,  5. ,  2.5,  1. ])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "0f5a0b71",
            "cell_type": "markdown",
            "source": "The value of the statistic (barely) exceeds the critical value associated\nwith a significance level of 2.5%, so the null hypothesis may be rejected\nat a significance level of 2.5%, but not at a significance level of 1%.",
            "metadata": {}
        }
    ]
}