{
    "nbformat": 4,
    "nbformat_minor": 5,
    "metadata": {
        "kernelspec": {
            "display_name": "Python",
            "language": "python",
            "name": "python"
        },
        "language_info": {
            "name": "python"
        }
    },
    "cells": [
        {
            "id": "82c91577",
            "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": "5e49d9e3",
            "cell_type": "markdown",
            "source": "Instantiate a distribution with the desired parameters:\n",
            "metadata": {}
        },
        {
            "id": "71b90130",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "from scipy import stats\nX = stats.Uniform(a=-0.5, b=0.5)",
            "outputs": []
        },
        {
            "id": "9ab48887",
            "cell_type": "markdown",
            "source": "Retrieve the support of the distribution:\n",
            "metadata": {}
        },
        {
            "id": "92d72444",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "X.support()",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "(-0.5, 0.5)"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "fa3c0bb3",
            "cell_type": "markdown",
            "source": "For a distribution with infinite support,\n",
            "metadata": {}
        },
        {
            "id": "096cadcb",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "X = stats.Normal()\nX.support()",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "(-inf, inf)"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "f168a034",
            "cell_type": "markdown",
            "source": "Due to underflow, the numerical value returned by the PDF may be zero\neven for arguments within the support, even if the true value is\nnonzero. In such cases, the log-PDF may be useful.\n",
            "metadata": {}
        },
        {
            "id": "5b70e026",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "X.pdf([-100., 100.])",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([0., 0.])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "0d7e492e",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "X.logpdf([-100., 100.])",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([-5000.91893853, -5000.91893853])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "2ef54bfe",
            "cell_type": "markdown",
            "source": "Use cases for the log-CDF and related methods are analogous.",
            "metadata": {}
        }
    ]
}