forked from ADonazzan/20356_Statistics-Preparatory-Course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
L2-probability-functions.tex
90 lines (71 loc) · 4.64 KB
/
L2-probability-functions.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
\setchapterabstract{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue est, porttitor commodo velit a, tristique pharetra ante. Mauris pretium ante at lorem suscipit porttitor. Sed neque tortor, lacinia a aliquam quis, molestie tincidunt nisi. Vivamus congue cursus iaculis. Aenean id massa convallis, sodales metus a, imperdiet velit. In metus erat, suscipit vel mollis sed, tincidunt at ante. In hac habitasse platea dictumst. Cras malesuada mollis odio, eget mattis mauris tincidunt a.}
\chapter{Probability Functions}
\vspace{-1.5cm}
{\chaptoc\noindent\begin{minipage}[inner sep=0,outer sep=0]{0.9\linewidth}\section{Probability Density Function | \(f(x)\)}\end{minipage}}
\begin{equation}
\begin{split}
\mathbb{P} (a < X \leq b) = \mathbb{P} (X \leq b) - \mathbb{P} (X \leq a) = & \overbrace{F_x (b)}^{CDF} - F_x (a) \\
= & \int_{a}^{b} \underbrace{f(x)}_{PDF} dx
\end{split}
\end{equation}
\Note{
Relationship between Cumulative Distribution Function and Probability Density Function:
\[f_x (x) = \frac{d}{dx} F_x (X) \iff F_x (t) = \int_{-\infty}^{t} f_{x} (x) dx \]
}
\subsection{Properties of the Probability Density Function}
\begin{enumerate}
\item \textbf{Non Negativity}: the density is never negative
\begin{equation}
f_x (x) \geq 0 \ \forall x \in \mathbb{R}
\end{equation}
\item \textbf{Normalisation}: the area below the curve of the density function is always equal to 1
\begin{equation}
\int_{-\infty}^{\infty} f_x (x) dx = 1
\end{equation}
\end{enumerate}
\Example{
\begin{equation}\label{example-pdf-1}
f_x(x) = \begin{cases} cx^2 & \mbox{if } -1 < x \leq 2 \\ 0 & \mbox{a.e.} \end{cases}
\end{equation}
\[1 = \int_{-\infty}^{\infty} f_x (x) dx = \underbrace{\int_{-\infty}^{-1} f_x (x) dx}_{=0} + \int_{-1}^{2} f_x (x) dx + \underbrace{ \int_{2}^{\infty} f_x (x) dx}_{=0} = \int_{-1}^{2} f_x (x) dx = \]
\[\int_{-1}^{2} cx^2 dx =\left[c \frac{x^3}{3}\right]_{-1}^{2} = \frac{c}{3} (8+1) = 3c \rightarrow 3c = 1 \rightarrow c = \frac{1}{3} \]
Given the function \(c \cdot x^2\), the constant \(c\) that allows the function to respect the properties of a \textit{probability density function} is \(c = \frac{1}{3}\).
The final form of function \ref{example-pdf-1} is hence:
\[
f_x(x) = \begin{cases} \frac{1}{3} x^2 & \mbox{if } -1 < x \leq 2 \\ 0 & \mbox{a.e.} \end{cases}
\]
}
\Example{
Imagine there is a traffic light, where the \textcolor{ForestGreen}{green light} lasts for 20' and the \textcolor{BrickRed}{red light} lasts for 40'. Define \(X\) as the waiting time. (Note: X is neither discrete nor continuous).
\begin{equation}\label{example-pdf-1}
F_x(t) = \begin{cases} 0 & \mbox{if } t<0 \\ \clubsuit & \mbox{if } 0 \leq t < 40 \\ 1 & \mbox{if } t \geq 40 \end{cases}
\end{equation}
\[
\clubsuit = \mathbb{P} (x \leq t) = \mathbb{P} (x \leq t | \textcolor{BrickRed}{R}) \cdot \mathbb{P} (\textcolor{BrickRed}{R}) + \mathbb{P} (x \leq t | \textcolor{ForestGreen}{G}) \cdot \mathbb{P} (\textcolor{ForestGreen}{G}) =
\]
\[
\frac{t}{40} \cdot \overbrace{\frac{40}{20+40}}^{prob. \ light=\textcolor{BrickRed}{R}} + 1 \cdot \overbrace{\frac{20}{20+40}}^{prob. \ light = \textcolor{ForestGreen}{G}} =
\]
\[
\clubsuit = \frac{1}{3} \cdot \frac{t+20}{60}
\]
}
\section{Expected Value}
The expected value of a probability function can be described as:
\begin{equation}
E(x)= \int_{0}^{+\infty} (1-F_x(t)) dt - \int_{-\infty}^{0} F_{x}(t) dt \begin{cases}
\sum x_i p_x (I) & \mbox{if $X$ is discrete} \\ \int_{-\infty}^{+\infty} x f_x(x) dx & \mbox{if $X$ is continuous} \end{cases}
\end{equation}
\Example{
When X = \textit{number of tiles}:
\[E(x) = 1 \cdot \frac{1}{4} + 2 \cdot \frac{1}{2} + 3 \cdot \frac{4-\pi}{16} + 4 \cdot \frac{\pi}{16} = 2+ \frac{\pi}{16} \]
}
\Example{
When X = \textit{distance from centre}:
\[E(x) = \int_{-\infty}^{+\infty} x f_x(x) dx \]
}
\Example{
When X = \textit{waiting time at the traffic light}:
\[E(x) = \int_{-\infty}^{+\infty} x f_x(x) dx \]
}
fine pagine