\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{stmaryrd}
\usepackage[bookmarks]{hyperref}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath, amssymb}
\usepackage{cancel}
\newcommand{\Ker}{\operatorname{Ker}}
\newcommand{\Tr}{\operatorname{Tr}}
\newcommand{\rg}{\operatorname{rg}}
\newcommand{\id}{\operatorname{id}}
\renewcommand{\Im}{\operatorname{Im}}
\newcommand{\Mat}{\operatorname{Mat}}
%\newcommand{\dim}{\operatorname{dim}}
\newcommand{\Vect}{\operatorname{Vect}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\renewcommand{\d}{\ \mathrm{d}}
\renewcommand{\t}[1]{\ {}^t\!#1}
\renewcommand{\c}[1]{\ {}^c\!#1}
\newcommand{\mc}{\mathcal{M}}
\newcommand{\bc}{\bathcal{B}}
\newcommand{\ie}{{\it i.e.}}
\newcommand{\paral}{//}
\begin{document}
	
\section{}
\section{}
\section{}
\section{}
\section{}
\section{}
\section{}
\section{}

On nous demande la probabilité $p$ que le joueur soit un tricheur sachant qu'il a gagné.

 $x$ est la proportion de tricheur


 Notons $ \begin{cases}
 	T &= \text{``Le joueur est un tricheur"} \\
	\c{T} &= \text{``Le joueur n'est pas un tricheur"} \\
	G &= \text{``Le joueur a gagné"} \\
	T &= \text{``Le joueur a perdu"} \\
 \end{cases} $ 

 On a $ \begin{cases}
	 P(T) &= x \\
	 P(G|T) &= 1 \\
	 P(G|^c{T}) &= \frac{1}{2} \\
 \end{cases} $ 

On cherche $P(T|G)$ 
D'après Bayes comme $ \begin{cases}
	P(G) &\neq 0 \\
	P(P) &\neq 0
\end{cases} $

\begin{align*}
	P(T|G) &= \frac{x P(G|T)}{P(G)} \\
	       &= \frac{x}{P(G)} \\
\end{align*}

\begin{align*}
	P(G) &= P(T) P(G|T) + P(\c{T}) P(G|\c{T}) \quad&\text{d'après la FPT} \\
	     &= x + (1-x)\frac{1}{2} \\
	     &= \frac{1}{2}x + \frac{1}{2} \\
	p = P(T|G) = \frac{2x}{x+1} \ge \frac{1}{2} &\iff 4x \ge x+1  \\
						    &\iff 3x - 1 \ge 0 \\
						    &\iff x \ge \frac{1}{3}
\end{align*}


\section{}

\begin{figure}[h]
	\centering
	\includegraphics[width=0.8\textwidth]{fig_exo_9_urnes.png}
\end{figure}

Soit $\begin{cases}
	R_1 &:= \text{``La boule tirée de $U_1$ est rouge''} \\
	N_1 &:= \c{R_1} \\
	R_2 &:= \text{``La boule tirée de $U_2$ est rouge''} \\
	N_2 &:= \c{R_2} \\
	R_3 &:= \text{``La boule tirée de $U_3$ est rouge''} \\
	N_3 &:= \c{R_3} \\
\end{cases}$

\begin{center}
	On cherche $P(R_1|N_3)$
\end{center}

On considère le sce suivant:

\[
	(R_1 \cap R_2, R_1\cap N_2, N_1\cap R_2, N_1\cap N_2) 
\] 

\begin{align*}
	P(R_1\cap R_2) &= P(R_1) P(R_2) = \frac{12}{25} \neq 0 \\
	P(R_1 \cap N_2) &= P(R_1) P(N_2) = \frac{3}{25} \neq 0 \\
	P(N_1\cap R_2) &= P(N_1) P(R_2) = \frac{8}{25} \neq 0  \\
	P(N_1 \cap  N_2) &= P(N_1) P(N_2) = \frac{2}{25} \neq 0 \\
\end{align*}

D'après Bayes:

\begin{align*}
	P(R_1|N_3) &= \frac{P(R_1) P(N_3 | R_1)}{P(N_3)}  \\
\end{align*}

et \begin{align*}
	P(N_3) &= \frac{12}{25} P(N_3|R_1\cap R_2) + \frac{3}{25} P(N_3|R_1\cap N_2) + \frac{8}{25} P(N_3 | N_1\cap R_2) + \frac{2}{25} P(N_3 | N_1 \cap  N_2) \\
	       &= \frac{12}{25} \frac{3}{9} + \frac{3}{25} \frac{4}{9} + \frac{8}{25} \frac{4}{9} + \frac{2}{25} \frac{5}{9} \\
	       &= \frac{36+12+32+10}{9 \cdot 25} \\
	       &= \frac{90}{9 \cdot 25} = \frac{2}{5} \\
\end{align*}
\begin{align*}
	P(N_3|R_1) &= P(R_2|R_1) P(N_3|R_1|R_2) + P(N_2|R_1) P(N_3|N_2|R_1) \\
		   &= P(R_2|R_1) P(N_3|R_1 \cap  R_2) + P(N_2|R_1) P(N_3|N_2\cap R_1) \\
		   &= P(R_2) P(N_3 | R_1 \cap R_2) + P(N_2) P(N_3 | N_2\cap R_1) \quad&\text{par indépendance de $R_2, R_1, N_2$} \\
		   &= \frac{4}{5} \frac{3}{9} + \frac{1}{5} \frac{4}{9} \\
		   &= \frac{16}{5 \cdot 9} \\
\end{align*}

\begin{align*}
	P(R_1|N_3) &= \frac{\frac{3}{5} \frac{16}{5 \cdot 9}}{\frac{2}{5}} \\
	&= \frac{24}{5 \cdot 9} \\
	&= \frac{8}{15} \\
\end{align*}

\section{Bonus}
\begin{figure}[h]
	\centering
	\includegraphics[width=0.8\textwidth]{bonus.jpg}
\end{figure}

\subsection{}
\emph{Passons par l'évènement contraire} 

Soit $H = \text{``Aucun canard ne survit"}$
 
Notons $f: i \mapsto \text{numéro du canard choisi par le chasseur $i$}$ 

On a $f$ bijective

\begin{align*}
	P(A) &= \frac{n!}{n^n} \\
\end{align*}

On a $p_n = 1 - \frac{n!}{n^n}$
 
On a $p_n \to 1$ par croissance comparée et PAL

\subsection{}

Fixons $k\in \llbracket 1, n\rrbracket$

On cherche la probabilité que le canard $k$ (et pas un autre) survive.

Notons $C_j = \text{``Le chasseur $j$ ne tire pas sur le canard $k$"}$ pour $j\in \llbracket 1, n\rrbracket$

\begin{align*}
	P \left( \bigcap_{1 \le i \le n} C_i \right)  &= \prod_{1 \le  i \le n} P(C_i)  \quad&\text{par indépendance} \\
						      &= \frac{n-1}{n}  \times \cdots  \times \frac{n-1}{n} \\
						      &= (1 - \frac{1}{n})^{n} \\
						      &\to  \frac{1}{l}
\end{align*}

\end{document}

