From 223549a088e4210edf7c29b2516550c05ab47d0f Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Tue, 17 Oct 2023 12:31:21 +0200 Subject: [PATCH] Minor changes --- .../probability_distribution_functions.rst | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/source/statistics/probability_distribution_functions.rst b/source/statistics/probability_distribution_functions.rst index 6915b74..79208f4 100644 --- a/source/statistics/probability_distribution_functions.rst +++ b/source/statistics/probability_distribution_functions.rst @@ -1,4 +1,46 @@ Probability Distribution Functions ------------------------------------ -todo CDF and PDF +Probability Density Function +============================= + +The Probability Density Function (PDF) is function defined for a random variable :math:`X` such that: + +.. math:: + \forall (a,b) \in \mathbb{R}^2,\, P(a \le X \le b) = \int_a^b f_X(x)dx + +Properties: + +#. :math:`\int_{-\infty}^{+\infty} f_X(x)dx=1` +#. :math:`P(X=a)=\int_{a}^{a} f_X(x)dx=0` + +From property *2* it can be derived that (`source `__): + +.. math:: + P(a \le X \le b) &= P(a < X \le b) =P(a \le X < b) =P(a < X < b) + + P(a \ge X) &= P(a > X) = 1-P(a < X) = 1-P(a \le X) + +The PDF of a random variable is intimately related to its :ref:`CDF ` with the following relation: + +.. math:: + F_X(x)=\int_{-\infty}^x f_X(t)dt + +To illustrate this property let's take an example with the exponential distribution defined as follow: + +.. math:: + f(x;\lambda) = \begin{cases}\lambda e^{ - \lambda x} & x \ge 0,\\ 0 & x < 0.\end{cases} + +Let's compute its CDF: + +.. math:: + F(x;\lambda)=\int_{0}^x \lambda e^{-\lambda t}dt = -\int_{0}^x -\lambda e^{-\lambda t}dt &= - \left[ e^{-\lambda t} \right]_{0}^x + + &=1 -e^{-\lambda x} + +.. _CDF: + +Cumulative Distribution Function +================================= + +The Cumulative Distribution Function (CDF)