Minor changes

This commit is contained in:
Loic Guegan 2023-10-18 22:09:21 +02:00
parent 572e35f3ec
commit bf2abddbb9
3 changed files with 11 additions and 10 deletions

View file

@ -1,7 +1,7 @@
Bayes' Theorem Bayes' Theorem
--------------- ---------------
This page is inpired from: This page is inspired from:
* `MathIsFun <https://www.mathsisfun.com/data/bayes-theorem.html>`__ * `MathIsFun <https://www.mathsisfun.com/data/bayes-theorem.html>`__
* `Wikipedia <https://en.wikipedia.org/wiki/Bayes%27_theorem>`__ * `Wikipedia <https://en.wikipedia.org/wiki/Bayes%27_theorem>`__
@ -11,8 +11,8 @@ Theorem
The Bayes's theorem describes the probability of an event, based on prior knowledge of conditions The Bayes's theorem describes the probability of an event, based on prior knowledge of conditions
that might be related to the event. that might be related to the event.
To compute :math:`P(A|B)`, in other words, the probability of the event :math:`A` to happen, knowing that :math:`B` To compute :math:`P(A|B)`, in other words, the probability of the event :math:`A` to happend, knowing that :math:`B`
already happen, the following drawing can be used: already happend, the following drawing can be used:
.. image:: figures/bayes_theorem.svg .. image:: figures/bayes_theorem.svg
:align: center :align: center
@ -20,7 +20,7 @@ already happen, the following drawing can be used:
| |
The red area represents :math:`P(B)=a3+a4`. Thus, to compute :math:`P(A|B)` we do: The red area represents :math:`P(B)=a3+a4`. To compute :math:`P(A|B)` we do:
.. math:: .. math::
P(A|B)=\frac{a3}{a3+a4}=\frac{P(A)P(B|A)}{P(A)P(B|A)+P(\neg A)P(B|\neg A)}=\frac{P(A)P(B|A)}{P(B)} P(A|B)=\frac{a3}{a3+a4}=\frac{P(A)P(B|A)}{P(A)P(B|A)+P(\neg A)P(B|\neg A)}=\frac{P(A)P(B|A)}{P(B)}
@ -68,4 +68,4 @@ Let's draw the little diagram:
&=\frac{0.01 \times 0.80}{0.01 \times 0.80 + 0.99 \times 0.10} = 0.0747 &=\frac{0.01 \times 0.80}{0.01 \times 0.80 + 0.99 \times 0.10} = 0.0747
The chances that Anna really has Allergy is about 7%. The chances that Anna really has allergy is about 7%.

View file

@ -8,7 +8,8 @@ Bessel's Correction
Bessel's correction is the use of :math:`n-1` instead of :math:`n` in the formulas for sample Bessel's correction is the use of :math:`n-1` instead of :math:`n` in the formulas for sample
variance and sample standard deviation. variance and sample standard deviation.
In fact, using :math:`n` as a denominator leads to a biased estimator. In fact, using :math:`n` as a denominator leads to a biased estimator.
This variance estimator is noted :math:`s^2_n`. The biased estimator for the sample standard deviation is noted :math:`s_n`.
The biased estimator for the sample variance is noted :math:`s^2_n`.
Lets compute the discrepency between population variance and the biased sample variance: Lets compute the discrepency between population variance and the biased sample variance:
.. math:: .. math::
@ -33,9 +34,9 @@ Lets compute the discrepency between population variance and the biased sample v
&= \frac{\sigma^2}{n} &= \frac{\sigma^2}{n}
This result shows us that the discrepency between the population and sample variance is :math:`\frac{\sigma^2}{n}`. This result shows that the discrepency between the population and sample variance is :math:`\frac{\sigma^2}{n}`.
It is simply, the :ref:`Standard Error of the Mean <SEM>`. It is simply, the :ref:`Standard Error of the Mean <SEM>`.
From this result we can deduce how :math:`S_n^2` must be adjusted: From this result we can deduce how :math:`s_n^2` must be adjusted to be unbiased:
.. math:: .. math::
\mathbb{E} \left[ s^2_n \right] = \sigma^2 - \frac{\sigma^2}{n} = \frac{n-1}{n} \sigma^2 \mathbb{E} \left[ s^2_n \right] = \sigma^2 - \frac{\sigma^2}{n} = \frac{n-1}{n} \sigma^2

View file

@ -6,7 +6,7 @@ Probability Distribution Functions
Probability Density Function Probability Density Function
============================= =============================
The Probability Density Function (PDF) is function defined for a random variable :math:`X` such that: The Probability Density Function (PDF) is a function defined for a random variable :math:`X` such that:
.. math:: .. math::
\forall (a,b) \in \mathbb{R}^2,\, P(a \le X \le b) = \int_a^b f_X(x)dx \forall (a,b) \in \mathbb{R}^2,\, P(a \le X \le b) = \int_a^b f_X(x)dx
@ -16,7 +16,7 @@ Properties:
#. :math:`\int_{-\infty}^{+\infty} f_X(x)dx=1` #. :math:`\int_{-\infty}^{+\infty} f_X(x)dx=1`
#. :math:`P(X=a)=\int_{a}^{a} f_X(x)dx=0` #. :math:`P(X=a)=\int_{a}^{a} f_X(x)dx=0`
From property *2* it can be derived that (`source <http://yallouz.arie.free.fr/terminale_cours/probascont/prob-continue.php>`__): From *property 2*, it can be derived that (`source <http://yallouz.arie.free.fr/terminale_cours/probascont/prob-continue.php>`__):
.. math:: .. math::
P(a \le X \le b) &= P(a < X \le b) =P(a \le X < b) =P(a < X < b) P(a \le X \le b) &= P(a < X \le b) =P(a \le X < b) =P(a < X < b)