Feat: Bilans sur les proba conditionnelles
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bertrand Benjamin 2021-03-10 09:19:01 +01:00
parent 3518e3cd0b
commit f1745727d4
12 changed files with 549 additions and 15 deletions

View File

@ -1,14 +0,0 @@
\documentclass[a4paper,10pt]{article}
\usepackage{myXsim}
\author{Benjamin Bertrand}
\title{Probabilités conditionnelles - Cours}
\date{février 2021}
\pagestyle{empty}
\begin{document}
\maketitle
\end{document}

Binary file not shown.

View File

@ -0,0 +1,108 @@
\documentclass[a4paper,10pt]{article}
\usepackage{myXsim}
\author{Benjamin Bertrand}
\title{Probabilités conditionnelles - Cours}
\date{Mars 2021}
\pagestyle{empty}
\begin{document}
\maketitle
\section{Notations}
\subsection*{Les ensembles}
Soit $E$ un ensemble et $A$ et $B$ deux sous ensemble de $E$.
\begin{center}
\includegraphics[ scale=0.6 ]{./fig/ensembles}
\end{center}
\begin{itemize}
\item \textbf{Complémentaire de $A$} contient tous les éléments qui n'ont pas les caractéristiques de $A$.
\begin{center}
\includegraphics[ scale=0.6 ]{./fig/Abar}
\end{center}
\item \textbf{Intersection de $A$ et $B$} contient tous les éléments qui ont les caractéristiques de $A$ \textbf{ET} de $B$.
\begin{center}
\includegraphics[ scale=0.6 ]{./fig/inter}
\end{center}
\item \textbf{Union de $A$ et $B$} contient tous les éléments qui ont les caractéristiques de $A$ \textbf{OU} de $B$.
\begin{center}
\includegraphics[ scale=0.6 ]{./fig/union}
\end{center}
\end{itemize}
\pagebreak
\subsection*{Les probabilités}
\begin{definition}{Probabilités conditionnelles}
Soit $A$ et $B$ deux ensembles d'un population totale $E$ avec $A$ un ensemble non vide.
\begin{itemize}
\item Probabilités de l'évènement $A$
\[
P(A) = \frac{\mbox{Effectif de $A$}}{\mbox{Effectif total}}
\]
\item Probabilités de l'évènement $B$ sachant $A$
\[
P_A(B) = \frac{\mbox{Effectif des éléments qui sont dans $A$ et $B$}}{\mbox{Effectifs dees éléments qui sont dans $A$}}
\]
\begin{center}
\includegraphics[ scale=0.6 ]{./fig/condi_A}
\end{cente}
\end{itemize}
\end{definition}
\paragraph{Exemple}~\\
\begin{minipage}{0.5\linewidth}
\begin{tabular}{|*{4}{c|}}
\hline
& Homme & Femme & Total \\
\hline
Employé & 10 & 15 & 25 \\
\hline
Vacataire & 14 & 17 & 31 \\
\hline
Total & 24 & 32 & 56 \\
\hline
\end{tabular}
\end{minipage}
\begin{minipage}{0.5\linewidth}
On note
\[
A = \left\{ \mbox{Homme} \right\} \qquad
\]
\[
B = \left\{ \mbox{Employé} \right\} \qquad
\]
\end{minipage}
\bigskip
\[
P(A) =
\]
Interprétation:
\[
P_A(B) =
\]
Interprétation:
\bigskip
\afaire{}
\end{document}

Binary file not shown.

View File

@ -0,0 +1,158 @@
\documentclass[a4paper,10pt]{article}
\usepackage{myXsim}
\author{Benjamin Bertrand}
\title{Probabilités conditionnelles - Cours}
\date{Mars 2021}
\pagestyle{empty}
\begin{document}
\maketitle
\setcounter{section}{1}
\section{Arbre et probabilité conditionnelles}
Les probabilités conditionnelles peuvent se représenter sous forme d'arbre de probabilité.
Soit $A$ deux évènements de $E$ avec $P(A) \neq 0$ et $B$, $C$ et $D$ trois autres évènements de $E$. Alors on peut considérer l'arbre de probabilité ci-contre et on obtient les propriétés suivantes:
\begin{minipage}{0.3\textwidth}
\begin{tikzpicture}[grow=right, sloped, xscale=2, yscale=1.5]
\node {.}
child [red] {node {$A$}
child {node {$B$}
edge from parent
node[above] {$P_A(B)$}
}
child [black] {node {$C$}
edge from parent
node[above] {$P_A(C)$}
}
child [black] {node {$D$}
edge from parent
node[above] {$P_A(D)$}
}
edge from parent
node[above] {$P(A)$}
}
child[missing] {}
child[missing] {}
child { node {$\overline{A}$}
child {node {$B$}
edge from parent
node[above] {$P_{\overline{A}}(B)$}
}
child [black] {node {$C$}
edge from parent
node[above] {$P_{\overline{A}}(C)$}
}
child [black] {node {$D$}
edge from parent
node[above] {$P_{\overline{A}}(D)$}
}
edge from parent
node[above] {$P(\overline{A})$}
}%
;
\end{tikzpicture}
\end{minipage}
\hfill
\begin{minipage}{0.6\textwidth}
\begin{itemize}
\item La somme des probabilités des branches issues d'un même noeud est égale à 1.
On a alors
\[
P(A) + P(\overline{ A }) = 1
\]
ou encore
\[
P_A(B) + P_A(C) + P_A(D) = 1
\]
\item La probabilité d'un chemin est égale au produit des probabilités des branches parcourues.
On a alors (chemin rouge)
\[
P(A \cap B) = P(A) \times P_A(B)
\]
Ou encore la formule de Bayes
\[
P_A(B) = \frac{P(A \cap B)}{ P(A) }
\]
\item La probabilité d'un évènement est égale à la somme des probabilités des chemins qui conduisent à cet évènement.
C'est la loi des probabilités totale qui peut se traduire dans notre exemple par
\[
P(B) = P(A\cap B) + P(\overline{A} \cap B)
\]
ou
\[
P(C) = P(A\cap C) + P(\overline{A} \cap C)
\]
\end{itemize}
\end{minipage}
\paragraph{Exemple}~\\
\begin{tabular}{|*{4}{p{2cm}|}c|}
\hline
& Moins de 20ans & entre 20 et 50 ans & Plus de 50ans & Total \\
\hline
Guéris & 20 & 16 & 30 & 66\\
\hline
Malade & 24 & 10 & 5 & 39\\
\hline
Total & 44 & 26 & 35 & 105\\
\hline
\end{tabular}
On note
\[
A = \left\{ \mbox{Malade} \right\} \qquad P = \left\{ \mbox{Plus de 50ans} \right\} \qquad
E = \left\{ \mbox{Entre 20 et 50ans } \right\} \qquad M = \left\{ \mbox{Moins de 20ans} \right\} \qquad
\]
\begin{center}
\begin{tikzpicture}[sloped, xscale=2, yscale=1.5]
\node {.}
child [red] {node {$A$}
child {node {$P$}
edge from parent
node[above] {...}
}
child [black] {node {$E$}
edge from parent
node[above] {...}
}
child [black] {node {$M$}
edge from parent
node[above] {...}
}
edge from parent
node[above] {...}
}
child[missing] {}
child[missing] {}
child { node {$\overline{A}$}
child {node {$P$}
edge from parent
node[above] {...}
}
child [black] {node {$E$}
edge from parent
node[above] {...}
}
child [black] {node {$M$}
edge from parent
node[above] {...}
}
edge from parent
node[above] {...}
}%
;
\end{tikzpicture}
\end{center}
\afaire{Compléter l'arbre avec les probabilités}
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -0,0 +1,274 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg8"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07, custom)"
sodipodi:docname="ensembles.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.5077062"
inkscape:cx="342.38855"
inkscape:cy="247.1513"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
showguides="false"
inkscape:window-width="1920"
inkscape:window-height="1054"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="opacity:0.382969;fill:#0000ff;stroke:#000000;stroke-width:0.304881;stop-color:#000000"
id="rect863"
width="78.540085"
height="14.654474"
x="112.35032"
y="28.559233"
ry="4.5616803" />
<rect
style="opacity:0.382969;fill:#b3b3b3;stroke:#000000;stroke-width:0.2329;stop-color:#000000"
id="rect833"
width="88.035439"
height="46.106461"
x="6.1855693"
y="7.1176796"
ry="5.7131782" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="12.342381"
y="14.562019"
id="text837"><tspan
sodipodi:role="line"
id="tspan835"
x="12.342381"
y="14.562019"
style="stroke-width:0.264583">E</tspan></text>
<rect
style="opacity:0.382969;fill:#ff0000;stroke:#000000;stroke-width:0.312887;stop-color:#000000"
id="rect839"
width="23.032158"
height="38.189877"
x="25.814392"
y="11.452538"
ry="5.5030832" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="29.626511"
y="17.945637"
id="text843"><tspan
sodipodi:role="line"
id="tspan841"
x="29.626511"
y="17.945637"
style="stroke-width:0.264583">A</tspan></text>
<rect
style="opacity:0.382969;fill:#0000ff;stroke:#000000;stroke-width:0.304881;stop-color:#000000"
id="rect845"
width="78.540085"
height="14.654474"
x="10.111814"
y="30.473827"
ry="4.5616803" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="13.073805"
y="38.849197"
id="text849"><tspan
sodipodi:role="line"
id="tspan847"
x="13.073805"
y="38.849197"
style="stroke-width:0.264583">B</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="114.58089"
y="12.647426"
id="text855"><tspan
sodipodi:role="line"
id="tspan853"
x="114.58089"
y="12.647426"
style="stroke-width:0.264583">E</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="131.86502"
y="16.031042"
id="text861"><tspan
sodipodi:role="line"
id="tspan859"
x="131.86502"
y="16.031042"
style="stroke-width:0.264583">A</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="115.31231"
y="36.934605"
id="text867"><tspan
sodipodi:role="line"
id="tspan865"
x="115.31231"
y="36.934605"
style="stroke-width:0.264583">B</tspan></text>
<rect
style="opacity:0.382969;fill:#ff0000;stroke:#000000;stroke-width:0.312888;stop-color:#000000"
id="rect839-7"
width="23.032158"
height="38.189877"
x="128.28906"
y="9.442317"
ry="5.5030832" />
<path
id="rect851"
style="opacity:0.69714844;fill:#00ff00;stroke:#000000;stroke-width:0.880252;stop-color:#000000"
d="M 431.38477 19.666016 C 419.42218 19.666016 409.79102 29.295226 409.79102 41.257812 L 409.79102 172.33203 C 409.79102 184.29462 419.42218 193.92578 431.38477 193.92578 L 720.93164 193.92578 C 732.89422 193.92578 742.52344 184.29462 742.52344 172.33203 L 742.52344 41.257812 C 742.52344 29.295226 732.89422 19.666016 720.93164 19.666016 L 431.38477 19.666016 z M 504.7793 36.048828 L 550.23047 36.048828 C 561.75311 36.048828 571.0293 45.32498 571.0293 56.847656 L 571.0293 159.58984 C 571.0293 171.11252 561.75311 180.38867 550.23047 180.38867 L 504.7793 180.38867 C 493.25661 180.38867 483.97852 171.11252 483.97852 159.58984 L 483.97852 56.847656 C 483.97852 45.32498 493.25661 36.048828 504.7793 36.048828 z "
transform="scale(0.26458333)" />
<rect
style="opacity:0.382969;fill:#b3b3b3;stroke:#000000;stroke-width:0.2329;stop-color:#000000"
id="rect833-6"
width="88.035439"
height="46.106461"
x="8.8498955"
y="60.605553"
ry="5.7131782" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="15.006706"
y="68.049896"
id="text837-3"><tspan
sodipodi:role="line"
id="tspan835-1"
x="15.006706"
y="68.049896"
style="stroke-width:0.264583">E</tspan></text>
<rect
style="opacity:0.382969;fill:#ff0000;stroke:#000000;stroke-width:0.312888;stop-color:#000000"
id="rect839-75"
width="23.032158"
height="38.189877"
x="28.478718"
y="64.940414"
ry="5.5030832" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="32.290836"
y="71.43351"
id="text843-9"><tspan
sodipodi:role="line"
id="tspan841-6"
x="32.290836"
y="71.43351"
style="stroke-width:0.264583">A</tspan></text>
<rect
style="opacity:0.382969;fill:#0000ff;stroke:#000000;stroke-width:0.304882;stop-color:#000000"
id="rect845-2"
width="78.540085"
height="14.654474"
x="12.776138"
y="83.9617"
ry="4.5616803" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="15.738129"
y="92.337074"
id="text849-1"><tspan
sodipodi:role="line"
id="tspan847-7"
x="15.738129"
y="92.337074"
style="stroke-width:0.264583">B</tspan></text>
<path
id="rect839-75-8"
style="opacity:0.78253906;fill:#00ff00;stroke:#000000;stroke-width:0.312888;stop-color:#000000"
d="m 28.462112,83.883022 v 13.665317 c 0,0.337981 0.03161,0.668244 0.0894,0.989086 h 22.85287 c 0.05779,-0.320842 0.08992,-0.651105 0.08992,-0.989086 V 83.883022 Z" />
<rect
style="opacity:0.382969;fill:#b3b3b3;stroke:#000000;stroke-width:0.2329;stop-color:#000000"
id="rect833-5"
width="88.035439"
height="46.106461"
x="112.166"
y="61.70715"
ry="5.7131782" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="118.32281"
y="69.151489"
id="text837-7"><tspan
sodipodi:role="line"
id="tspan835-4"
x="118.32281"
y="69.151489"
style="stroke-width:0.264583">E</tspan></text>
<path
id="rect839-1"
style="opacity:0.6215625;fill:#00ff00;stroke:#000000;stroke-width:1.18257;stop-color:#000000"
d="M 518.92188 249.60742 C 507.39923 249.60742 498.12305 258.88357 498.12305 270.40625 L 498.12305 321.5 L 456.01562 321.5 C 446.46412 321.5 438.77344 329.18873 438.77344 338.74023 L 438.77344 359.64453 C 438.77344 369.19604 446.46412 376.88672 456.01562 376.88672 L 498.46094 376.88672 C 500.2133 386.6118 508.67701 393.94727 518.92188 393.94727 L 564.37305 393.94727 C 574.61795 393.94727 583.08163 386.6118 584.83398 376.88672 L 718.37695 376.88672 C 727.92846 376.88672 735.61914 369.19604 735.61914 359.64453 L 735.61914 338.74023 C 735.61914 329.18873 727.92846 321.5 718.37695 321.5 L 585.17383 321.5 L 585.17383 270.40625 C 585.17383 258.88357 575.89573 249.60742 564.37305 249.60742 L 518.92188 249.60742 z "
transform="scale(0.26458333)" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="135.60695"
y="72.535103"
id="text843-8"><tspan
sodipodi:role="line"
id="tspan841-5"
x="135.60695"
y="72.535103"
style="stroke-width:0.264583">A</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="119.05424"
y="93.438667"
id="text849-7"><tspan
sodipodi:role="line"
id="tspan847-5"
x="119.05424"
y="93.438667"
style="stroke-width:0.264583">B</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -2,7 +2,7 @@ Probabilités conditionnelles
############################ ############################
:date: 2021-02-07 :date: 2021-02-07
:modified: 2021-03-08 :modified: 2021-03-10
:authors: Benjamin Bertrand :authors: Benjamin Bertrand
:tags: Probabilité, Simulation :tags: Probabilité, Simulation
:category: TST :category: TST
@ -25,6 +25,10 @@ Le workflow de la séance:
Bilan: Notations ensemblistes et probabilistes Bilan: Notations ensemblistes et probabilistes
.. image:: ./1B_notation.pdf
:height: 200px
:alt: Notations ensemblistes et probabilistes
Étape 2: Vrai/Faux à partir d'un arbre Étape 2: Vrai/Faux à partir d'un arbre
====================================== ======================================
@ -36,6 +40,10 @@ Travail similaire à l'étape 1 mais cette fois-ci à partir d'un arbre.
Bilan: représentation d'une situation avec des arbres Bilan: représentation d'une situation avec des arbres
.. image:: ./2B_arbre.pdf
:height: 200px
:alt: Arbre de probabilités conditionnelles
Étape 3: Construction d'un arbre Étape 3: Construction d'un arbre
================================ ================================