{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "535c30a1-6335-4314-83a1-6e7d23ada40d",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "7e9842e7-4fb8-404c-b6da-283510f314dc",
   "metadata": {},
   "outputs": [],
   "source": [
    "# hint: Pseudo Random and True Random"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b702eeef-b651-4286-9236-2edca6f0353d",
   "metadata": {},
   "source": [
    "### Random Numbers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "ee62a0e7-e2ce-4570-ae65-ef815526d99b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "88\n"
     ]
    }
   ],
   "source": [
    "x = np.random.randint(100)\n",
    "\n",
    "print(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "ad3c430b-dde2-4202-8782-8cfc2cb434f1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.6204661862066633\n"
     ]
    }
   ],
   "source": [
    "x = np.random.rand()\n",
    "\n",
    "print(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "8e033582-3f93-43b6-b254-5dc0d2baad70",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[90 98  7 34 80]\n"
     ]
    }
   ],
   "source": [
    "x=np.random.randint(100, size=(5))\n",
    "\n",
    "print(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "bf4cf008-ec0f-4291-a990-eb3cf2b76f14",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5\n"
     ]
    }
   ],
   "source": [
    "x = np.random.choice([3, 5, 7, 9])\n",
    "\n",
    "print(x)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "820e0a69-f14d-4fa9-9abf-ba6259de2abf",
   "metadata": {},
   "source": [
    "### Random Distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "d04aefc6-a1c0-4ee5-822a-bca76cc5bbc1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[7 7 3 7 3 7 7 7 7 5 7 7 7 5 7 7 5 5 7 5 5 7 5 7 7 3 7 3 7 3 7 7 7 7 7 7 5\n",
      " 7 7 3 7 3 7 7 7 5 7 7 5 7 5 7 5 7 5 7 7 7 7 7 3 5 3 7 5 7 7 7 5 5 7 5 7 5\n",
      " 5 5 7 7 5 7 7 5 7 3 7 5 7 3 5 5 5 7 5 7 7 3 7 5 7 7]\n"
     ]
    }
   ],
   "source": [
    "# Probability Density Function: A function that describes a continuous probability. \n",
    "# i.e. probability of all values in an array.\n",
    "x = np.random.choice([3, 5, 7, 9], p=[0.1, 0.3, 0.6, 0.0], size=(100))\n",
    "\n",
    "print(x)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2e5627e9-7b03-45f8-a776-89bcd069fc71",
   "metadata": {},
   "source": [
    "### Normal (Gaussian) Distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "b561d19f-041a-4f10-b6b6-ba1827c79abf",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[0.17858464 4.11191574 1.13382304]\n",
      " [2.57882466 1.42017738 0.54116511]]\n"
     ]
    }
   ],
   "source": [
    "# loc - (Mean) where the peak of the bell exists.\n",
    "# scale - (Standard Deviation) how flat the graph distribution should be.\n",
    "# size - The shape of the returned array.\n",
    "x = np.random.normal(loc=1, scale=2, size=(2, 3))\n",
    "\n",
    "print(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "1c683c75-bcc2-40ca-8c27-9ed9aa0ccdd4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 30328 characters]\n",
      "text/plain": [
       "<Figure size 500x500 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "\n",
    "sns.displot(np.random.normal(size=1000), kind=\"kde\")\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fbfc0beb-9716-48b6-9b08-d3ef4b867f27",
   "metadata": {},
   "source": [
    "\"Some\" other Distributions\n",
    "- Normal Distribution\n",
    "- Binomial Distribution\n",
    "- Poisson Distribution\n",
    "- Uniform Distribution\n",
    "- Logistic Distribution\n",
    "- Multinomial Distribution\n",
    "- Exponential Distribution\n",
    "- Chi Square Distribution\n",
    "- Rayleigh Distribution\n",
    "- Pareto Distribution\n",
    "- Zipf Distribution\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b7261962-15f5-48db-b2ee-950b2c3c1dc0",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.11.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
