# Chapitre 1 : Rappel de probabilités
## I. Expérience aléatoire
## II. Variable aléatoire



## IV. Fonctions génératrices


## V. Suites aléatoires






# Chapitre 2 : Méthode de Monte Carlo et Simulation
## I. Simulation
## II. Génération de variables aléatoires









# Chapitre 3 : Chaines de Markov
## Introduction




## II.Décomposition de l'espace d'état






## III. Chaines de Markov Périodiques



## V.Comportement asymptotiques/théorèmes asymptotiques




# Chapitre 4. Processus de Poisson










2)









## 7. Processus de risque
Ingénieurs actueurs

Evolution du capital de la compagnie
$U_t=u+ct-\underbrace{\sum_{k=1}^{N_t}Y_k}_\text{PPC} \ \ \ \ \ ,t\geq 0$
$N_t$ <- nombre d'accidents dans ]0,t]
$T=inf\{t\geq 0\ : U_t < 0\}$
$U_t$ : Processus de Cramer-Linderberg
Hypothèses
- $N_t \ \ ,t \geq 0 \ \ \ \ PPH(\lambda)$
- $Y_1, Y_2,...$ iid. F(fr)
- $(E|Y_1| < \infty)$ ie. $F(x)= P(Y_1 \leq x)$
- $(N_t) \perp (Y_n)$
au dessus pas perpendiculaire mais indépendant
$U_t= u+ ct-X_t$ où $X_t=\sum_{i=1}^{N_t}Y_i$ (PPC) ($\sum_{i=1}^0=0$)
$\mu = \mathbb{E}(Y_1)$
$$
E[U_t]=E[U + ct - X_t]
\\
= u+ct-E[X_t]
\\
= u+ct-\lambda \mu t
\\
E[U_t]=u +(c-\lambda \mu)t
$$
++Conditions de viabilité :
- $c-\lambda \mu > 0$
- $E[U_t]$ croissant


++Charges de sécurité++
$n=\frac{c-\rho}{\rho}$
# Chapitre 5 : Processus de Markov
### Introductcion
$X= (X_t \ \ , \ \ t \in I \subset \mathbb{R}_+)$

$E \subset \mathbb{Z}$
++Temps de sauts++
$T_0 =0$
$T_1 =1$
$T_2 =W_1 + W_2$
.
.
.
$T_N =W_1 + W_2+ ... + W_n \ \ \ \ ,n\geq 1$
$0=T_0\leq T_1\leq T_2 \leq ....$ à valeurs dans $\mathbb{R}_+$
Temps de séjours
$W_1, W_2, ......$ à valeurs dans $\mathbb{R}_+$
$W_n=T_n-T{n-1} \ \ \ n \geq 1$
$X_t \ \ \ \ t \in [0,1]$
++Propriété de Markov++
$h\geq 0 \ \ \ \ \ ,0 \leq t_0 \leq t_1 \leq t_2 \leq .... \leq t_n \ \ \ \ \ , j,i_0,....,I_n \in \mathbb{E}$
$$
\mathbb{P}(X_{t_n+h=j}| X_{t_0}=i_0, X_{t_1}=i_1,....,X_{t_n}=i_n )
\\
=\mathbb{P}(X_{t_n+h=j}| X_{t_n}=i_n )
\\
=\mathbb{P}(X_{t_n+h=j}|X_S; s \leq t_n, X_{t_n}=i_n )
$$
$P(t_n,i_n,t_n+h, j)= \mathbb{P}(X_{t_n +h}=j| X_{t_n}=i_n)$
Processus de Markov (PM) homogène (% au temps)
fonction de transition du PM
$P(t,i,j):= P(X_{t+h}=j | X_h=i) \ \ \ \ \ , t\geq 0 \ \ \ , i,j \in \mathbb{E}$
Notations différentes :
- $X_t \equiv X(t)$
- $P(t,i,j)=P_{ij}(t)=P_t(i,j)$
### Propriétés
1. $0 \leq P_{ij}(t) \leq 1 \ \ \ \ , \forall i,j \in E$
2. $\sum_{j\in E}P_{ij}(t)=1 \ \ \ \ , \forall t\geq 0 \ \ \ ,\forall i \in E$
3. Identité de Chapman Kolmogorov
$P_{ij}(tts)=\sum_{k \in E}p_{ik}(s)p_{kj}(t)$
4. $lim_{t->0}P_{ij}(t)= \delta_{ij} = \mathbb{1}_{\{i=j\}}$
$\delta_{ij}$ Kronecter






# Pas compris 1



:::warning
:pencil: $\ \ $***Exemple***
Un PM à deux états

$$ A = \begin{pmatrix}
-\lambda & \lambda \\
\mu & -\mu
\end{pmatrix}
$$
$$ A^2= \begin{pmatrix}
-\lambda & \lambda \\
\mu & -\mu
\end{pmatrix}
\begin{pmatrix}
-\lambda & \lambda \\
\mu & -\mu
\end{pmatrix}
\\
=\begin{pmatrix}
\lambda^2 + \lambda\mu & -\lambda^2-\lambda\mu \\
-\mu^2-\lambda\mu & \mu^2+\lambda\mu
\end{pmatrix}\\=-(\mu + \lambda)\begin{pmatrix}
-\lambda & \lambda \\
\mu & -\mu
\end{pmatrix} \\= -(\mu + \lambda)A
$$
$A^n= (-1)^{n-1}(\lambda+\mu)^{n-1}A \ \ \ \forall n \geq1$
$$
P_t=I + \frac{-1}{\lambda +\mu}\bigg[\sum_{n\geq1}\frac{t^n}{n!} (-1)^{n-1}(\lambda+\mu)^{n-1} \bigg]
\\
=I - \sum_{n\geq1}\frac{(-(\lambda+\mu)t)^n}{n!}A
\\
\bigg( Or \ \ \ \sum_{n\geq1}\frac{(-(\lambda+\mu)t)^n}=-1 \bigg)
\\
=I -\frac{1}{\lambda + \mu}(e^{}-1)A
$$

:::
### 5. Chaines de Markov immergée et classes d'états


:::success
:blue_book: $\ \ $***Proposition***
<br>

:::
:::success
:blue_book: $\ \ $***Proposition***
<br>

:::
:::success
:blue_book: $\ \ $***Proposition***

$F_i(t)=\epsilon(a_i)$
<br>
:::
:::warning
:pencil: $\ \ $***Exemple 1***
++2 états++
Chaine de Markov détérministe, le phénomène est détérministe

:::
:::warning
:pencil: $\ \ $***Exemple 2***

:::
:::success
:blue_book: $\ \ $***Proposition***
Soit une PM $(X_t, \ \ t\geq 0)$ avec E, A (gén) et sa CMI ($Y_n, \ \ n \geq 0$), E , Q (matrices de transition)
++Alors :++
L'état $i \in E$ pour $X_t$ et i pour $Y_n$ est de la même nature
Ex : Si $Y_n$ est irréductibe => $X_t$ est irréductible
:::
### Loi stationnaire d'un Processus de Markov
Soient $X_t, \ \ \ t \geq 0 \ \ $ d'espace d'état E, et de générateur A$
++Déf++ : Une loi $\pi$ sur E est dite stationnaire pour $X$ (ou A ou $P_t$) si :
- $\pi A=0$
ou
- $\sum_{j \in E} \pi_ia_{ij}=0$ ; $\sum_{j \in E} \pi_i=1 \ \ \ \bigg( j \in E \bigg)$
:::warning
:pencil: $\ \ $***Exemple 2 états***
$$A = \begin{pmatrix}
-\lambda & \lambda \\
\mu & -\mu
\end{pmatrix}
$$
$\pi=(\pi_1,\pi_2)$

:::
### Loi réversible

$\rho A=0$ => $\rho$ stationnaire
## 5.7 : Lois stationnaires


# Pas compris 2

## 5.8 : Théorie ergodique
# A revoir





il a ajouté des trucs sur cette slide





## 5.9 Applications
### 1. Fiabilité (sûreté de Fonctionnement)

- U : états de bon fonctionnement
- D >> de panne (=défaillants)
- T= durée de vie du système (durée de l'excursion dans U)
$T= inf\{t\geq 0 : X_t \in D\}$
$$
R(t)=P(T>t)=1-F_t(t)
\\
R(t)=P(X_s \in U, \ \ \forall s\leq t)
$$
++Disponibilité (instantannée) : A(t) (Availability)
A(t)=P(système soit en bon état eu temps t)
$A(t)=P(X_t \in U)$


$$
A(t):=P(X_t \in U)=\sum_{j \in U}P(X_t=j)
\\
= \sum_{i \in E}\sum_{j \in U}P(X_0=i,X_t=j)
\\
=\sum_{j \in U}\sum_{i \in E}\underbrace{P(X_0=i)}_\text{\alpha_i}
$$
On a : $P(X_t=j \ | \ X_0=i)=P_t(i,j)$
>$\alpha=(\alpha_1,\alpha_2,...,\alpha_d)$
>$\alpha_i=P(X_0=i)$
>$E=\{1,2,...,d\}$
>$U=\{1,2,...,r\}$
>$D=\{r+1,...,d\}$
>
$$
A(t)=\sum_{j \in U}\sum_{i \in E}\alpha_i P_t(i,j)
$$


$A(t)=\alpha e^{At}\mathbb{1}_{d,r}$
++Fiabilité++


$Y_t$ =$\begin{cases}
X_t, & t<T \ \ (durée \ de \ vie) \\
\Delta , & t\geq T\\
\end{cases}$
$R(t)=P(X_s \in U, \ \ \forall s \leq t)=P(Y_t \in U)= ..$

$R(t)=\alpha_y e^{A_yt} \mathbb{1}_{r+1,r}=\alpha_0e^{A_0t}\mathbb{1}_{r+1,r}$
:::warning
:pencil: $\ \ $***Ex***

>$E=\{1,2,3\}$
>$U=\{1,2,...,r\}$
>$D=\{r+1,...,d\}$


++Fiabilité++
$R(t)=\alpha_1 e^{A_0t}\mathbb{1}=(1 \ \ 0)\bigg[e^{\begin{pmatrix}
-\lambda_1 & \lambda_1 \\
\mu_1 & -\mu_1-\lambda_2 \\
\end{pmatrix}t}\bigg]\begin{pmatrix}
1 \\
1 \\
\end{pmatrix}$







:::
++Temps Moyens++
$MTTF=$ Mean Time to Failure (durée de vie moyenne)
$MMTF=E[T]=-\alpha_1A_0^{-1}\mathbb{1}$
$E[T]=\int_0^\infty\underbrace{P(T>t)}_\text{R(t)}dt=\int_0^\infty R(t)dt=\int_0^\infty\alpha_1e^{A_Ot}\mathbb{1}dt$
$=\alpha_1\int_0^\infty e^{A_0t}\mathbb{1}dt=\alpha_1\big[ A_0^{-1}e^{A_0t}\mathbb{1}\big]_0^\infty \mathbb{1}= \alpha_0 A_0^{-1}\mathbb{1}$

# Chapitre 7
## 7.1 Files d'attente
++Jeudi 18 décembre++











### 3. Réseaux de Pétri stochastiques













# Chapitre 6 : Processus de renouvellement











# ex 7 TD3
U(x,t)
$$\frac{a_1}{b_1}=\frac{a_2}{b_2}=\frac{a_3}{b_3}=...=\frac{a_k}{b_k}= \frac{a_1+a_2+a_3...+a_k}{b_1+b_2+b_3...b_k}$$
### exemple
$$\frac{8}{4}=\frac{4}{2}=\frac{2}{1}= \frac{60+13+101}{4+9+3}$$
## M/M/m/$\infty$
$$P(T>t)=\frac{a^m\pi_0}{m!(1-\rho)}e^{-m\mu(1-\rho)t}$$
$$ E(T)=\frac{\pi_m}{(1-\rho)^2 m\mu}$$
## M/M/1/$\infty$
$$P(T>t)=ae^{-\mu(1-\rho)t}$$
$$ E(T)=\frac{\pi_m}{(1-\rho)^2 m\mu}$$
$$P(W>t)=e^{-(1-a)\mu t}$$
## M/M/m/k
# Question 1
Nous avons cette formule en deux versions (avec $k\geq 0$ et $k\geq 1$). Quelle est la bonne ?
### a)
$$
P_t = I + \sum_{k\geq 0}\frac{t^k}{k}A^k
$$
### b)
$$
P_t = I + \sum_{k\geq 1}\frac{t^k}{k}A^k
$$
# Question 2
Que représente Q(i,k) dans cette formule ?

# Question 3
Comment trouve-t-on cette égalité et est-elle toujours vraie ?
$$
\int_0^t f_n(u)du= 1-e^{-\lambda t}\sum_{i=0}^{n-1}\frac{(\lambda t)i}{i!}
$$
avec fn(u) fonction de densité de la loi Gamma(n,$\lambda$)
# Question 4
Cette question concerne l'exercice 3, question 4 de A15. Voici le sujet.
[https://drive.google.com/drive/folders/1yRps6o9OEOvSawlg6TOVvnvmabjAyrTO?fbclid=IwAR24IyUWemobQ8LkMZPGXbQEoHkdV5zbVyjKSHZiQ4MiE9YfZchlUIEJqDM](https://)
Et voici le corrigé :
[https://drive.google.com/drive/folders/1yRps6o9OEOvSawlg6TOVvnvmabjAyrTO?fbclid=IwAR24IyUWemobQ8LkMZPGXbQEoHkdV5zbVyjKSHZiQ4MiE9YfZchlUIEJqDM](https://)
Dans le corrigé vous trouvez ceci pour l'espérance de W/

Alors que si on applique la formule vue en cours vendredi dernier, on trouve une valeur différente. Pourquoi ?
Voici les calculs avec la formule de cours :


# Question 5
Pour l'exercice 6 du TD6 sur les processus de Markov.

Dans la correction, en TD nous avions calculé le générateur avant de calculer la fonction de transition. Comment serait-il possible d'obtenir la fonction de transition avant le générateur (comme demandé dans l'énoncé)?