{
    "nbformat": 4,
    "nbformat_minor": 5,
    "metadata": {
        "kernelspec": {
            "display_name": "Python",
            "language": "python",
            "name": "python"
        },
        "language_info": {
            "name": "python"
        }
    },
    "cells": [
        {
            "id": "d11d43a8",
            "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": "a57d5321",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "import numpy as np\nfrom scipy.stats import f_oneway",
            "outputs": []
        },
        {
            "id": "8bedc852",
            "cell_type": "markdown",
            "source": "Here are some data [3] on a shell measurement (the length of the anterior\nadductor muscle scar, standardized by dividing by length) in the mussel\nMytilus trossulus from five locations: Tillamook, Oregon; Newport, Oregon;\nPetersburg, Alaska; Magadan, Russia; and Tvarminne, Finland, taken from a\nmuch larger data set used in McDonald et al. (1991).\n",
            "metadata": {}
        },
        {
            "id": "3848f7ed",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "tillamook = [0.0571, 0.0813, 0.0831, 0.0976, 0.0817, 0.0859, 0.0735,\n             0.0659, 0.0923, 0.0836]\nnewport = [0.0873, 0.0662, 0.0672, 0.0819, 0.0749, 0.0649, 0.0835,\n           0.0725]\npetersburg = [0.0974, 0.1352, 0.0817, 0.1016, 0.0968, 0.1064, 0.105]\nmagadan = [0.1033, 0.0915, 0.0781, 0.0685, 0.0677, 0.0697, 0.0764,\n           0.0689]\ntvarminne = [0.0703, 0.1026, 0.0956, 0.0973, 0.1039, 0.1045]\nf_oneway(tillamook, newport, petersburg, magadan, tvarminne)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "F_onewayResult(statistic=7.121019471642447, pvalue=0.0002812242314534544)"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "650d7e7e",
            "cell_type": "markdown",
            "source": "`f_oneway` accepts multidimensional input arrays.  When the inputs\nare multidimensional and `axis` is not given, the test is performed\nalong the first axis of the input arrays.  For the following data, the\ntest is performed three times, once for each column.\n",
            "metadata": {}
        },
        {
            "id": "a4fbf697",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "a = np.array([[9.87, 9.03, 6.81],\n              [7.18, 8.35, 7.00],\n              [8.39, 7.58, 7.68],\n              [7.45, 6.33, 9.35],\n              [6.41, 7.10, 9.33],\n              [8.00, 8.24, 8.44]])\nb = np.array([[6.35, 7.30, 7.16],\n              [6.65, 6.68, 7.63],\n              [5.72, 7.73, 6.72],\n              [7.01, 9.19, 7.41],\n              [7.75, 7.87, 8.30],\n              [6.90, 7.97, 6.97]])\nc = np.array([[3.31, 8.77, 1.01],\n              [8.25, 3.24, 3.62],\n              [6.32, 8.81, 5.19],\n              [7.48, 8.83, 8.91],\n              [8.59, 6.01, 6.07],\n              [3.07, 9.72, 7.48]])\nF = f_oneway(a, b, c)\nF.statistic",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([1.75676344, 0.03701228, 3.76439349])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "002c58a0",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "F.pvalue",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([0.20630784, 0.96375203, 0.04733157])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "c02dbe2e",
            "cell_type": "markdown",
            "source": "Welch ANOVA will be performed if `equal_var` is False.",
            "metadata": {}
        }
    ]
}