{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "#"
      ],
      "id": "93a6a6cf-4ca4-43d3-b86a-d689a322a7b4"
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {},
      "outputs": [],
      "source": [
        "class BernoulliDistribution():\n",
        "    def __init__(self, p = 0.5):\n",
        "        self._p = p\n",
        "    def density_function(self, x):\n",
        "        p = self._p\n",
        "        return p ** x * (1 - p) ** (1 - x)"
      ],
      "id": "ad76dc05-ad3d-4599-bb9a-fe9c153f2a24"
    }
  ],
  "nbformat": 4,
  "nbformat_minor": 5,
  "metadata": {
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3 (ipykernel)",
      "language": "python"
    },
    "language_info": {
      "name": "python",
      "codemirror_mode": {
        "name": "ipython",
        "version": "3"
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.12.12"
    }
  }
}